The Segment name is Entrada. I am doing like this:
override func viewDidLoad() {
super.viewDidLoad()
Entrada(sender: UISegmentedControl) {
setTitle("Action 1", forSegmentAtIndex: 0)
setTitle("Action 2", forSegmentAtIndex: 1)
setTitle("Action 3", forSegmentAtIndex: 2)
}
I get errors... thow.
Swift 3.0 use:
@IBOutlet weak var entrada : UISegmentedControl!
override func viewDidLoad() {
super.viewDidLoad()
entrada.setTitle("Action 1", forSegmentAt: 0)
entrada.setTitle("Action 2", forSegmentAt: 1)
entrada.setTitle("Action 3", forSegmentAt: 2)
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With