简体   繁体   中英

UIWebView from Navigation Bar button

Im having issue with button on a top right hand side of naviogation bar on iOS:

I have a button that can launch a app.html file from app itself and show on top of current view and That popup webview can be minimize with dDone button on it,

Im having issues doing this, How can i call UIWebView on top of current view and allow it to launch app.html page from app directory.

Currently i have:

- (BOOL)webView:(UIWebView *)webViewer shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType{


}

and this is a button that call that function

UIBarButtonItem *showAppMenu = [[UIBarButtonItem alloc] initWithTitle:@"Help" style:UIBarButtonItemStylePlain target:self action:@selector(webView)];

This is probably a good place to start, this will tell you what you need to know about loading an html file from a local source into a WebView:

load local HTML file when link is clicked in WebView

To Create the UIWebView object itself you might consider building it into your XIB file or storyboard so you can easily link it to an outlet rather than creating it via code.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM