uiwebview

iPhone: Leak with UIWebView loading Office documents. Any ideas how to avoid it?

While there are already quite a few posts about leaks around UIWebView, mine is a bit more special, I believe, and thus deserves its own post here. I see a reproducible large leak every time I load a Office document such as a Word or Excel file. For instance, every time I display a 180KB .doc file, I get a 100KB leak. And that happens ...

How do I find what text/HTML is on screen in a UIWebview?

I would like to know what the first piece of text/html that is currently showing on screen, or more generally where in pixel location a particular tag or piece of text is in the UIWebview. I know that I can use window.pageYOffset to get the scroll position of the UIwebview, but how do I find out what text or HTML item is there? ...

iPhone app with UIWebView

Hi, I have a doubt in developing apps for iphone, Can I develop authentication page(with secure login id and pwd) through which I can load my webcontent. Does apple allow applications having login credentials or not? Can anyone please let me know this. Thanks in advance.. ...

Justify text in UIWebView on iPhone OS using inline CSS?

Using CSS in a UIWebView, how can I make left-to right text flow in a justified manner? What CSS am I looking for? EXAMPLE <p style='text-align: justify;'> does not work. What goes instead of justify? ...

open app in mobile safari browser

I have been using the uiwebview for a app that consists a index.html,css and javascript files.I'd like to do away with the uiwebview and open the app in the safari browser instead.All source files are located within the app bundle.Is it possible and if so can someone point me in the rite direction.Thanks in advance for any help offered. ...

disable javascript in a UIWebView

Hi, Is there a way to disable the Javascript in a UIwebView ? I have memory consumption problem, and I'm looking for a trick here because it seems to not be be possible with the official stuff. Maybe a call with javascript can stop javascript itself, i don't know. Thanks in advance for any help, Adrian C ...

How can I tell when a UIWebView has finished drawing to a context?

In my code I'm trying to show a UIWebView as a page is loading, and then, when it's done, capture an image from the web view to cache and display later (so I don't have to reload and render the web page). I have something along the lines of: CGContextRef context = CGBitmapContextCreate(…); [[webView layer] renderInContext:context]; CG...

How can I get the main thread to sleep while waiting for a delgate to be called?

Consider a class with these methods: - (id) initWithFrame: (CGRect) frame { if (!(self = [super init])) return nil; webView = [[UIWebView alloc] initWithFrame:frame]; [webView setDelegate:self]; lock = [[NSConditionLock alloc] initWithCondition:LOCK_WAIT]; return self; } - (void) setHTML: (NSString *) html {...

UIWebView - How to Disable Action Sheets (UIActionSheet)?

Hey, I would like to know how you can disable UIActionSheets, specifically the Action Sheets being displayed after tapping and holding hyperlinks in a UIWebView. These seem to be enabled by default in UIWebViews containing the link address of the respective link in the title of the alert. They are also enabled in Safari. (How) is it po...

UIWebView does not timeout (iPhone)

Application contains embedded UIWebView inside UINavigationController. Everything works fine - except just tried to open an ad with URL pointing to flash-only webpage. It's been loading that page now 22 minutes, so I suspect there is no automatic timeout? When looking at shouldStartLoadWithRequest, self.currentUrl points to flash-site, ...

Is it possible to include fonts in an app bundle and make them available in a UIWebView

I'm working on some HTML5 content to be included as part of an iPad app in a Web View and it requires some custom fonts which I was attepting to implement via CSS and @font-face As I understand it, Mobile Safari only supports SVG fonts, but my testing has shown Mobile Safari to really struggle with SVG and the performance hit is a serio...

Effect of using webview in app on app rating

If I use UIWebView to render some richtext content and some dynamic web content in my app, then is there a possibility of adverse effect on my app rating in approval process? ...

UIWebView finishes too fast

I'm loading a biggish (and javascript-heavy) page into a UIWebView, and I want to add a UIActivityView to spin while it thinks. Problem is, my - (void)webViewDidFinishLoad:(UIWebView *)webView method gets called quite a while before the rendering actually happens. Enough so that my spinner (which set to hide when stopped) never actually...

UIWebView inside a UITableViewCell

Has anyone tried it? The hardest part for me is to get the height of the UITableViewCell to be the same as that of the UIWebView. By debugging into the code, I noticed that the delegate for UITableViewCell (heightForRowAtIndexPath for getting the height of the cell) is called before the one (webViewDidFinishLoad) for UIWebView is called....

Is it possible to download a .zip file into iPhone when user clicks a link inside UIWebView?

In a new app, I plan to let users download their own files and stored them inside iPhone. The process is typically: iPhone present a web page by UIWebView, in which there are several links to .zip files the user browser the page and click on one of the .zip file link iPhone downloads the file into the iPhone document folder, closes We...

create UIWebView having variable number of rows

How could I create UIWebView having variable number of rows With each row to have the same layout, is it essentially a DHTML question? ...

Correct way to load image into UIWebView from NSData object

I have downloaded a gif image into an NSData object (I've checked the contents of the NSData object and it's definitely populated). Now I want to load that image into my UIWebView. I've tried the following: [webView loadData:imageData MIMEType:@"image/gif" textEncodingName:nil baseURL:nil]; but I get a blank UIWebView. Loading the ima...

Can I lock a UIWebView's orientation with Javascript or HTML?

I'm working on some HTML content as part of an iPad app. We may need to lock the content of the UIWebView to portrait mode, but the app has already been submitted to Apple and the only reference I've found to achieveing this is in this question which gives this example -(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientatio...

Persist UIWebView content and address after changing views

I am using UIWebView as a web browser on my application and when I open an url with my browser and return back to the main view, then go to browser view, my webview doesn't save the content. So, if I go to google.com and switch views, then again go to the browser view, I have to type the url again to open the webpage! How can I save the ...

Get notified about a page change in UIWebView.

Hi there, I'm curious if there's a way to detect a change of the displayed website inside a UIWebView. In an app I'm working on we're using a UIWebView to present a part of the functionality which are basically a few steps the user needs to follow. However, the will be a specific page at the end of these steps that I need to identify an...