Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 Xcode 中,我尝试让 webview 中的所有链接在新的导航控制器视图中打开。这样我就可以将它添加到堆栈中。
新视图可以与旧视图完全相同,但只需要加载新链接。
在控制器中实现 UIWebViewDelegate。使用 ...
- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType { // Push here return NO; }
... 方法,以获取您接下来要推送的新 URL。