iOS - Usage of NSData
时间:2014-07-06 20:28:23
收藏:0
阅读:224
Reference link : https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/BinaryData/Tasks/WorkingBinaryData.html
1. create NSData, here msgData is also a NSData:
const Byte * data = (const Byte *)[msgData bytes]; heartbeat.rawData = [NSData dataWithBytes: data length: [msgData length]];
2. Compare two NSData
// if value not changed if([model.rawData isEqualToData:(NSData*)msgData]) { return FALSE; }
评论(0)