I select a photo from PhotoLibrary and How can I achieve below tasks
In this case, I am using Swift. I need to reconstruct the image in the next VC either thru :
Use the imagePickerController didFinishPickingImage instead:
1 & 2)
// Class variable
var image: UIImage?
...
func imagePickerController(picker: UIImagePickerController, didFinishPickingImage image: UIImage!, editingInfo: [NSObject : AnyObject]!) {
self.image = image
picker.dismissViewControllerAnimated(true, completion: { (finished) -> Void in
// Perform your segue to your next VC
})
}
override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
// One of the two segue.destinationViewController.isKindOfClass(YourDestinationViewController) {
if segue.identifier == "Your Destination View Controller Identifier" {
let destinationViewController = segue.destinationViewController as! YourDestinationViewController
destinationViewController.image = self.image
}
}
3)
image.size.height
image.size.width