I have a segmentedbar control.
NSArray *optionsType = [NSArray arrayWithObjects: @"Geopoint", @"Directions", @" ", nil];
segmentedOption = [[UISegmentedControl alloc] initWithItems:optionsType] ;
I am using one of the segmented bar “Geopoint” to show a subview (geopointView)when pressed.
test = [segmentedOption titleForSegmentAtIndex: [segmentedOption selectedSegmentIndex]];
if([test isEqualToString:@"Geopoint"])
[self.view addsubview:geopointViw];
When necessity of that “subview” is over, it is removed from superview.
[geopointview removefromsuperview];
all of these changes are occurring on same viewController. But now since sagmented bar “geopoint” is already pressed, it wont function until another segmented bar is pressed.
Is there any way so that I can reset segmentedcontrol?
thanks for any help in advance
If you don’t want the segmented control to show the selected state, set,
This makes the segments to work as buttons.