`
shappy1978
  • 浏览: 705666 次
  • 性别: Icon_minigender_1
  • 来自: 广州
社区版块
存档分类
最新评论

Deprecate on ->isa

 
阅读更多

After update to XCode 4.6(?), the place using

NSObject->isa

will raise a deprecated warning, we can change by

(int)object_getClass(handlerDelegate)

 

_delegateIsa = (int)NSClassFromString([[delegate_ class] description]);

//************************************************************************************

BTW, ARC weak has resolve the delegate release problem.

//************************************************************************************

 

//the following micro works also to remove the compile warning.

 

#pragma clang diagnostic push

#pragma clang diagnostic ignored "-Wdeprecated-objc-isa-usage"

    array->isa      = _JKArrayClass;

#pragma clang diagnostic pop

 

#pragma clang diagnostic push

#pragma clang diagnostic ignored "-Wdeprecated-declarations"

    deviceId = [UIDevice currentDevice].uniqueIdentifier;

#pragma clang diagnostic pop  

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics