Hi I stucked while designing UISegmentControl programmatically in swift 3.0 with adding target, please help me for this.
Asked
Active
Viewed 2.4k times
8
-
OK. If you are not able to launch your app now or it crashed please provide some code. Nobody knows about your problem with UISegmentControl. – Roman Podymov Mar 23 '17 at 11:49
-
Actually i tried this objective c code and convert it into swift3.0 but not working segmentedControl = UISegmentedControl (items: ["First","Second","Third"]) segmentedControl.frame = CGRectMake(60, 250,200, 30) segmentedControl.selectedSegmentIndex = 0 segmentedControl.addTarget(self, action: "segmentedControlAction:", forControlEvents: .ValueChanged) self.view.addSubview(segmentedControl) – Shital Mar 23 '17 at 11:53