How to remove segment at index at 0 of UISegmentcontrol in iphone?
Posted
by Warrior
on Stack Overflow
See other posts from Stack Overflow
or by Warrior
Published on 2010-06-17T21:28:21Z
Indexed on
2010/06/17
21:43 UTC
Read the original article
Hit count: 199
iphone
|uisegmentedcontrol
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.
© Stack Overflow or respective owner