iOS - Usage of NSData

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;
            }        

 

iOS - Usage of NSData,布布扣,bubuko.com

iOS - Usage of NSData

上一篇:Android悬浮窗实现 使用WindowManager


下一篇:Android NDK 环境搭建 + 测试例程