uiwebview

Crashed: WebThread - EXC_BAD_ACCESS KERN_INVALID_ADDRESS

主宰稳场 提交于 2019-12-22 03:09:48
问题 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:

Open Link in UIWebView in Safari

五迷三道 提交于 2019-12-22 01:34:43
问题 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; }

Inject Custom CSS and javascript into WebView

删除回忆录丶 提交于 2019-12-22 01:29:46
问题 How can I inject custom CSS into a WebView like changing the background-color: of http://www.apple.com/. Javascript would also be nice because in the future I would like to have control of the javascript. 回答1: The best way would be the one delineated by Rob Keniger, with this answer: https://stackoverflow.com/a/2475623/307881. This technique should also work for javascript. If it doesn't work off the bat try modifying the DOM after the WebView has finished loading (see below) You can also

What's the difference between UIWebView and WKWebView when loading local resources

我们两清 提交于 2019-12-22 01:12:43
问题 I want to load local resources with webView. I built a demo with both UIWebView and WKWebView to do some test with the code below. let uiWebView = UIWebView(frame: self.view.bounds) self.view.addSubview(uiWebView) let wkWebView = WKWebView(frame:CGRect(x: 0, y: 400, width: 500, height: 500)) self.view.addSubview(wkWebView) let path = Bundle.main.path(forResource:"1", ofType: "png") guard let realPath = path else { return } let url = URL(string: realPath) let fileUrl = URL(fileURLWithPath:

Display local pdf file in UIWebView in iphone

可紊 提交于 2019-12-22 00:56:27
问题 I am display local pdf file in UIWebView but it shows exception in path here is my code NSString*fileName=content_Source; NSString *path = [[NSBundle mainBundle] pathForResource:fileName ofType:@"pdf"]; NSURL *url = [NSURL fileURLWithPath:path]; NSURLRequest *request = [NSURLRequest requestWithURL:url]; [webView setScalesPageToFit:YES]; [webView loadRequest:request] 回答1: first validate that string and the assign to URL like bellow.. NSString *strURLPath = [self trimString: path]; NSURL *url =

UIWebView inside UIView programmatically

做~自己de王妃 提交于 2019-12-22 00:53:40
问题 I have a UITableView and I want to add a UIView as a footer. This UIView has a UIWebView and a UIButton . I have the following code: - (void)viewWillAppear:(BOOL)animated { CGRect frame = CGRectMake(10, 0, 280, 400); self.webViewContent = [[UIWebView alloc] initWithFrame:frame]; self.webViewContent.delegate = self; self.webViewContent.hidden = YES; } - (void)webViewDidFinishLoad:(UIWebView *)webView { UIView *viewA = [[UIView alloc] initWithFrame:CGRectMake(webView.bounds.origin.x, webView

UIWebView not calling shouldStartLoadWithRequest when link is clicked || Capturing link clicks in UIWebView

荒凉一梦 提交于 2019-12-22 00:34:12
问题 So this question requires more web knowledge than cocoa knowledge. I know only the basics of web am stumped. This is also a bit of an edge case (although my sample size is small). I'm playing around with a feature to cross-post videos from youtube into our app. So I have a browserController and I load http://m.youtube.com and it loads fine. shouldStartLoadWithRequest is called upon initial load. However, if I click a link to go to a video's page shouldStartLoadWithRequest is never called. I

How to render text with clickable hyperlinks where you can control the action for click?

≯℡__Kan透↙ 提交于 2019-12-22 00:31:54
问题 I'm tryiing to display some text in my app where there might be some URL in the text. I want the URL to be highlighted as hyperlinks and clickable. Furthermore, when it is clicked, I want to supply a callback where I can perform custom action. Of course the URL should be passed back to my callback so I know what to do with it (say open it in an in-app browser etc). This might sound complicated but basically all the IM apps in the appstore (over 30 of them) have this functionality where a user

Open .msg and .eml files from iOS UIWebview

☆樱花仙子☆ 提交于 2019-12-22 00:16:48
问题 I am trying to display .msg and .eml files using iOS sdk 5.1 in a UIWebView. I have the files in a binary format (NSData). I am able to display doc, docx, ppt, pptx, xls, xlsx, pdf, png, bmp and jpg files in the UIWebView but not the .msg and .eml files. Are msg and eml files supported by UIWebView? If not, is there some other way to display such files? They open fine from the Mail app. I am getting the following error from webView:didFailLoadWithError: 2012-08-09 15:59:03.851 HelloWorld[5848

understanding XMLHttpRequest responses using this (or other javascript) functions?

◇◆丶佛笑我妖孽 提交于 2019-12-21 23:12:16
问题 Is there anyway of getting iphone/iPad to access XMLHTTPRequests, i.e. ajax responses from a web page within UIWebView. I've tried a couple of solutions out there where the response url is changed so that the app can identify that it is indeed an ajax response. I'm new to ajax but I'm keen to learn. I just wandered if anyone could tell me the correlation between responses from ajax and the receiving browser. Getting it to work through the iOS's uiwebview would be an added bonus. So far I'm