uiwebview

statusbar issue on UIWebView embedded YouTube video playback

牧云@^-^@ 提交于 2019-12-06 00:43:12
Playing youtube video as below: videoView = [[UIWebView alloc] initWithFrame:CGRectMake(10, 50, 300, 215)]; videoView.backgroundColor = [UIColor clearColor]; videoView.opaque = NO; videoView.delegate = self; [self.view addSubview:videoView]; NSURLRequest *loadRequest=[NSURLRequest requestWithURL:Your_Youtube_URL]; [videoView loadRequest:loadRequest]; Issue: Statusbar issue on UIWebView embedded YouTube video playback Steps to produce Status bar issue: When application orientation support is only Portrait. User click to play video on UIWebview embedded youtube video player Device open its

Scrolling a webpage inside UIWebView

泪湿孤枕 提交于 2019-12-06 00:42:31
问题 I have a UIWebView and UIButton added as subview to my View. I also have a large webpage displayed inside my UIWebView , is it possible to scroll the webpage by clicking a button on the UIView ? I want to make the webpage scroll untill it reaches the bottom of the document. The javascript to be used is : window.scrollTo(xPos, yPos); Is it possible to make a javascript call on the button action which will scroll the web document inside the UIWebView ? 回答1: You can use that on your UIWebview

How to play youtube video without UIWebView or detect video player when youtube video start playing using webview?

帅比萌擦擦* 提交于 2019-12-06 00:35:25
问题 I need to play youtube video in my iOS application and while video is playing I need to add an overlay on video. 1.Now how can i run youtube video in native player? 2.if I play video in UIWebview then how can i detect that video is playing and how to add overlay on the video? 回答1: MPMoviePlayerViewController cannot directly play youtube video urls.You need to extract the url before loading MPMoviePlayerViewController with the url. you can see a working demo in my github repo: Try this:: https

Stop the auto resize of the uiwebview web content when focus on input field

风格不统一 提交于 2019-12-05 23:07:16
I have a UIWebView with a html form in it. The problem is that when I tap on the input field, the UIWebView automatically zoom in to the area close to the input field with the keyboard shows up. However, when the input is done and the keyboard is hidden, the html content remains zoom in. Is there a way to stop this behavior or programmatically resize the content back to the original view? (it is already registered with the keyboard hide event) Thanks. Either set the font-size CSS property of the input to 16px or use a "viewport" meta tag with the user-scaling property (which disables user

iPhone - webViewDidFinishLoad not called

二次信任 提交于 2019-12-05 22:21:38
I have a simple View into IB that contains just a UIWebView and a UIButton. The webView is retained, connected, not nil, the delegate property os also connected, the Controller is UIWebViewDelegate compliant and set in the .h. in ViewDidLoad, I use [self.webView loadHTMLString:htmlContent baseURL:nil] ; The content loads, but webViewDidFinishLoad is never triggered, neither didFailLoadWithError , neither webViewDidStartLoad . How can I know when my content has finished loading , as it take a short time, but still a time to load (and I need to do things during that time on display, for an

Download and cache entire web page on ios

别说谁变了你拦得住时间么 提交于 2019-12-05 22:02:49
I need to download an entire webPage and store it in app's documents directory and load it from the cache the next time user visits. No matter how much I search, I always end up with ASIWebPageRequest ..!! even though, it works, its very old and deprecated.So I am looking for some alternatives. Another reason I am trying to avoid it is because .... It is a completely reimplemented URL loading system, based on very low level constructs (CFNetwork). So as Apple makes improvements to their high level libraries (NSURLConnection, NSCache) ASIHTTP doesn't get those advancements. Hence, I tried this

How do I change the height of a table cell that has already loaded?

狂风中的少年 提交于 2019-12-05 20:33:37
Currently I have webviews loading in customized uitableview cells. The problem is the web views have variable sizes. In webViewDidFinishLoad I am able to set the size of the web view based on the actual size of the html document just fine. My problem is the table cells which have already had their height set in heightForRowAtIndexPath before the web views having finished loading. How can I change the height of a table cell after it has already been loaded? Ideally I feel like I should be able to use some line of code like this. cellW.frame = cellW.cellWebView.frame; However I don't seem to

Why UIWebView Eating so many Memory?

白昼怎懂夜的黑 提交于 2019-12-05 20:24:11
I'm using a UIWebView to load a pure Text HTML page for my iPad app. The size of the HTMP page is only 40KB. But when I use the instrument to monitor the memory use for loading the UIWebView, I found down it consumes like 20MB memory, if I scroll the web view, the memory is even getting higher. Finally I get a level 1 memory warning. Could anyone help me with this? How could I reduce the memory for this? (I need to use the HTML to show the text here). NSString *htmlPath = [[NSBundle mainBundle] pathForResource:@"index" ofType:@"html" inDirectory:@"SPC"]; NSURL *url = [NSURL fileURLWithPath

About solution of offline mode for online HTML5 video system

◇◆丶佛笑我妖孽 提交于 2019-12-05 19:55:32
We have online website system with a lot of feature such as playback video etc. The purpose is that we want to make offline mode application for the iPad with UIWebView support. Two choices: Use HTML5 manifest to implement offline mode , here Download all content of HTML/JavaScripts/CSS and resources such as images/videos, then use UIWebView to load the HTML file For the solution 1, after searching we found a lot of problems such as cache limitation, not clear answer , 5MB ? 50 MB ? hard to control , HTML/CSS/JS files are okay, but for video etc, not stable live by session ... So we would give

UIWebView With PDF

 ̄綄美尐妖づ 提交于 2019-12-05 19:39:31
I'm displaying a PDF file using UIWebView , and I want to do 2 things: I want to make the page fit the phone screen without the user has to double tap to do that I want to remove the margin with gray shadow around the displayed PDF Thanks for helping I don't think this will help much, but I think your best option is to render the PDF to an image (of decent DPI) and show the image instead. I do this for an app, but we do that server side using ImageMagick - don't know how you might do that in obj-c. Also note that a mostly-text PDF will be much larger (filesize) when rasterized. However, you