Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 08-16-2010, 03:50 AM   #1 (permalink)
Registered Member
 
Join Date: Jul 2010
Posts: 9
mavster07 is on a distinguished road
Default UISegmentedControl - Responding to repeated touches

I am using a UISegmentedControl object in my UI and i have it responding to an IBAction when a specific segment is touched.

This then invokes another view controller and the user then presses a back button from there.

However, when it returns to the main screen where the segmented control is displayed, the selection the user made is still highlighted. The user can then select another segment but if they select the already selected segment, nothing happens.

1) How to reset the Segment control when it re-displays so nothing is selected ?


or


2) How to enable the segment control to respond to the same event if already selected ?

Suggestions appreciated !
mavster07 is offline   Reply With Quote
Old 08-16-2010, 11:18 AM   #2 (permalink)
almostfunnydev
iPhone Dev SDK Supporter
 
rocotilos's Avatar
 
Join Date: Oct 2009
Age: 34
Posts: 3,015
rocotilos is on a distinguished road
Default

Hi mavster07,

1) use mySegment.segmentedIndex = -1;

2) i dont really get the 2nd question.

Cheers.
rocotilos is offline   Reply With Quote
Old 08-16-2010, 07:31 PM   #3 (permalink)
Registered Member
 
Join Date: May 2010
Posts: 107
JDave is on a distinguished road
Default

For your second question do you mean:

Code:
mySegmentedControl.momentary = YES;
JDave is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 353
4 members and 349 guests
givensur, linkmx, Newbie123, PlutoPrime
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,657
Threads: 94,118
Posts: 402,894
Top Poster: BrianSlick (7,990)
Welcome to our newest member, jenniead38
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 12:48 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0