When I select any segment in segmentControll it doesnot show highlighted

Posted by rathodrc on Stack Overflow See other posts from Stack Overflow or by rathodrc
Published on 2011-03-19T07:45:38Z Indexed on 2011/03/19 8:09 UTC
Read the original article Hit count: 177

Filed under:
|
|
NSArray *itemArray = [NSArray arrayWithObjects:@"one", @"Two", @"Three", nil];
segmentControl = [[UISegmentedControl alloc] initWithItems:itemArray];
segmentControl.frame = CGRectMake(5, 5, 325, 35);
segmentControl.segmentedControlStyle = UISegmentedControlStyleBar;
segmentControl.tintColor = [UIColor blackColor];

[self changeUISegmentFont:segmentControl];
//[self.view addSubview:segmentControl];
self.navigationItem.titleView = segmentControl;
[segmentControl addTarget:self action:@selector(segmentAction:) forControlEvents:UIControlEventValueChanged];

This is my code of segment control and my problem is ..

When I select any segment it does not show me that that segment is selected.. I mean it is not shown highlighted..

can Anyone tell me what the problem is??

© Stack Overflow or respective owner

Related posts about iphone

Related posts about ios