views:

34

answers:

0

Hi Guys,

I have one problem :I have UISegmentedControl with three indexes 0,1,2. when i select the index of UISegmentedControl it is working fine but I need to have multiple touches and it should be focued How it can be achieved. how can be programed for Tapping the selected index again and it should work...

     NSArray *segmentTextContent = [NSArray arrayWithObjects: allString, favoritesString,filterString, nil];
segmentedControl = [[UISegmentedControl alloc] initWithItems:segmentTextContent];
[segmentedControl setFrame:CGRectMake(60,10,200,30)];
[segmentedControl addTarget:self action:@selector(segmentAction:) forControlEvents:UIControlEventValueChanged];
//segmentedControl.momentary = YES;

segmentedControl.segmentedControlStyle = UISegmentedControlStyleBar;
segmentedControl.tintColor=[UIColor colorWithRed:36/255.0 green:61/255.0 blue:103/255.0 alpha:1];
segmentedControl.selectedSegmentIndex =0;
[toolBar1 addSubview:segmentedControl];