Database Reference
In-Depth Information
Open AttachPhotoViewController.swift and add the following method to the
class:
func imagePickerController(picker: UIImagePickerController ,
didFinishPickingMediaWithInfo info: NSDictionary ) {
if let note = note {
note. image = info[ UIImagePickerControllerOriginalImage ] as ? UIImage
}
self . navigationController ?. popViewControllerAnimated ( true )
}
This will populate the new image property of the note once the user selects
something from the standard image picker.
Open CreateNoteViewController.swift and replace viewDidAppear with the
following:
override func viewDidAppear(animated: Bool ) {
super . viewDidAppear (animated)
if let image = _note ?. image {
 
Search WWH ::




Custom Search