Skip to content

Instantly share code, notes, and snippets.

@basememara
Last active April 5, 2016 12:02
Show Gist options
  • Save basememara/6839338664e96077f5997d390809d9b6 to your computer and use it in GitHub Desktop.
Save basememara/6839338664e96077f5997d390809d9b6 to your computer and use it in GitHub Desktop.
override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
guard let row = self.tableView.indexPathForSelectedRow?.row,
let identifier = segue.identifier else { return }
switch (identifier, segue.destinationViewController) {
case (SPPostDetailViewController.segueIdentifier, let controller as SPPostDetailViewController):
controller.model = models[row]
default: return
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment