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 に答える