uiwebview

iOS 8.0 UIWebView file input crashes my App

不羁的心 提交于 2019-12-18 16:51:38
问题 After updating to iOS 8.0 clicking the "Choose file" button (HTML file input) and then clicking "Take photo or Video" / "Choose Existing" crashes my App. This functionality has been working perfectly fine since iOS 6 but in iOS 8.0 the file input functionality is completely broken! Do any one else experience the same problem with there UIWebView Apps? 回答1: The solution to this problem is as Joel Jeske writes, you have to rebuild your App against iOS 8. This is the only solution to this

Playing videos in UIWebView broken in iOS4?

风格不统一 提交于 2019-12-18 16:31:27
问题 I have an app that's worked since version 2.0 of the SDK where I create and add a UIWebView and then load the URL of an .mov to play a movie. Ever since the early version of the 4.0 beta up until the 4.0 GM this has stopped working. When I load a movie now I get the following error: :Plug-in handled load" and the movie never displays. Is this a known issue? Am I doing something wrong in 4.0? 回答1: I figured this out. It appears to be an issue with iOS4 not being backward compatible with a

Detect window.open() from UIWebView

岁酱吖の 提交于 2019-12-18 16:10:52
问题 Short question: Is it possible to detect window.open() in a UIWebView using the UIWebViewDelegate or is there another way to reach this? I need the the url when a window.open() -Event is fired to show a UIAlertView . 回答1: You need to overwrite window.open() using JavaScript: [webView stringByEvaluatingJavaScriptFromString:@"window.open = function (open) { return function (url, name, features) { window.location.href = url; return window; }; } (window.open);"]; 回答2: Try using this delegate

Detect window.open() from UIWebView

孤人 提交于 2019-12-18 16:09:16
问题 Short question: Is it possible to detect window.open() in a UIWebView using the UIWebViewDelegate or is there another way to reach this? I need the the url when a window.open() -Event is fired to show a UIAlertView . 回答1: You need to overwrite window.open() using JavaScript: [webView stringByEvaluatingJavaScriptFromString:@"window.open = function (open) { return function (url, name, features) { window.location.href = url; return window; }; } (window.open);"]; 回答2: Try using this delegate

Creating webViews programmatically in Swift

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-18 15:06:13
问题 I want to create something like an image gallery in my ViewController. For this, I'd need multiple webViews, depending on the number of images that I get from a JSON request. How can I insert new webViews if I need to? As you can see in the above image, I have a scrollView and one UIWebView inside of the ViewController. How would I create a new webView inside of the first(second, third, etc.) if necessary? Is it possible? 回答1: you can create the web view programatically as simple as possible

Creating webViews programmatically in Swift

谁说胖子不能爱 提交于 2019-12-18 15:06:13
问题 I want to create something like an image gallery in my ViewController. For this, I'd need multiple webViews, depending on the number of images that I get from a JSON request. How can I insert new webViews if I need to? As you can see in the above image, I have a scrollView and one UIWebView inside of the ViewController. How would I create a new webView inside of the first(second, third, etc.) if necessary? Is it possible? 回答1: you can create the web view programatically as simple as possible

iPhone app crashes on WebThread MPVolumeSlider

独自空忆成欢 提交于 2019-12-18 14:53:48
问题 It seems like very broad to ask a question, but this is very annoying and difficult to fix the bug. Here's the crash log for WebThread which I got from Crashlytics. Thread : Crashed: WebThread 0 libobjc.A.dylib 0x0000000193e97bd0 objc_msgSend + 16 1 UIKit 0x0000000187f65dd8 +[UIViewAnimationState popAnimationState] + 332 2 MediaPlayer 0x0000000185953358 -[MPVolumeSlider volumeController:volumeValueDidChange:] + 92 3 MediaPlayer 0x00000001859c5fc4 -[MPVolumeController updateVolumeValue] + 260

PDF in webview performance

女生的网名这么多〃 提交于 2019-12-18 13:48:20
问题 I am using the following (simple) code to load a PDF from the documents folder in my app into a UIWebView. The performance is very poor. I tried loading the same PDF from the web via Safari and the performance was great. Does anyone have any ideas? (this viewController is being presented as a modalViewController). - firstView.m InfoViewController *mcontroller = [[InfoViewController alloc] init]; NSArray* paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);

Having separate cookie storage for two UIWebView?

喜欢而已 提交于 2019-12-18 13:19:10
问题 Background I am developing a simple iPad application that allow the user to browse the same website with different logins at the same time. Therefore I have two UIWebView and they should have different cookie storage so the user can login one account on the first UIWebView and another account on the second UIWebView . What have I tried? I think the solution is to implement different cookie storages in the two UIWebView I have. Sasmito Adibowo wrote an article Implementing Your Own Cookie

iOS 6 - UIWebView loadHTMLString not working properly

≯℡__Kan透↙ 提交于 2019-12-18 13:02:33
问题 If anyone experienced the issue below, please let me know if you were able to find a fix. I've spent a couple of days trying to come up with a solution, but no luck so far. I'm using XCode 4.5 with iOS 6 SDK Golden Master. Basically, my application reads and HTML file and hands its contents to a web view for rendering. NSString *path = [[NSBundle mainBundle] pathForResource:@"filename" ofType:@"html"]; NSString *html = [NSString stringWithContentsOfFile:path encoding:NSUTF8StringEncoding