How to remove segment at index at 0 of UISegmentcontrol in iphone?
- by Warrior
I am able to remove the segment at index 1,2,3 etc but not able to remove the segment at index 0 .
[self readGroupFromDatabase];
NSLog(@"the current teble desc count value is %d",[tableDesc count]);---->0
if([tableDesc count]== 0){
[segemntedControl removeSegmentAtIndex:0 animated:NO];
}
i am getting this error :
*** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[NSCFArray objectAtIndex:]: index (-1( or possibly larger)) beyond bounds (5)'
Please help me out.Thanks.