objective c - How to convert CFDataRef into NSData? -


How to convert to NFDATF in NSDT?

I have CFDTaf and I want to convert it to NSDAT. I do not have to do this

Anyone can help me ..

  CGDTP provider DATAprader = CGImageGetDataProvider (screenshot); CFDataRef data = CGDAPproduction data (Datacoprovider); CGDataProviderRelease (dataProvider); NSString * imagePathLocation = [destinationPath stringBapping stringing: [@ "/" stringbifting string: desktop image]]; [[NSFileManager default manager] createFileAtPath: imagePathLocation content: zero attributes: zero]; FileHandleForImage = [NSFileHandle File HandleForWritingAtPath: imagePathLocation]; NSDT * Data1 = (NSDT *) data; [FileHandleForImage Write Data: Data 1];  

When I typecast ( NSData * data1 = (NSData *) data ) this image gets corrupted.

This is a toll free bridge, so you have to enter it.

  NSDT * myData = (NSDT *) myCFDataRef;  

Comments