首页 > 移动平台 > 详细

iOS6.0下奇怪的_UIRecordArgumentOfInvocationAtIndex异常

时间:2014-03-21 23:46:10      阅读:737      评论:0      收藏:0      [点我收藏+]

遇到的问题:

以下两种定制化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异常。参照StackOverflow中类似情况的帖子,原来这应该是iOS SDK的一个Bug.以下简单的改动就可以帮你解决问题,也许这种小插曲也是编程乐趣的一部分。 bubuko.com,布布扣

解决方法:

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

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

参照网址:

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

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

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

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

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

iOS6.0下奇怪的_UIRecordArgumentOfInvocationAtIndex异常

原文:http://blog.csdn.net/missautumn/article/details/21746601

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!