uiwebview

How to call a JavaScript function which returns an HTML string in body using Swift webView?

梦想与她 提交于 2020-01-17 12:43:46
问题 I have an HTML file which is generated after calling a JavaScript fucntion in the body. I need to remove the JavaScript call from the HTML and call it from my Swift using webView delegates. I tried using stringByevaluatingJavaScript but it doesn't work. I am adding the HTML file which has a JavaScript function in it. <!DOCTYPE html> <html> <head> <title>Complete Blood Count</title> <link href="https://www.fontify.me/wf/4dae5b9279578bbce15473cde2ae897f" rel="stylesheet" type="text/css"> <style

How to call a JavaScript function which returns an HTML string in body using Swift webView?

不问归期 提交于 2020-01-17 12:42:41
问题 I have an HTML file which is generated after calling a JavaScript fucntion in the body. I need to remove the JavaScript call from the HTML and call it from my Swift using webView delegates. I tried using stringByevaluatingJavaScript but it doesn't work. I am adding the HTML file which has a JavaScript function in it. <!DOCTYPE html> <html> <head> <title>Complete Blood Count</title> <link href="https://www.fontify.me/wf/4dae5b9279578bbce15473cde2ae897f" rel="stylesheet" type="text/css"> <style

Cookies don´t keep user logged in in swift3

蹲街弑〆低调 提交于 2020-01-17 06:52:30
问题 I have this simple application with a UIWebView, but I can not use the cookies to store the loggin or keep the user logged. I open the application, I log in, I close the application, and when I open it again the login fields are blank. I would like at least that the user and password were filled based on cookies this is the code from viewController.swift import UIKit class ViewController: UIViewController { @IBOutlet var myWebView: UIWebView! override func viewDidLoad() { super.viewDidLoad()

My iframe does not work with a UIWebView

我的未来我决定 提交于 2020-01-17 06:49:11
问题 I have tested my iframe everywhere and it works very well, but on iOS in Objective-C , it does not work on UIWebView , here is my code, can someone help me? Thanks self.webView.scrollView.scrollEnabled = NO; NSString *Str = [NSString stringWithFormat:@"<iframe frameborder=\"0\" width=\"359\" height=\"200\" src=\"//www.dailymotion.com/embed/video/%@\" allowfullscreen></iframe>", identifier]; [_webView loadHTMLString:Str baseURL:nil]; My iframe : <iframe frameborder="0" width="359" height="200"

Highlite Select Text in UIWebview

倾然丶 夕夏残阳落幕 提交于 2020-01-16 18:36:31
问题 i want to Select text using gesture and highlite that text.i had done display html page in UIwebview but uiwebview does not fire touch begin event, So how can i do. 1) when user select text (i.e user select text "i Know uesr" that part of text color should be change. if you have any idea below of the query,kindly suggest me.. Thank you Milan 回答1: If you look at the docs for a UIWebView, you know your options are limited. You're going to have do it with javascript. Your only weapon is -

Highlite Select Text in UIWebview

谁说胖子不能爱 提交于 2020-01-16 18:35:21
问题 i want to Select text using gesture and highlite that text.i had done display html page in UIwebview but uiwebview does not fire touch begin event, So how can i do. 1) when user select text (i.e user select text "i Know uesr" that part of text color should be change. if you have any idea below of the query,kindly suggest me.. Thank you Milan 回答1: If you look at the docs for a UIWebView, you know your options are limited. You're going to have do it with javascript. Your only weapon is -

How do I reload or refresh a webview

ε祈祈猫儿з 提交于 2020-01-16 08:05:30
问题 ... with a button outside of the uiwebview? please see screenshot attached. the thing is, that I have a local html site in the webview, that goes to further local web sites. I want the user to be able to get back to the "home page" of the local website by clicking on the "home" button on the top, which is not part of the uiwebview. (my xcode status is beginner.) thanks for help. 回答1: You can refresh the webview by calling loadRequest method under the UIWebView class. [webView loadRequest:

Release memory/cookie/cache from UIWebView once closed

倾然丶 夕夏残阳落幕 提交于 2020-01-16 07:42:11
问题 I have a UIViewController which contains a UIWebView . i login to a website for say facebook using the UIWebview in the UIViewController then i click on done, which dismiss the view controller, which i suppose will release the view controller. but when i open the UIWebview again (without exiting the app and also even after terminating the app) the webpage is still log into Facebook after the web view loads. How should i release the web view so that every time i click on done and return back

Watching Vimeo videos in UIWebView on iOS

依然范特西╮ 提交于 2020-01-16 05:37:11
问题 I have an app with a UIWebView that I'm trying to view Vimeo videos in. If i hard link it to www.vimeo.com, the vimeo home page and the list of videos loads, however, when clicked only sound plays. If i hop into mobile safari and go to www.vimeo.com, it all looks the same, but the video plays in full screen mode here. I am trying to have my UIWebView act the same way. What am I missing? I have checked this across multiple devices and versions of iOS all with the same results. Thanks UPDATE:

video content on iPhone Safari/UIWebView

梦想的初衷 提交于 2020-01-15 12:08:21
问题 In my application I have a UIWebView that is able to play Youtube videos normally, but I'd like to play some videos from a website other than Youtube. If i try to play those videos in the iPhone Safari browser it opens in the same way that YouTube videos (fullscreen mode, showing the player), but that doesn't happen in the UIWebView inside my application. As an example, consider the following URL: http://m.video.globo.com/#video.php?id=1174097 (don't forget to open it in the simulator) I didn