uiwebview

UIAlertView in iOS8 appearing off-center, mis-placed, only portion of the screen dimmed

人走茶凉 提交于 2019-11-29 14:55:38
I'm building an iPad app on iOS8, landscape, upgrading from iOS7. I've replaced UIAlertView (deprecated) with UIAlertController in a number of other places in my app which has fixed this issue. However, I also use a UIWebView which apparently shows its own UIAlertViews. When this happens I also get the same problem (see partial pic, cropped). The alert view is misplaced lower to the left and only the left 2/3 of the screen is dimmed, and worse, the right most portion that is not dimmed still responds to touch gestures, so it's possible to control the app behind the modal! The alert that the

UIWebView modal YouTube player “Done” button action

血红的双手。 提交于 2019-11-29 14:24:48
问题 In my iPhone app, I'm presenting a modal view controller from a home screen with a UIWebView that displays an "inline" embedded YouTube video using this: UIWebView *youTubeWV = [[UIWebView alloc] initWithFrame:CGRectMake(0, 0, 320, 220)]; [youTubeWV loadRequest:[NSURLRequest requestWithURL:sourceURL]]; //NSString *youTubeVideoHTML = [NSString stringWithFormat:@"<embed id=\"yt\" src=\"http://www.youtube.com/watch?v=CadgUJRZfEE\" type=\"application/x-shockwave-flash\" width=\"320\" height=\"220

Load HTTPS url in a UIWebView

戏子无情 提交于 2019-11-29 14:18:49
问题 I begin iPhone programming and I have big problem I cant resolve. So, I have a UIWebview , I can load HTTP url without problems : NSString urlAdress; urlAdress = @"http://servername"; NSURL *url = [NSURL URLWithString:urlAdress]; NSURLRequest *requestObj = [NSURLRequest requestWithURL:url]; [webView loadRequest:requestObj]; Its work, my page is load in my UIwebView, but when I replace : urlAdress = @"http://servername"; by urlAdress = @"https://servername"; I have blank screen. I read its

iOS - WKWebView Cross origin requests are only supported for HTTP

▼魔方 西西 提交于 2019-11-29 13:19:57
问题 Hi i'm trying to load an html that is in the main Bundle with WKWebView this worked perfectly with UIWebView but now i have an error, the files in the html does not load send an error in the console : "XMLHttpRequest cannot load" this is an example http://proyectoshm.com/esferas/dosaguas/dosaguascitta.html of the content embedded. My code: let folder = "maquetas/esferas/\(esfera)" let resourcePath = Bundle.main.resourcePath let subdir = URL(fileURLWithPath:resourcePath!)

uiwebview and huge memory loss

三世轮回 提交于 2019-11-29 13:06:52
问题 I have a problem using UIWebViews, I've seen the same question here but there wasn't helpful answer. the question is here: UIWebView memory management . I will quote it: I am developing an application that makes heavy use of UIWebView. This app generates dynamically lots of UIWebViews while loading content from my server. Some of these UIWebViews are quite large and have a lot of pictures. If I use instruments to detect leaks, I do not detect any. However, lots of objects are allocated and I

iOS 8 youtube video embed

可紊 提交于 2019-11-29 13:06:15
问题 I'm facing problems that I can't seem to understand. I have this code that works perfectly in Xcode 5 with iOS 7: - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view, typically from a nib. CGFloat width = self.view.frame.size.width; CGFloat height = self.view.frame.size.height; UIWebView *webview = [[UIWebView alloc] initWithFrame:CGRectMake(0, 0, width, height)]; NSString* embedHTML = @"\ <html><head><meta name=\"viewport\" content=\"width=device

how to use windowScriptObject on the iPhone?

孤街浪徒 提交于 2019-11-29 13:03:19
Greetings! I was wondering how I could use javascript code on an iPhone application I was developing. this tutorial illustrated how to use windowScriptObjects for Cocoa application. However, I have been unable to locate something similar for UIWebViews. does this functionality actually exist in Cocoa touch? and if yes, could anyone point me to the right direction as to how I might start using it. thank you once again Like rpetrich said, this is Non-Public API so the windowScriptObject route might not be the best. I did find this link though, which helped me a lot: https://discussions.apple.com

iphone uiwebview programmatic zoom

早过忘川 提交于 2019-11-29 12:46:57
I'm developing an app that saves html files locally on iPhone file system, then load them in UIWebView. I want to be able to zoom or double tap programmatically on the UIWebView, I tried searching for javascript code, but I could only scroll. I also tried the webview transform, but didn't work out for me. I found this method sendAction:to:from:forEvent: http://developer.apple.com/iphone/library/documentation/UIKit/Reference/UIApplication_Class/Reference/Reference.html#jumpTo_26 in the UIApplication class, that can send actions to controls. Does anybody know how to send the double tap action

UIWebView taking lots of memory

六眼飞鱼酱① 提交于 2019-11-29 12:28:40
问题 In my app when i load UIWebView with any Website url the memory jumps from 30mb to around 140mb. I am using ARC and when dismissing the UIWebViewController [ Viewcontroller which contains UIWebView], it doesnt releases the memory. Can any body help me how to solve this memory issues as well as please also provide me pointers of memory bestpractices in ARC For loading the webpage :- NSURL *nsurl=[NSURL URLWithString:self.url]; NSURLRequest *nsrequest=[NSURLRequest requestWithURL:nsurl];

WKWebView vs UIWebView

北慕城南 提交于 2019-11-29 12:22:57
I've an app/project with deployment target version - iOS 10. I had used UIWebView , which is deprecated now and replaced by WKWebView . So, I want to replace UIWebView with WKWebView in my project also. It force me to either use UIWebView (with iOS 10) or change deployment target to iOS 11. I cannot change deployment target but as a middleware solution, I added code (programatically) support for both. I mean, if user's device OS is iOS 11 (or above) then use WKWebView else use UIWebView (for iOS 10 or below). Issue statement: Storyboard's view controller does not support both versions, I mean,