0

我的应用在 ios6 上运行良好。我制作了一个副本并在 Xcode5 上运行它并启动但几秒钟后它因以下错误而崩溃:

[UIDeviceRGBColor shadowOffset]: unrecognized selector sent to instance

我有一些这样的 tableviewcontroller 行:

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

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

4

1 回答 1

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
于 2013-09-12T19:35:48.047 回答