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  

相关推荐