uiwebview

How to implement touch events in uiwebview?

倾然丶 夕夏残阳落幕 提交于 2019-12-21 19:56:55
问题 I have tried various solutions provided on this site and others to implement touch events on uiwebview. But still I am not able to do this. Actually, i have created a article reader application. Here, I have added a uiwebview on the normal uiview. Now, I want to trace some user touch events on that particular webview. When I do this on normal view, it works perfectly. But if I try it on webview. it stops working. The solutions I tried before are implementing touch methods like touchbegan

How show activity-indicator when press button for upload next view or webview?

我的未来我决定 提交于 2019-12-21 19:28:10
问题 when i click on button which title is click here to enlarge then i want show activity indicator on the first view and remove when load this view. but i go back then it show activity indicator which is shown in this view. in first vie .m file i have use this code for action. -(IBAction)btnSelected:(id)sender{ UIButton *button = (UIButton *)sender; int whichButton = button.tag; NSLog(@"Current TAG: %i", whichButton); UIActivityIndicatorView *spinner = [[UIActivityIndicatorView alloc]

Listen to all requests from UIWebView

北战南征 提交于 2019-12-21 17:44:57
问题 I can intercept the initial load request from a UIWebView with: (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType. How do I log all the requests from the page I'm loading? 回答1: Update: Another option is to use NSURLProtocol to hear requests the application makes, including all the ones from the web view. I will suggest a creative solution. This is not really what you want, but since that is not really

How to open a UITextView URL in UI Web View?

自古美人都是妖i 提交于 2019-12-21 16:58:43
问题 In my iPhone app an UITextView is containing an URL. I want to open this URL in an UIWebView instead of opening it into safari? My UITextView contains some data along with an URL. In some cases the no. of URLs can be more than one. Thanks Sandy 回答1: Assuming you have the following instances, that are also added to your UIView: UITextView *textView; UIWebView *webView; and textView contains the URL string, you can load the contents of the URL into webView, as follows: NSURL *url = [NSURL

Resizing text in UIWebView - Swift 3

血红的双手。 提交于 2019-12-21 16:53:18
问题 I having a problem, resizing text within a UIWebView , the html file is located within the bundle. I have managed to get a modified script to work within obj-c , however using swift 3 there is no change to the text size, although the optimal value changes correctly at each click of the button . Here is the code - import UIKit class ViewController: UIViewController { @IBOutlet var resWebView: UIWebView! @IBOutlet weak var increaseFont: UIBarButtonItem! @IBOutlet weak var decreaseFont:

How do I pass login information to a website from UIWebView directly without any need of logging in once again?

三世轮回 提交于 2019-12-21 12:46:05
问题 I want to open some website in my iphone app using UIWebView. The website requires username and password and I have these username and password. I was wondering is there anyway I can open the website in my UIWebView without any login screen? I mean as I already have the username and password, can I use this information to log in to website automatically and show the required necessary page onto my UIWebView iphone app. I just want to get rid of logging to website as users have already entered

Android: how to add custom soft keyboard when form field is selected in WebView

流过昼夜 提交于 2019-12-21 12:22:07
问题 I am using WebView to present UI. Is there any way that I can trigger custom soft keyboard when input text form field is selected? 回答1: I just encounter a similar problem with the android WebView. When I select, in touch mode, a text input field, it does not pop-up the virtual keyboard whereas with the trackball it works fine. I just found there: http://groups.google.com/group/android-developers/browse_thread/thread/e52109afda599301/b4cbc16e4e9e8e0d (last message from alien9) that calling

Xcode 7 UIWebView doesn't load url

浪子不回头ぞ 提交于 2019-12-21 12:12:22
问题 I use UIWebView in my app and it all worked fine in Xcode4,5,6 simulator. but not for Xcode 7 simulator, I don't know why, there is no warning or error in simulator, and the screen is just showing blank page. Please help me. Thanks. #import "IndexViewController.h" @interface IndexViewController () @end @implementation IndexViewController - (void)viewDidLoad { [super viewDidLoad]; NSString *urlString = nil; NSString *languageCode = [[NSLocale preferredLanguages] objectAtIndex:0]; if (

WKWebView blank after 'successful' HTTPS NSURLRequest

旧城冷巷雨未停 提交于 2019-12-21 11:03:18
问题 I have created a NSURLRequest (HTTPS) The delegate callbacks for the WKWebView come back with success, no error. 'decidePolicyForNavigationAction' is provided with the Allow Enum in the decision handler @available(iOS 8.0, *) func webView(webView: WKWebView, decidePolicyForNavigationAction navigationAction: WKNavigationAction, decisionHandler: (WKNavigationActionPolicy) -> Void) { decisionHandler(.Allow) } and the didReceiveAuthChallenge is handled as such: @available(iOS 8.0, *) func webView

iOS 5 and iOS 6 - UIWebView difference in behaviour

假如想象 提交于 2019-12-21 10:49:15
问题 I am testing some HTML code on UIWebView . And am also wishing to support both iOS 5.x and iOS 6.x. But there seems to be a problem about font size associated with iOS 6.x only. That is, under rotation, iOS 5.x would make fonts slightly smaller when changing to portrait from landscape mode (which is desirable, since portrait's width is shorter). However, UIWebView in iOS 6.x would do just the opposite. The problem does not come up when the same HTML code is rendered in iOS Safari (both 5.x