I'm trying to pass an Image from one view to another and my code doesn't seem to be working- it takes the user to the new view but the image isn't transferred over as well. Any help would be greatly appreciated!
So, here's a button called Post that takes the user to a new view.
@IBAction func postButton(sender: AnyObject) {
performSegueWithIdentifier("toBrowsePage", sender: nil)
}
Then, in another file for the other view controller...
override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
if segue.identifier == "toBrowsePage" {
var itemToAdd = segue.destinationViewController as! ListPage
itemToAdd.postingImage.image = browsingImage.image
}
}