"Illegal property type, c for appearance setter, _installAppearanceSwizzleForSetter:

来源:互联网 发布:电子键盘软件 编辑:程序博客网 时间:2024/06/05 16:55

Terminating app due to uncaught exception 'NSInvalidArgumentException'

"Illegal property type, c for appearance setter, _installAppearanceSwizzleForSetter: 

在iOS8下没问题,但到了iOS7一运行就crash。

之后找到原因,是因为这两行代码:

[objc] view plain copy
  1. [[UINavigationBar appearance] setTranslucent:NO]  
  2. [UITabBar appearance].translucent = NO;



这是一个很奇怪的问题,iOS7不支持这种写法(iOS8是没问题的)

@property(nonatomic,getter=isTranslucent)BOOL translucent NS_AVAILABLE_IOS(7_0);

官方文档iOS7还可以使用啊,我的支持系统就是iOS7.0的,不明所以...


阅读全文
1 0
原创粉丝点击