IOS开发过程常见警告解决方案归纳总结

1.        'UITextAlignmentCenter' isdeprecated: first deprecated in iOS 6.0

UITextAlignmentCenter改成NSTextAlignmentCenter,就不会出现这个提示了。而且一样是居中显示。

 

2.        modal segues are deprecated inios

这两个方法被废弃了,我们需要找到合适的方法来代替,这时候我们发现 show Present Modally 方法,这个一般可以满足我们的使用要求。

 

3.      unsupported configuration plain styleunsupported in a navigation item

IB上,如果你在bar button Item上添加了Round Rect Button 可能会出现这个错误,这是需要将 BarbuttonItem设置成:Bordered

 

4.      Minimum Font Size deprecated on ios version 6.0

An Alternative to the minimumFontSize isminimumScaleFactor. If you assign minimumFontSize/defaultFontSize tominimumScaleFactor, it works in the same way as minimumFontSize.

 

5.      修改JSONKit中的isa警告

在使用jsonkit时出现一个关于isa的警告,警告为:Direct access to objective-c`s isa is deprecated in favor ofobject_setClass() and object_getClass()。直接使用isa是被弃用的方法,推荐使用object_setClass()object_getClass()方法。如果要去掉这里的两个警告,我们只需要改为object_setClass(dictionary,_JKDictionaryClass)就可以了。

 

6.      Bitmasking for introspection of Objective-Cobject pointers i

某数字" & 0x1 的时候, 代表取最低位,改成:

 

BOOL  workAroundMacOSXABIBreakingBug = (JK_EXPECT_F(((NSUInteger)object) %2))  ? YES  : NO;即可。

 

7.      'isa' is deprecated

直接使用isa是被弃用的方法,推荐使用object_setClass()object_getClass()方法。如果要去掉这里的两个警告,我们只需要改为object_setClass(dictionary, _JKDictionaryClass)就可以了。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值