Created
November 9, 2014 17:17
-
-
Save QETHAN/cada24350dfb18e00eb2 to your computer and use it in GitHub Desktop.
swift storyboard segue
This file contains hidden or 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
import UIKit | |
class ViewController: UIViewController { | |
@IBOutlet weak var sc1: UISegmentedControl! | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
// Do any additional setup after loading the view, typically from a nib. | |
self.navigationItem.title = "Nav Controller" | |
} | |
override func didReceiveMemoryWarning() { | |
super.didReceiveMemoryWarning() | |
// Dispose of any resources that can be recreated. | |
} | |
override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) { | |
switch(segue.identifier!) { | |
case "detailsView": | |
var vc = segue.destinationViewController as? DetailsViewController | |
vc?.name = "Hello segue" | |
default: | |
return | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment