2011-07-29 64 views
0

我有一個按鈕&當我點擊按鈕它移動到另一個視圖控制器,然後有一個後退按鈕,當我點擊它,它需要時間回去如何返回到原始視圖使用彈出視圖控制器

我做它像這樣

GeoNewsViewController*targetController=[[GeoNewsViewController alloc] init]; 
[self.navigationController pushViewController:targetController animated:YES]; 

回答

4
-(void) viewWillDisappear:(BOOL)animated{ 

    //remove unnecessary code here if u have 

    //if u use any webservice then cancel connection here 

    //stop any animations if 

} 

您可以通過編程回去動畫這樣

 [self.navigationController popViewControllerAnimated:YES]; 
相關問題