segment Control swift

@IBAction func segC(_ sender: Any) {

if segmentC.selectedSegmentIndex == 0 {
label.text = "Hello"
}
if segmentC.selectedSegmentIndex == 1 {
label.text = "Welcome"
}
if segmentC.selectedSegmentIndex == 2 {
label.text = "Go"
}


}
Previous
Next Post »