64bit - NSString stringWithFormat In Objective C getting EXC_BAD_ACCESS with iPad Pro & Xcode 8 -
i have used below function xcode 7.3, working fine ipad2 device getting exc_bad_access ipad pro, due 64 bit architecture far understanding
please suggest solution should correction can here ....
+ (nsstring *)stringwithformat:(nsstring *)format array:(nsarray*)arguments { nsrange range = nsmakerange(0, [arguments count]); nsmutabledata* data = [nsmutabledata datawithlength:sizeof(id) * [arguments count]]; [arguments getobjects:(__unsafe_unretained id *)data.mutablebytes range:range]; nsstring* result = [[nsstring alloc] initwithformat:format arguments:data.mutablebytes]; return result; }
Comments
Post a Comment