Created
April 7, 2018 14:57
-
-
Save 3257/624ff0447043fbcd22ce131fa25217b1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@IBAction func didTapSubmit(_ sender: UIButton) { | |
// Get properties for the unicorn-to-be-created | |
let addedBy = self.addedBy.text ?? "" | |
let seenAt = self.seenAt.text ?? "" | |
let unicorn = Unicorn(imagePath: storageImagePath, addedBy: addedBy, seenAt: seenAt) | |
// Create the unicorn and record it | |
writeUnicornToDatabase(unicorn) | |
// Return to Unicorns Table VC | |
navigationController?.popViewController(animated: true) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment