简体   繁体   中英

How to debug iOS7 shadowOffset crash

My app works fine on ios6. I made a copy and ran it on Xcode5 and it launches but a few seconds later it crashes with this error:

[UIDeviceRGBColor shadowOffset]: unrecognized selector sent to instance

I had some tableviewcontroller lines like this:

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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