On 2009-11-26, at 2:04 PM, Pierre Berloquin wrote: > Hi > > I'm using a segmented control with four segments. > I initialise it with four images. > It does display the images perfectly but ... it doesn't show which image is > selected. > How can I highlight the selected segment/image? > Should I provide two images for each segment? But how? > > Thanks > Pierre
I would use a different image for every state. in your action handler - (IBAction)segControlClicked:(id)sender { int clickedSegment = [sender selectedSegment]; int clickedSegmentTag = [[sender cell] tagForSegment:clickedSegment]; // replace your image here [segControl setImage:[your image] forSegment:clickedSegment]; // do not forget to manage the images of the not clicked segments back to original. } regards. Sandro Noel. _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com