[已解决]iOS thread exc bad access code = 1 address = 0x6

在输出NSRange的时候报错,

thread exc bad access code = 1 address = 0x6

[已解决]iOS thread exc bad access code = 1 address = 0x6_第1张图片


解决办法:


输出不能直接输出,需要如下:

if (range.length > 0)
  NSLog(@"Range is: %@", NSStringFromRange(range));


你可能感兴趣的:(Object-c,TroubleShooting,开发中遇到的问题解决)