2014-01-14 117 views
1

我有一個應用程序與2視圖控制器。第一個包含一個webview。防止用UIWebView重新加載視圖

- (IBAction) showSecondView 
{ 
    UIViewController *view = [self.storyboard instantiateViewControllerWithIdentifier:@"SecondViewController"]; 
    [self presentModalViewController:view animated:YES]; 
} 

和回第一視圖:

SecondViewController *view = [self.storyboard instantiateViewControllerWithIdentifier:@"FirstViewController"]; 
    [self presentModalViewController:view animated:YES]; 

第一視圖被加載作爲第一次時,我通過IBAction爲導航到所述第二視圖。 我該如何防止第一個視圖重新加載?

+0

你的問題不清楚。 – trojanfoe

回答

0

你不會回頭,你只是提出再次提出第一個觀點。回到以前的視圖只是說明當前呈現的viewController:

[self dismissViewControllerAnimated:YES completion:nil]; 
+0

感謝您的快速回復!工作:) – Boeringer