uiwebview

UIWebView not finishing loading?

泄露秘密 提交于 2019-11-30 20:08:10
问题 I have a webview in my application.It loads most of the pages and the function webViewDidFinishLoad gets called when the loading finishes.But some of the pages loading doesn't finish although the pages appears to be loaded. In these cases neither - (void)webViewDidFinishLoad:(UIWebView *)webView nor (void)webView:(UIWebView *)webView didFailLoadWithError is getting called. For eg: Go to the site http://www.mynevadacounty.com/ and when you click on any of the items such as mobile the page

Arabic TTF (TrueType font) in UIWebView iOS 4.2.1

ぐ巨炮叔叔 提交于 2019-11-30 19:18:36
问题 Hi I want to use custom arabic font in UIWebView, I read that iOS 4.2 onwards we can use TTF webfonts. I have arabic font in my resources and following is the code I am using: <html> <head> <title>@font-face Demo</title> <style type="text/css"> @font-face { font-family: 'me_quran Regular'; src: local('me_quran Regular'), local('me_quran'), url('me_quran.ttf') format('truetype'); } h1, p { font-family: 'me_quran Regular'; } h1 { font-size: 45px; } p { font-size: 18px; line-height: 27px; }

Using a custom NSURLProtocol with UIWebView and POST requests

两盒软妹~` 提交于 2019-11-30 19:01:15
In my iOS app, I'm using a UIWebView and a custom protocol (with my own NSURLProtocol implementation). I've been fairly careful about making sure that whenever I load a url, I load something like this into my UIWebView: myprotocol://myserver/mypath and in my NSURLProtocol implementation, I take a mutable copy of the NSURLRequest, convert the URL to http: and send that to my server. Everything works for HTTP GET requests. The problem I encounter is with POST requests. It seems like the UIWebView doesn't properly encode the form data in the HTTPBody if the request uses my custom protocol. One

iPhone UIWebView - Can auto complete be turned off on a input text field?

扶醉桌前 提交于 2019-11-30 18:26:41
I've searched high & low for an answer on this and I can't seem to find an answer or anybody else having the same issue. Hope some one can assist? I have a web page for signup which I'm viewing in an iPhone UIWebView. A user is asking if we can stop capitalization on the first letter of the email address being entered. I thought this didn't matter, but apparently it can for the local-part on some email systems (apparently it's only the domain that is only case insensitive). It seems autocomplete is the culprit. I've tried adding autocomplete="off" to the input element in the html, but iOS is

Programmatically logging in to website with saved username and password

丶灬走出姿态 提交于 2019-11-30 18:25:17
问题 One of the functions of an app I am making involves logging the user into our Campus Portal website. For ease of use, the user may enter a username and password into the app once, and it will be saved for all future log-ins. When the user clicks a button, the information will automatically be sent to log in, and the website will be displayed in a UIWebView . Let us say that the username and password are each stored in an NSString . How can I use this data to log in to this website

UIWebview enable cookies

有些话、适合烂在心里 提交于 2019-11-30 17:50:02
问题 I am trying to access a specific URL that requires cookies through UIWebView but I can not access it because cookies are disabled. So I did the following: Enabled cookies: NSHTTPCookieStorage *cookieStorage = [NSHTTPCookieStorage sharedHTTPCookieStorage]; [cookieStorage setCookieAcceptPolicy:NSHTTPCookieAcceptPolicyAlways]; Created NSURLConnection and extracted cookies from response: NSArray *cookies = [ NSHTTPCookie cookiesWithResponseHeaderFields: [ httpResponse allHeaderFields ] forURL

Xamarin iOS C# Open Links in Safari from UIWebView

久未见 提交于 2019-11-30 17:35:27
问题 I'm coding an iPhone app with a UIWebView, in Xamarin using C#. By default embedded links within the web view open a web page in that same web view. I would instead like them to launch the linked page in a new safari browser instance. This has been answered for objective C in X-Code but as far as I can see not for Xamarin C# webView.LoadHtmlString(html, new NSUrl(Const.ContentDirectory, true)); Thanks in advance Adam 回答1: If loading content into a UIWebView and you want to use Safari to open

iOS5: Exception on UIWebView in modal UIViewController playing Youtube video

懵懂的女人 提交于 2019-11-30 17:12:22
UPDATE: No longer occurs on iOS 6 beta 1 I am currently working on adapting an existing iOS 4 application with the new iOS 5 SDK. I found a new crash when presenting a UIWebView in a modal view controller that reads a Youtube video. Starting to read the video is fine, but when I try to set it in full screen, I get the following exception : Exception: UIViewControllerHierarchyInconsistency, child view controller:<UIViewController: 0x6aef180> should have parent view controller:<WebViewController: 0x6a706c0> but requested parent is:<MPInlineVideoViewController: 0x6ae5d40> Here is how I

How can I request a desktop version of a webpage using UIWebView in Swift 3.0?

最后都变了- 提交于 2019-11-30 17:07:11
Update Actually I tried to find it from other sources, but there is nowhere clear answer that will be working perfectly. (example : How to request the desktop version of a webpage in Swift 2 ) Please, help up. Provide the answer with the workable example. A WKWebView should solve your problem - you can define it in your code. Do this: var webView : WKWebView! override func loadView() { super.loadView() let config = WKWebViewConfiguration() webView = WKWebView(frame: self.view.frame, configuration: config) self.webView!.uiDelegate = self webView.customUserAgent = "Mozilla/5.0 (Macintosh; Intel

Pass a UIWebView request using prepareForSegue

假如想象 提交于 2019-11-30 16:29:02
I 'm new to IOS and Objective C. The scenario is I have 2 buttons, which open (with segue) 2 view controllers containing a UIWebview. I thought is better to do it with 1 UIWebView so I tried to pass the request object of the webvew and use only one webview controller. so I got the wwwBtn (UIButton that opens a site) and fbBtn (UIButton that goes to a Facebook URL) my viewController and the wwwWebViewController which contains th UIWebView. Here is how I did it. The viewController.h file : @interface ViewController : UIViewController { UIButton *wwwBtn; UIButton *fbButton; } @property (retain,