Imported from the Apple Support Forums via the Wayback Machine 🔗
Thank guys.
Worked like a charm :o)
Adrian
0
Steve Patt·
Imported from the Apple Support Forums via the Wayback Machine 🔗
The problem is, if you want to (as I do in one application) act on a second (or subsequent) press AFTER that particular segment is already selected. Now there is no UIControlEventValueChanged generated. I have yet to find a solution.
Using touchesBegan:touches withEvent:event can detect touches elsewhere in the view (for example, the background), but it does not respond to a touch in the segmented control.
I suppose I need to subclass one of the methods of UIControl, but I'm wary of doing that.
0
appledave71·
Imported from the Apple Support Forums via the Wayback Machine 🔗
I have created a UISegmentedControl using IB and have assigned my function to the Value Changed event. My view loads properly, but as soon as I touch the control the app crashes. I have tried all the events listed in IB for that control and none of them appear to respond to a touch except for the Vallue Changed event. But that event leads to a crash. Has anyone setup a Segmented Control is IB and got it to do something when the buttons are pressed?
Right now all I'm trying to do is have it output to the NSLog which button is selected.
Thanks,
David
0
ektimo·
Imported from the Apple Support Forums via the Wayback Machine 🔗
I have the same issue. Any suggestion?
0
Scott Squires1·
Imported from the Apple Support Forums via the Wayback Machine 🔗
If it crashes it's not setup correctly.
Create -(IBAction)myAction:(id)sender; in .h file and method in .m file.
In iB set an IBAction for the control (control drag most likely to/from viewcontroller, where every you defined the above)