Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8084285
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T17:44:48+00:00 2026-06-05T17:44:48+00:00

I have problem with UIWebView delay when the load image from url. In my

  • 0

I have problem with UIWebView delay when the load image from url.

In my code are lines to load local html file:

NSBundle *thisBundle = [NSBundle mainBundle];
NSString *path = [thisBundle pathForResource:@"detail" ofType:@"html"];
NSString *html = [NSString stringWithContentsOfFile:path];
NSString *htmlString = [NSString stringWithFormat:html, imageURL];
[webView loadHTMLString:htmlString baseURL:nil];

and one of lines in my detail.html file:

<img src="%@" height="100%" alt="…"></img>

And now when I push the button and go to UIWebView, at first it is white and after few seconds show image and text.
I know that time is necessary to load image from URL, but is it possible at first show text and next waiting to load image??

Generally I thinking of: push button -> go to UIWebView -> show text -> show image when it’s loaded

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T17:44:50+00:00Added an answer on June 5, 2026 at 5:44 pm

    With the help of Martin H, I managed to solve the problem.

    First in my local.html file, I was add in <head> section:

    <script type="text/javascript">
        function loadImage(imageSource) {
             document.getElementById("picture").src=imageSource;
        }
    </script>
    

    next in <body> section:

    <img src="" style="border: none;" id="picture">
    

    and next in my UIViewController I was add delegate method:

    - (void) webViewDidFinishLoad:(UIWebView *)web {
        [webView stringByEvaluatingJavaScriptFromString:[NSString stringWithFormat:@"loadImage('http://example.com/image.jpg')"]];
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this UIWebView that reads from an HTML file with this style: <style
I have html file in resources folder to load in uiwebview. I need to
i have copied image from UIwebView using clipboard and i want to mail it.For
I have a UIWebview in which a have a local html placed . When
I am trying to load a UIWebView with local HTML/CSS that is build to
I have a problem with my application that is using uiwebview to load the
I have a UIWebView to show local content in HTML. I want the content
I'm having a really confusing problem. I have a UIWebView that is contained within
I have problem creating new instance of excel 2007 using VBA (from Access 2002).
I have a problem with this code: Header: @interface ViewController : UIViewController { IBOutlet

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.