Shany
Shany

Reputation: 1

Webview loading issue in iOS

In my App I am loading web view using:

    [webview loadHTMLString:htmlString baseURL:htmlurl];

The htmlString consists of text, images and videos. Images and videos are inside an iFrame tag.Since there is a delay in loading the webView items my webView is hidden first and I am making it visible only in the webViewDidFinishLoad delegate

-(void)webViewDidFinishLoad:(UIWebView *)webView{
      webview.hidden=NO;
}

My problem is that even then the images are not fully loaded. Is there a solution to fix this issue?

Upvotes: 0

Views: 241

Answers (1)

Stanojevic Dalibor
Stanojevic Dalibor

Reputation: 31

There are few things you can do

-First if you have dynamic content in iFrame, or so, download it first and then set htmlString,

-Second, somehow if that doesn't work try anlisting children of UIWebView and set them to be visible

NSArray *subviews = webView.subviews;

for(UIView *view in subviews){
    view.hidden=NO;
[view setAlpha:1];
}

Upvotes: 0

Related Questions