iOS 之各种Crash
1.*** Terminating app due to uncaught exception 'CALayerInvalidGeometry', reason: 'CALayer position contains NaN: [nan 135]'
2.-[_NSInlineData objectForKeyedSubscript:]: unrecognized selector sent to instance 0x13dabd600
原因:
By default AFNetworking will parse your JSON for you. AFHTTPResponseSerializer will just give you an NSData object as responseObject
解决:
remove:
manager.responseSerializer=[AFHTTPResponseSerializer serializer];
or
manager.responseSerializer.acceptableContentTypes = [NSSet setWithObjects:@"text/plain", @"text/html",@"application/javascript",@"application/json", nil];