TabbarController 在 3.0 中崩溃
我正在使用 TabBarController
,它在我的 ipod 中工作正常。
但我的应用程序使其 3.0 崩溃。有什么帮助吗?
self.window.rootViewController = self.tabBarController; //crashing here
和日志显示
-[UIWindow setRootViewController:]: unrecognized selector sent to instance 0x127c80
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -
[UIWindow setRootViewController:]: unrecognized selector sent to instance 0x127c80'
i am using TabBarController
, it is working fine in my ipod.
but my application is crashing it 3.0 . any help please?
self.window.rootViewController = self.tabBarController; //crashing here
and log shows
-[UIWindow setRootViewController:]: unrecognized selector sent to instance 0x127c80
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -
[UIWindow setRootViewController:]: unrecognized selector sent to instance 0x127c80'
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这可能会告诉您正确的方向。如果问题仍然存在,请告诉我。
由于在不同版本的 iOS 上执行,该方法可能已被弃用。
This may show you the right direction. Let me know if the problem still continues.
Due to executing on different versions of iOS, that method may have deprecated.
崩溃是因为您调用了一个不存在的方法,而不是因为您的变量未初始化。
-setRootViewController
在 iOS 4.0 之前不存在。 代替使用。
或者,将您的目标平台更新到 4.0.2 或更高版本。目前可能只有不到 5% 的用户没有使用 iOS 4。
The crash is because you're calling a method that doesn't exist, not because your variables are not initialized.
-setRootViewController
doesn't exist prior to iOS 4.0. Useinstead.
Or, update your target platfor to 4.0.2 or later. It's probably less than 5% of users that aren't using iOS 4 at this point.