简体   繁体   English

如何调试iOS7 shadowOffset崩溃

[英]How to debug iOS7 shadowOffset crash

My app works fine on ios6. 我的应用程序在ios6上运行良好。 I made a copy and ran it on Xcode5 and it launches but a few seconds later it crashes with this error: 我制作了一个副本,并在Xcode5上运行了它,它启动了,但是几秒钟后,它因该错误而崩溃:

[UIDeviceRGBColor shadowOffset]: unrecognized selector sent to instance

I had some tableviewcontroller lines like this: 我有一些像这样的tableviewcontroller行:

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

but I commented them all out thinking they were the issue. 但是我全都以为是问题,对此他们全都发表了评论。 What else could be causing the crash? 还有什么可能导致坠机?

//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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM