uiwebview

How to load a UIWebView with a close button on top?

穿精又带淫゛_ 提交于 2019-12-05 01:18:09
问题 I currently have the following code that loads a UIWebView from another View. Now is there anyway I can have a close button? - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { UIWebView *webView=[[UIWebView alloc] initWithFrame:CGRectMake(0,0,320,480)]; [self.view addSubview:webView]; NSURLRequest *urlRequest; NSURL *urlforWebView; urlforWebView=[NSURL URLWithString:@"http://www.google.com"]; urlRequest=[NSURLRequest requestWithURL:urlforWebView];

UIWebView delegate vertical scroll event to parent, if scrolled to top or bottom

霸气de小男生 提交于 2019-12-05 01:11:38
问题 I have an UIWebView in an UIScrollView, which is paginated. Basically I want to switch between different webviews with scroll / fling gestures. Horizontally it works fine. If the webview is scrolled to the "border of the page", the scroll/pan event is passed to the scrollview, so that the next page is shown. On the vertical axis, this does not work. There does not seem to be an event passed to the scrollview. It might be a problem with the bouncing, which I disabled, because I thought, it

How to read console logs of wkwebview programmatically

a 夏天 提交于 2019-12-05 01:03:45
I am trying to read the console logs of webapp that is loaded in my WkWebview programmatically. so far in my research it's not possible. How can I achieve this? Please use this beautiful in-app " Bridge " Edit: self.webView = [[WBWKWebView alloc] initWithFrame:self.view.bounds]; self.webView.JSBridge.interfaceName = @"WKWebViewBridge"; WBWebDebugConsoleViewController * controller = [[WBWebDebugConsoleViewController alloc] initWithConsole:_webView.console]; Then , you can use the delegate method: - (void)webDebugInspectCurrentSelectedElement:(id)sender { // To use the referenced log values } It

How to detect zoom scale of UIWebView

喜你入骨 提交于 2019-12-05 00:57:01
问题 I want to increase height of UIWebView while user zoom in (like default mail app in iPhone). So, I have tried the code below to find scrollview in webview and add UIScrollViewDelegate to use scrollViewDidZoom for detecting zoom scale to increase height of webview on this method. // MessageAppDelegate.h @interface MessageAppDelegate : NSObject <UIApplicationDelegate,UIWebViewDelegate,UIScrollViewDelegate> { UIWebView *webview; UIScrollView *scrollview; } //MessageAppDelegate.m - (BOOL

Using the same UIWebView across different viewControllers

半城伤御伤魂 提交于 2019-12-05 00:20:56
TL;DR: I need to implement a singleton UIWebVIew that's shared across multiple ViewControllers. The question contains all of my approaches so far. appDelegate: @property (strong, nonatomic) UIWebView *singleWebView; firstViewController: @property (weak, nonatomic) IBOutlet UIWebView *webView; - (void)viewWillDisappear:(BOOL)animated { [super viewWillDisappear: animated]; NSLog(@"Removing webview from the first VC"); [self.webView removeFromSuperview]; self.webView.delegate = nil; AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate]; appDelegate.singleWebView =

Crashed: WebThread - EXC_BAD_ACCESS KERN_INVALID_ADDRESS

蓝咒 提交于 2019-12-05 00:11:37
Since November 8, 2016, we've seen a sudden increase in crashes from WebThread. We don't know what is causing the crash. We do have web articles and ads in the app. We did not have any App Release. There were no significant changes on the web or ads. Since crashes are happening on screens without articles, we are thinking it is happening on ads. Is anyone else seeing this? Any thoughts, ideas, anything? Stack trace: Crashed: WebThread 0 WebCore 0x184b7e47c WTF::HashMap<WTF::String, WebCore::ApplicationCacheGroup*, WTF::StringHash, WTF::HashTraits<WTF::String>, WTF::HashTraits<WebCore:

Pre-populate HTML5 offline appcache for a UIWebView in an iOS application

浪尽此生 提交于 2019-12-04 23:59:21
Is it possible to create a UIWebView that has an HTML5 offline appcache pre-populated so that it will work offline even if it is the first time the user is accessing the UIWebView? If so, how? I know I can achieve this through other mechanisms, but the above is my first choice. And I'm just plain curious if it's possible. I'm seeing nothing about it in the documentation. I think this may reduce to a question of whether you can programmatically write to the UIWebView's cache file (which is to say, whether the UIWebView cache resides within your app's sandbox) – if you can't, then game over. If

Video download from HTML + UIWebView

孤者浪人 提交于 2019-12-04 23:36:13
问题 In my new application i need to download video from different-different web sites, Say it is video downloader application. For this what i am planing is Searching html for .mp4 and .Flv url and then trying to downloading videos. There are many app already doing same http://itunes.apple.com/in/app/video-downloader-super-lite/id481701140?mt=8 What i am asking is, how can we download video? Any code or link or something. how this application work ? Any Help will really appreciate. what i needed

Open Link in UIWebView in Safari

随声附和 提交于 2019-12-04 23:16:04
I am working on an app that receives a feed that I display in a UIWebView. The feed has embedded links that I want to open in Safari instead of thew WebView. I have looked over several other questions that are posted here. I am not sure what I am missing, but I think it is something simple. Here are my .h and .m files #import @class BlogRss; @interface EnduranceDailyWorkoutViewController : UIViewController { IBOutlet UIWebView * descriptionTextView; BlogRss * currentlySelectedBlogItem; } @property (nonatomic, retain) UIWebView * descriptionTextView; @property (readwrite, retain) BlogRss *

UIWebView does not load HTTPS Page: Error Domain=NSURLErrorDomain Code=-999 “The operation couldn’t be completed. (NSURLErrorDomain error -999.)”

情到浓时终转凉″ 提交于 2019-12-04 22:54:26
Note: This question is still unanswered! I use a UIWebView to load the following URLs: https://buchung.salonmeister.de/ort/301655/menue/#offerId=907601&venueId=301655 https://buchung.salonmeister.de/place/#offer-details-page?id=907599&venueId=301655 http://feratel.lueneburger-heide.de/lhg/de/accommodation/detail/LUH/8634e147-e13d-40f5-8954-2ac40cfea2a7/romantik_hotel_bergström?customHeader=true http://feratel.lueneburger-heide.de/lhg/de/accommodation/detail/LUH/8af6d1fd-af6d-4765-8025-9eb8fa05ea42/hotel%20undeloher%20hof?customHeader=true Note that the above urls are not my urls so I cannot