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 9078343
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T19:35:54+00:00 2026-06-16T19:35:54+00:00

I am using MonoTouch.Dialog in my app; however, the form in question is implemented

  • 0

I am using MonoTouch.Dialog in my app; however, the form in question is implemented using a UIViewController to which which I added a TableView (so I can also add a UIToolbar).

I love the ImageLoader that comes in MonoTouch.Dialog.Utilities and am trying to use it in the GetCell() method of the DataSource for the TableView to render an image from a URL.

                var callback = new ImageLoaderCallback(controller, cell.ImageView, indexPath);  // ImageLoaderCallback implements IImageUpdated
                cell.ImageView.Image = ImageLoader.DefaultRequestImage(new Uri(picFV.Value), callback);

The problem is that until the URL is downloaded, the space for the ImageView is collapsed (so that the text to the right of the image is actually anchored on the left of the table).

What I’d like to do is display a temporary local image which has the same dimensions as the downloaded image, so that when the ImageLoader is done retrieving and rendering the image, the user experience isn’t as jarring.

I tried to do the following in the GetCell() call… cell.ImageView.Image is set to some other image (not shown below), and then I get a reference to what comes back from ImageLoader.DefaultRequestImage.

                var image = ImageLoader.DefaultRequestImage(new Uri(picFV.Value), callback);
                callback.Image = image;

the last line stuffs the image reference returned by ImageLoader into the callback’s state, and the callback will replace the cell’s ImageView.Image when the ImageLoader is done (see below):

    // callback class for the MonoTouch.Dialog image loader utility
    private class ImageLoaderCallback : IImageUpdated
    {
        private ListViewController controller;
        private UIImageView imageView;
        private NSIndexPath indexPath;

        public ImageLoaderCallback(ListViewController c, UIImageView view, NSIndexPath path)
        {
            controller = c;
            imageView = view;
            indexPath = path;
        }

        public UIImage Image { get; set; }

        void IImageUpdated.UpdatedImage(Uri uri)
        {
            if (uri == null)
                return;
            if (Image != null)
                imageView.Image = Image;
            // refresh the display for the row of the image that just got updated
            controller.TableView.ReloadRows(new NSIndexPath [] { indexPath }, UITableViewRowAnimation.None);                
        }
    }

However, this doesn’t work because it appears that the ImageLoader needs to be “pulled” by the TableView when it tries to render its ImageView (i.e. the ImageLoader callback never gets invoked because no one is pulling on the URL).

How do I accomplish this scenario?

Thanks!

  • 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-16T19:35:55+00:00Added an answer on June 16, 2026 at 7:35 pm

    I know this is an old question now, but I came across it when searching for the same thing and have seen the following blog post which states how to accomplish this. I haven’t yet tried it out but hopefully it might help you or anyone else coming across this in the future: http://yusinto.blogspot.co.uk/2012/05/background-image-downloading-with.html

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using monotouch and have created a UIViewController. I want to add SegmentControl
I am trying to build an app using MonoTouch and MonoTouch.Dialog. I really like
I am currently using the advanced editing tableview as outlined in Monotouch.Dialog that allows
Is this possible at all? When I create a form using MonoTouch.Dialog, it comes
Why cannot change MonoTouch.Dialog.TableView.Background color ? I am using the Elements API of MonoTouch.Dialog.
Using MonoTouch.Dialog I add StyledStringElement elements. There is a background task that retrieves details
I am trying to implement a Settings dialog for iOS using MonoTouch and the
I am building a Monotouch application which downloads data from the server encrypted using
I am using MonoDevelop and MonoTouch to create an application which needs to access
MonoTouch.Dialog: Using a custom OwnerDrawnElement , I create the Element with a custom Draw()

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.