uiwebview

Change zoomScale and contentOffset of UIScrollView in UIApplicationStateBackground state

▼魔方 西西 提交于 2019-12-05 09:14:44
问题 I know it's not recommended to change any view appearance when the application is moved to background state, but for my specific task I cannot postpone this activity and I really like to complete it in a couple of seconds after the user hits the home button. That's what I do: I load a webpage in a UIWebView and after loading completion I change the contentOffset and zoomScale in order to make a specific screenshot of that webpage. When the app is in active application state everything works

Properly force or allow Landscape mode for Youtube embedded video in iOS 8 without NSNotificationCenter

做~自己de王妃 提交于 2019-12-05 09:13:42
I am having issues of capturing when the youtube player will enter in fullscreen or exit fullscreen in iOS 8 because these notifications were removed UIMoviePlayerControllerDidEnterFullscreenNotification and UIMoviePlayerControllerWillExitFullscreenNotification for this version OS version. Because my app project is set to be only in portrait mode the video won't rotate to landscape mode when is playing which is really not too user friendly when watching a video on your device. Usually the user would like to watch the video either in portrait mode or landscape mode when the video enters in

Pre-fill WebView text fields

大憨熊 提交于 2019-12-05 08:59:59
I need to pre-fill text fields in a UIWebView and am given to understand that javascript is the best way to go about this. Unfortunately I know nothing of javascript and have been fumbling about for the last few hours, getting nowhere. Latest botched attempt: - (void)webViewDidFinishLoad:(UIWebView *)webView { // username field id = username_5 & pw field id = password_5 NSString *javascript = @"\ var user = 'testUser';\ var pw = 'testPW';\ document.getElementById('username_5').value = user; \ document.getElementById('password_5').value = pw; \ ;"; // Execute JS [_emailWebView

iphone:Pop up button in UIWebView

让人想犯罪 __ 提交于 2019-12-05 08:36:29
I want to put pop up button like Email in UIWebView.In my app i have created ebook in webView now whenever i click(long press) on index page link it will create the pop up window with open and copy button as shwon as below: Like this i want to put another button like Email and Print.How to create another button in pop up window in WebView?Thanks in advance! The popup you refer to is called a UIMenuController . You can access the [UIMenuController sharedMenuController] method to get the menu controller. You can then add your own UIMenuItems to the menu controller. UIMenuItem* myBtn1 = [[

Programmatically zooming a UIWebView without gestures - Center Point not calculated correctly

瘦欲@ 提交于 2019-12-05 08:21:19
The Problem I have a UIWebView inside my iPad application which I need to zoom programmatically, but without the use of gestures/taps. The app. has a "+" and a "-" button for zooming in-and-out in user-defined increments (it is an app. for the visually impaired). This +/- zoom-button functionality previously worked 100% fine when my app. used a UIImageView inside of a UIScrollView (instead of the WebView). The ImageView was the actual view which was zoomed, and the CenterPoint was calculated for the ScrollView's zoomToRect method. I now have a WebView, which I know contains a ScrollView as a

UIWebView links opening in Safari

。_饼干妹妹 提交于 2019-12-05 08:19:49
I want to open an iTunes link in my webView, but when the webView launches the page, it redirects to the Safari browser. There, the url is getting opened, but I want it to open in my webView. - (void)viewDidLoad { NSString *urlAddress = @"http://itunes.apple.com/us/app/foodcheck-traffic-light-nutrition/id386368933?mt=8"; //Create a URL object. NSURL *url = [NSURL URLWithString:urlAddress]; //URL Requst Object NSURLRequest *requestObj = [NSURLRequest requestWithURL:url]; //Load the request in the UIWebView. [webView loadRequest:requestObj]; [super viewDidLoad]; } Please suggest a way to sort

Autofill Username and Password in UIWebView

走远了吗. 提交于 2019-12-05 08:06:55
I'm doing a very easy app for me. When I launch this app, it simply bring me to this web page https://social.tre.it/expert . I would like to automatise login so is there a way to autofill username and password, check the "I accept condition" mark and push "login" button? I tried this Autofill Username and Password UIWebView Swift but it doesn't work, I'm not the creator of the page so I don't know exactly how it's structured. Would be cool even if iCloud keychains would fill the forms...but maybe I'm asking too much! Artal You can use JavaScript to do it. If you inspect the page, you can

XCode webview connection/server error handling

安稳与你 提交于 2019-12-05 08:00:51
问题 All, I am fairly new to XCode and am trying to get a handle on how to best deal with connection issues when trying to use a WebView. I know there are related questions on SO, but none seem to offer complete solutions. I have the following code, but it seems a little inefficient. Hopefully, someone can help me refactor it down to a point where it can be usable anywhere that a UIWebView is called. NOTE: Please ignore memory issues for now. I realize that has to be added as well. - (void

custom control overlay on UIWebView on single Tap/Touch in iphone

时光毁灭记忆、已成空白 提交于 2019-12-05 07:43:04
问题 http://startupmeme.com/wp-content/uploads/2008/09/stanza-on-iphone.png I want to achieve functionality like the famous Stanza application screenshot shows. Content is displayed with the help of UIWebView in html format A single tap on the UIWebView would show two overlay controls (top & bottom) The bottom toolbar consists of controls & a slider to give pagination Please help. How would I achieve the above in following way: How do i build up these custom controls? On single tap, how will i

UIWebView's scrolling after textfield focus

依然范特西╮ 提交于 2019-12-05 07:32:10
I have UIView and UIWebView on screen. When I click on text field in website, web view content is going up. How could I force UIView to move as well then? You can subscribe to either the UIKeyboardWillShowNotification or the UIKeyboardDidShowNotification , and move your UIView when you receive the notification. This process is described here: Text, Web, and Editing Programming Guide for iOS : “Moving Content That Is Located Under the Keyboard” Maybe this helps: I didn't want the UIWebView to scroll at all, including when focusing on a textfield. You have to be the delegate of the UIWebView: