Skip to content

Instantly share code, notes, and snippets.

@hellyeah
Created December 2, 2015 15:34
Show Gist options
  • Save hellyeah/c7540f5f26fee33d89e7 to your computer and use it in GitHub Desktop.
Save hellyeah/c7540f5f26fee33d89e7 to your computer and use it in GitHub Desktop.
let twentyDollars = UIAlertAction(title: "$20", style: .Default, handler: {
(alert: UIAlertAction!) -> Void in
//poss do asyc funcs? idk how to code that but it would give the vc time to initialize and find current loc & render map
let vc = self.mainStoryboard.instantiateViewControllerWithIdentifier("MapViewController") as! MapViewController
self.presentViewController(loadingAlert, animated: true, completion: {() -> Void in
sleep(2)
self.dismissViewControllerAnimated(true, completion: {() -> Void in
self.showViewController(vc, sender: self)})
print("20 Selected")
})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment