I need to pass a image from one view controller to another I had user NSuserdefault to declare the image variable as global but it shows this error app due to uncaught exception 'NSInvalidArgumentException', reason: 'Attempt to insert non-property list object
func imagePickerController(picker: UIImagePickerController!, didFinishPickingImage image: UIImage!, editingInfo: NSDictionary!) {
self.dismissViewControllerAnimated(true, completion: { () -> Void in
})
imageview.image = image
NSUserDefaults.standardUserDefaults().setObject(image, forKey:"image")
NSUserDefaults.standardUserDefaults().synchronize()
}