uiwebview

ios web view - after a click, how to open a page in a web browser instead of embedded in an app

随声附和 提交于 2019-12-11 04:13:22
问题 I have a UIWebView screen and in it I have a link which I want to go to a different web page. Right now I have this: if ([request.URL.scheme isEqualToString:@"something"]) { NSURL *url = [NSURL URLWithString:@"stackoverflow.com]; NSURLRequest *request = [NSURLRequest requestWithURL:url]; [theWebView loadRequest:request]; } But it just opens the link within the app itself. But how do I make it load the web browser and open the url inside the web browser? And similarly, if I want to link to my

UILongPressGestureRecognizer not working

青春壹個敷衍的年華 提交于 2019-12-11 04:09:17
问题 I want to detect UILongPressGestureRecognizer for the UIWebView tap- and hold ..such that When I long press for almost 3 seconds then the below if condition should be True then only if (navigationType == UIWebViewNavigationTypeLinkClicked && longGesture ) but its not working....it continues in the loop for every time ..does not check for the longPressGesture time... even I have Tried with the condition.. if (navigationType == UIWebViewNavigationTypeLinkClicked && longGesture

UIWebview manipulating SVG 'on the fly'

﹥>﹥吖頭↗ 提交于 2019-12-11 04:08:01
问题 I would like to know how to manipulate SVG files that I have loaded into a UIWebview. Currently I am loading an SVG file into an HTML file and then loading that into a UIWebview. I presume that you would use Javascript to do this but am not sure how the go about it exactly. Ideally I would like to be able to manipulate the SVG on the fly in an iPad app. I am aware that you can 'inject' code into the UIWebview but have had no success with my attempts. Clear as mud? Well perhaps a bit of code

Change Playback Quality of YTPlayerView

你说的曾经没有我的故事 提交于 2019-12-11 03:45:30
问题 I am having a problem with quality for embedded YouTube videos in my app. I am using YTPlayerView to embed videos from YouTube. My app has 2 options: option 1 is the user can watch video with 360p quality and option 2 is 720p quality. Are these two options possible? If yes, can I customize the video playback quality of the YTPlayerView ? I tried to change the quality this way, but it does not appear to work: [self.playerView setPlaybackQuality:kYTPlaybackQualitySmall]; 回答1: I assume you are

Restricting (Age-Protecting) a UIWebView to avoid 17+ user rating

馋奶兔 提交于 2019-12-11 03:41:01
问题 Recent policy changes with iTunes Connect mean that any application which gives "unrestricted" access to the internet (via UIWebView ) must have a 17+ rating. I have such a feature in my app, but it is a very non-critical feature. Rather than removing it all together, I wondered if there is a way to have an age protection around these features to avoid needing the 17+ rating. For example: could I require Facebook login and check the user's age? Has anybody had success with techniques like

IBOutlet equals nil

送分小仙女□ 提交于 2019-12-11 03:36:24
问题 I just tried connecting my UIWebView with UIViewController and when I started application I got error that mean UIWebView equals nil. What problem can be? 回答1: You'll see this sort of behavior if you just referenced AuthViewController() , but didn't reference the storyboard at all. That's because when you simply create an instance of a AuthViewController , it has no way of knowing what scene in the storyboard that class is associated with. Thus, all of the IBOutlet references will be nil .

Cache a single webpage for use when offline in Xcode / UIWEBVIEW

落爺英雄遲暮 提交于 2019-12-11 03:27:24
问题 I have a UIWEBVIEW that connects to a "login.php?email=a@b.com&password=aaa" Login .php uses these details to login to an external website and fetch and display its contents using CURL. I have got my login.php to store the webpage into a folder "/cache/a@b.com.html" on my webserver. I now need to find a way to tell Xcode / UI webview If there is an internet connection: -Visit login.php -Download latest /cache/a@b.com.html and store local. If there isnt an internet connection: -Load local 'a@b

Points in iOS versus size units in CSS in a UIWebView?

帅比萌擦擦* 提交于 2019-12-11 03:07:27
问题 When you load HTML into a UIWebView in iOS, how do you get iOS point units in the CSS? That is, point units within iOS are a relative size measurement, relative to the size of the display. How do you get those relative point units in CSS? 回答1: Originally, I had a bug in my program, undiagnosed for quite a while where I assumed that the CSS "pt" unit was the iOS points. But, rather, it looks like the "px" units in CSS in the UIWebView actually corresponds to iOS points. 来源: https:/

stringByEvaluatingJavaScriptFromString is not working in iOS 6

依然范特西╮ 提交于 2019-12-11 02:56:21
问题 I am seeing problem happen only on iOS 6 but working fine on below iOS 6 version. My app is loading image from a link which need to enlarge its image pixels to populate within size of UIWebView by using Javascript. The link image is originally in pixels 140x24. I see it is running over the line, but the image not being scaled up using iOS 6 simulator. It does work in iOS 5 simulator. Please help. (void)webViewDidFinishLoad:(UIWebView *)webView { [webView stringByEvaluatingJavaScriptFromString

UIWebView not calling UIScrollViewDelegate methods

坚强是说给别人听的谎言 提交于 2019-12-11 02:54:40
问题 In my iphone app i set delegate of my uiwebview to files owner but it is not calling uiscrollviewdelegate methods my code is - (void)webViewDidStartLoad:(UIWebView *)webView{ NSLog(@"webViewDidStartLoad "); } - (void)webViewDidFinishLoad:(UIWebView *)webView{ NSLog(@"webViewDidFinishLoad "); } - (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView{ NSLog(@"scrollViewDidEndDecelerating "); } - (void)scrollViewDidScroll:(UIScrollView *)scrollView{ NSLog(@"scrollViewDidScroll "); } but