Crashing app when i want to go rootview from other view controller
Posted
by
Priyanka
on Stack Overflow
See other posts from Stack Overflow
or by Priyanka
Published on 2011-01-12T08:17:41Z
Indexed on
2011/01/12
8:53 UTC
Read the original article
Hit count: 185
iphone
Hello All,
I want to go Root view Controller from another view controller but i got the terminating error. following is the error message in console,
Terminating app due to uncaught exception 'NSRangeException', reason: '* -[NSCFArray removeObjectsInRange:]: index (4) beyond bounds (1)'
This is my code for that
NSArray *arr=self.navigationController.viewControllers; //ListOfInjuriesViewController *list=[[ListOfInjuriesViewController alloc]init]; [self.navigationController popToViewController:[arr objectAtIndex:2] animated:YES];
So any one can give me the suggestion on it so can remove the crash
© Stack Overflow or respective owner