uiwebview

How to reload a UIWebView on HomeButton press

自古美人都是妖i 提交于 2019-12-13 04:31:47
问题 I want to reload a simple UIWebView I have loaded when the app opens and closes from the iPad Home Button. I've searched other questions, but none seem to fit as I don't want an extra button or Tab or something else in my app. I tried: - (void)viewDidAppear:(BOOL)animated { [super viewDidAppear:animated]; [webView reload]; } but this doesn't react. My initialization code is in a controller derived from UIViewController and the UIwebview is initialized in - (void)viewDidLoad Any clue how to do

UIWebView on UITableView prevents tablecell Selection

回眸只為那壹抹淺笑 提交于 2019-12-13 04:27:53
问题 I have a UIWebView on my tablecells. There are large content and it should be scrollable. But the webview prevents Tableview didselect delegate. How to overcome this. Ihf I make userinteractionenabled=NO; scrolling is not working. Any solution please help. Thanks in advance. 回答1: Try using the override of hitTest - (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event { id hitView = [super hitTest:point withEvent:event]; if (hitView == self) { return nil; } else { return hitView; } }

UIWebView and touch event

与世无争的帅哥 提交于 2019-12-13 04:13:09
问题 I want use a custom touch event in a view. There is a web view which is the subview of this view. I override touchBegan and other functions but it does not run. 回答1: If you want to call a function while tapping a view you can use UITapGestureRecognizer override func viewDidLoad() { super.viewDidLoad() let tapRecognizer = UITapGestureRecognizer(target: view, action: "handleSingleTap:") tapRecognizer.numberOfTapsRequired = 1 self.view.addGestureRecognizer(tapRecognizer) } func handleSingleTap

Ionic InAppBrowser not working on ios UIWebView

这一生的挚爱 提交于 2019-12-13 03:41:53
问题 In my Ionic3 application I am using Ionic InAppBrowser for dropbox user authentication process. In this process dropbox returning login form in InAppBrowser which has two field email and password and other submit and login with google button. But when I click or try to focus on any of that input field, page is automatically refreshing and I am not able to enter login information. This issue is only occurs if i use UIWebView for my application. If I upgrade my UIWebView to WKWebView, it's

UIWebview: open certain links in safari (not all)

爷,独闯天下 提交于 2019-12-13 03:41:50
问题 I have a webpage in uiwebview.. On this page are a couple of http:// links. One of them I want to have it opened in safari. The rest can open in UIWebview. I used this code so far; - (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType; { NSURL *requestURL = [ [ request URL ] retain ]; // Check to see what protocol/scheme the requested URL is. if ( ( [ [ requestURL scheme ] isEqualToString: @"http" ] || [

UIWebView doesn't scroll to the bottom of the webpage loaded/created

好久不见. 提交于 2019-12-13 03:32:39
问题 I have a UIWebView inside a normal UIViewController. The content of the UIWebView is programming/dynamically created in my program, and it could be very long (multiple table rows). Somehow, after loading, the page won't scroll more then one and half screen of content when swipe on the screen. Because of that I can only see the beginning few rows of data, but not the many others after them. Why is that? 回答1: If you can't scroll to the bottom end properly using UIWebView : 1) One way

UIWebView paging / line cut off

痴心易碎 提交于 2019-12-13 03:28:52
问题 I am trying to page a webpage, so disable scrolling, then the second page is the same webpage scrolled down the page height. The problem I have is that the bottom of the first page often has 1/2 a line of text, then the second page has the bottom half of the line. Is there a way to ensure the entire line falls on one of the pages? Similar to Stanza etc? Thanks 回答1: You have to paginate the web page into blocks that match the height of the UIWebView. If you cannot do that manually, or you want

iOS UIWebView popup blocker issue

爷,独闯天下 提交于 2019-12-13 02:20:37
问题 In iOS, the default behavior when I open my webpage is that after login it opens the next page in a new window. But now when I open it in iOS webview, it does not open the next page. I google about it, and the cause seems to be the popup blocker. So, is there any simple way to disable the popup blocker in the iOS webview? 回答1: The webpage might have a redirection that you are not handling properly. You may first want to use webView:didFailNavigation:withError: or webView

scalesPageToFit for webView is not working with iOS 9.3

馋奶兔 提交于 2019-12-13 02:20:07
问题 I have UIWebview in storyboard, I am loading HTML pages inside the view. till iOS 9.2 it is working great as desire, but when i am running same in iOS 9.3 the page is appeared with zoom in by default. I have set scalesPageToFit property. self.webView.scalesPageToFit=TRUE; I have too tried setting frame programatically for UIWebview. This are my Meta tag from HTML.. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="language" content="en" /> <meta name="viewport"

UIWebView + custom javascript object

落爺英雄遲暮 提交于 2019-12-13 02:17:32
问题 I'm using a UIWebView with local jquery and a script that defines a function, like this: function myFunc() { var myVar; function info() { alert('info'); } } What I cannot accomplish is such a simple task: var myfunc = new myFunc(); myfunc.info(); in the UIWebView. How can I instantiate a new object and call a function of that object by using: [webViewObject stringByEvaluatingJavaScriptFromString:@"myfunc.info();"]; I'm struggling about this. 回答1: Just solved. Is sufficient to implement the