convert UIImage to NSData

Try one of the following, depending on your image format: UIImageJPEGRepresentation Returns the data for the specified image in JPEG format. NSData * UIImageJPEGRepresentation ( UIImage *image, CGFloat compressionQuality ); UIImagePNGRepresentation Returns the data for the specified image in PNG format NSData * UIImagePNGRepresentation ( UIImage *image ); Here the docs. EDIT: if you want … Read more

Why doesn’t Objective-C support private methods?

The answer is… well… simple. Simplicity and consistency, in fact. Objective-C is purely dynamic at the moment of method dispatch. In particular, every method dispatch goes through the exact same dynamic method resolution point as every other method dispatch. At runtime, every method implementation has the exact same exposure and all of the APIs provided … Read more

iOS 8 Snapshotting a view that has not been rendered results in an empty snapshot

I’m pretty sure this is just a bug in iOS 8.0. It’s reproducible with the simplest of POC apps that does nothing more than attempt to present a UIImagePickerController like you’re doing above. Furthermore, there’s no alternative pattern to displaying the image picker/camera, to my knowledge. You can even download Apple’s Using UIImagePickerController sample app, … Read more