如何调试iOS7 shadowOffset崩溃

时间:2013-09-12 13:39:54

标签: ios ios7

我的应用程序在ios6上运行正常。我制作了一个副本并在Xcode5上运行它并启动,但几秒钟后它崩溃了这个错误:

[UIDeviceRGBColor shadowOffset]: unrecognized selector sent to instance

我有一些像这样的tableviewcontroller行:

//[[UINavigationBar appearance] setShadowImage:[[UIImage alloc] init]];

但我评论他们都认为他们是问题。还有什么可能导致崩溃?

1 个答案:

答案 0 :(得分:0)

//do this to see if the selector exists replace dismissViewController... with your selector that you want to check
if ([self respondsToSelector:@selector(dismissViewControllerAnimated:completion:)])
        {[[self presentingViewController] dismissViewControllerAnimated:YES completion:nil];} //post-iOS6.0
else {[self dismissModalViewControllerAnimated:YES];} //pre-iOS6.0
相关问题