码迷,mamicode.com
首页 > 移动开发 > 详细

iOS - Usage of NSData

时间:2014-07-06 20:28:23      阅读:224      评论:0      收藏:0      [点我收藏+]

标签:style   blog   http   color   os   art   

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

标签:style   blog   http   color   os   art   

原文地址:http://www.cnblogs.com/mantian/p/3824792.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!