【IOS】swift新手踩坑总汇

这里写自定义目录标题

ESTabBarController_swift

bash 复制代码
Exception	NSException *	"调用了 pushViewController 但实际上没 push 成功,viewController:<HuangShan.ViewControllers: 0x106832a00>; superclass: ESTabBarController_swift.ESTabBarController; title: (null); view: <UILayoutContainerView: 0x104e20670; frame = (0 0; 393 852); autoresize = W+H; layer = <CALayer: 0x600000266500>>; viewControllers(3): ( [0]<UINavigationController: 0x106825c00>,[1]<UINavigationController: 0x10582fe00>,[2]<UINavigationController: 0x105830e00> ); selectedViewController(0): <UINavigationController: 0x106825c00>"	0x0000600000c912c0

不知道怎么回事 引用了QMUIKit库就这样了

解决方法

swift 复制代码
 window = UIWindow(frame: UIScreen.main.bounds)
                let firstVC = ViewControllers()
                let navController = UINavigationController(rootViewController: firstVC)
                window?.rootViewController = navController
                window?.makeKeyAndVisible()

改为

swift 复制代码
   window = UIWindow(frame: UIScreen.main.bounds)
      
                let navController = ViewControllers()
                window?.rootViewController = navController
                window?.makeKeyAndVisible()

QMUIKit

bash 复制代码
Sandbox: rsync.samba(5937) deny(1) file-write-create /Users/ruyuanniu/Library/Developer/Xcode/DerivedData/HuangShan-gzfknlmvqpttdvdojgmibxjwzysp/Build/Products/Debug-iphonesimulator/HuangShan.app/Frameworks/QMUIKit.framework/.Info.plist.ogjkPx

解决方法

bash 复制代码
在项目的构建设置 > 构建选项(BuildSettings) '用户脚本沙盒(User Script Sandboxing)' 改成NO 
相关推荐
_.Switch11 分钟前
Python机器学习模型的部署与维护:版本管理、监控与更新策略
开发语言·人工智能·python·算法·机器学习
醉颜凉14 分钟前
银河麒麟桌面操作系统修改默认Shell为Bash
运维·服务器·开发语言·bash·kylin·国产化·银河麒麟操作系统
NiNg_1_23420 分钟前
Vue3 Pinia持久化存储
开发语言·javascript·ecmascript
带带老表学爬虫28 分钟前
java数据类型转换和注释
java·开发语言
qianbo_insist31 分钟前
simple c++ 无锁队列
开发语言·c++
BigYe程普42 分钟前
我开发了一个出海全栈SaaS工具,还写了一套全栈开发教程
开发语言·前端·chrome·chatgpt·reactjs·个人开发
彭于晏68943 分钟前
Android广播
android·java·开发语言
弱冠少年1 小时前
websockets库使用(基于Python)
开发语言·python·numpy
长天一色1 小时前
C语言日志类库 zlog 使用指南(第五章 配置文件)
c语言·开发语言
一般清意味……1 小时前
快速上手C语言【上】(非常详细!!!)
c语言·开发语言