Skip to content

Instantly share code, notes, and snippets.

@aGupieWare
Created November 6, 2014 21:45
Show Gist options
  • Select an option

  • Save aGupieWare/0f45caf5ae9a565b4177 to your computer and use it in GitHub Desktop.

Select an option

Save aGupieWare/0f45caf5ae9a565b4177 to your computer and use it in GitHub Desktop.
Swift client, prepare for segue snippet . . .
override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
var destViewController = segue.destinationViewController as PlumbingSupplyInventoryTableViewController
if segue.identifier == "plumbingTools" {
destViewController.title = "Plumbing Tools"
destViewController.inventoryUrlEndpoint = "http://localhost:8888/api/v1/plumbing_tools.json"
}
else if segue.identifier == "copperPipesAndFittings" {
destViewController.title = "Copper Pipes and Fittings"
destViewController.inventoryUrlEndpoint = "http://localhost:8888/api/v1/copper_pipes_and_fittings.json"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment