2014-01-14 120 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