Skip to content

Instantly share code, notes, and snippets.

@macbaszii
Created February 5, 2015 08:19
Show Gist options
  • Save macbaszii/d460f6b96ce3373b96ea to your computer and use it in GitHub Desktop.
Save macbaszii/d460f6b96ce3373b96ea to your computer and use it in GitHub Desktop.
@IBAction func touched(sender: AnyObject) {
if let button = sender as? Button {
button.setTitle("Touched", forState: .Normal)
}
}
@IBAction func touched(sender: AnyObject) {
if sender is UISegmentedControl {
let segmentedControl = sender as UISegmentedControl
let selectedIndex = segmentedControl.selectedSegmentIndex
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment