Upgrade to Pro — share decks privately, control downloads, hide ads and more …

画面遷移と私(iOS)

tokorom
July 14, 2015

 画面遷移と私(iOS)

画面遷移のときに値渡したりもらったりするところ、もっと簡単に書きたいよね!のアップデート。

tokorom

July 14, 2015
Tweet

More Decks by tokorom

Other Decks in Programming

Transcript

  1. Storyboard࣌୅ͷը໘ભҠ self.performSegueWithIdentifier("SelectItems", sender: nil) override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?)

    { switch segue.identifier { case: "SelectItems": if let selectVC = segue.destinationViewController as? SelectItemsViewController { selectVC.user = self.user } ભҠઌʹ஋Λ౉͢
  2. Storyboard࣌୅ͷը໘ભҠ @IBAction func unwind(segue: UIStoryboardSegue) { if let vc =

    segue.sourceViewController as? SelectitemVC { let item = vc.selectedItem } } ભҠઌ͔Β஋Λ΋Β͏