Created
October 8, 2014 23:41
-
-
Save willrichman/33512e460fbdaaae6913 to your computer and use it in GitHub Desktop.
Prepare for Segue
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
override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject!) { | |
if segue.identifier == "singleTweetSegue" { | |
var destination = segue.destinationViewController as SingleTweetViewController | |
var indexPath = tableView.indexPathForSelectedRow() | |
tableView.deselectRowAtIndexPath(indexPath!, animated: true) | |
var tweetToDisplay = self.tweets![indexPath!.row] as Tweet | |
destination.tweetShown = tweetToDisplay | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment