How to go back to the original view using pop view controller
I have a button & when i click on button it moves to another view controller then there is a back button when i click on that it takes time to go开发者_运维问答 back
I am doing it like this
GeoNewsViewController*targetController=[[GeoNewsViewController alloc] init];
[self.navigationController pushViewController:targetController animated:YES];
-(void) viewWillDisappear:(BOOL)animated{
//remove unnecessary code here if u have
//if u use any webservice then cancel connection here
//stop any animations if
}
You can programatically go back with animation like this
[self.navigationController popViewControllerAnimated:YES];
精彩评论