iOS6.0下奇怪的_UIRecordArgumentOfInvocationAtIndex异常

遇到的问题:

以下两种定制化UIBarButtonItem的代码在iOS7下没有问题:

[[UIBarButtonItem appearanceWhenContainedIn:[UINavigationBar class], nil] setTitleTextAttributes:@{NSForegroundColorAttributeName :[UIColor darkGrayColor]} forState:UIControlStateNormal];
[[UIBarButtonItem appearanceWhenContainedIn:[UINavigationBar class], nil] setTitleTextAttributes:@{@
“UITextAttributeTextColor”:[UIColor darkGrayColor]} forState:UIControlStateNormal];


但是在iOS下打开一些系统自带的ViewController(例如预览pdf的QLPreviewController)的情况下遇到_UIRecordArgumentOfInvocationAtIndex异常。参照*中类似情况的帖子,原来这应该是iOS SDK的一个Bug.以下简单的改动就可以帮你解决问题,也许这种小插曲也是编程乐趣的一部分。 iOS6.0下奇怪的_UIRecordArgumentOfInvocationAtIndex异常

解决方法:

使用以下方式后问题就解决了:

[[UIBarButtonItem appearanceWhenContainedIn:[UINavigationBar class], nil] setTitleTextAttributes:@{UITextAttributeTextColor:[UIColor darkGrayColor]} forState:UIControlStateNormal];

参照网址:

http://*.com/questions/14125378/uiappearence-support-for-ios-6-unexpected-results

http://*.com/questions/19863972/mfmailcomposeviewcontroller-crashes-because-of-global-appearance-properties-on-i

http://*.com/questions/22489828/adbannerview-crashes-app-when-it-is-clicked

http://*.com/questions/12567708/monotouch-ios-6-crash-when-using-mfmailcomposeviewcontroller

iOS6.0下奇怪的_UIRecordArgumentOfInvocationAtIndex异常,布布扣,bubuko.com

iOS6.0下奇怪的_UIRecordArgumentOfInvocationAtIndex异常

上一篇:使用“ create-react-app my-app”命令 ,package.json中缺少依赖项


下一篇:AndroidManifest 属性解析以及 代码动态获取属性值