Image not loading until you scroll table View












0















I have Xamarin.iOS project, where is I use TableView



Here is tableView source code



 public class ExperienceSourceNew: UITableViewSource
{
private UINavigationController primNav { get; set; }
private UITableView tableView { get; set; }
List<Experience> TableItems;
ExperienceViewControllerNew _owner;
static NSString cellIdentifier = new NSString("newcell_id");
public ExperienceSourceNew(List<Experience> items, ExperienceViewControllerNew owner, UINavigationController nav)
{
TableItems = items;
_owner = owner;
primNav = nav;
}
public override nint RowsInSection(UITableView tableview, nint section)
{

if (TableItems.Count == 0)
{


var noDataLabel = new UILabel
{
Text = "No Experiences at your location at this time. Try to change destination",
TextColor = UIColor.Black,
TextAlignment = UITextAlignment.Center,
LineBreakMode = UILineBreakMode.WordWrap,
Lines = 0
};
tableview.BackgroundView = noDataLabel;
tableview.SeparatorStyle = UITableViewCellSeparatorStyle.None;

return TableItems.Count;
}
else
{
tableview.BackgroundView = null;
tableview.SeparatorStyle = UITableViewCellSeparatorStyle.SingleLine;
return TableItems.Count;
}


}

public override async void RowSelected(UITableView tableView, NSIndexPath indexPath)
{
var selectedExperience = await ExperienceMethods.GetSelectedTour(TableItems[indexPath.Row].id);
if (selectedExperience == "Saved")
{
ExperienceDetailViewController ExperienceDetailController = primNav.Storyboard.InstantiateViewController("ExperienceDetailViewController") as ExperienceDetailViewController;
primNav.PushViewController(ExperienceDetailController, true);

}
else
{
UIAlertController okAlertController = UIAlertController.Create("", "Cannot select this experience", UIAlertControllerStyle.Alert);
okAlertController.AddAction(UIAlertAction.Create("OK", UIAlertActionStyle.Default, null));
}
tableView.DeselectRow(indexPath, true);

}


public override UITableViewCell GetCell(UITableView tableView, NSIndexPath indexPath)
{
var cell = (ExperienceCellNew)tableView.DequeueReusableCell(cellIdentifier, indexPath);
Experience item = TableItems[indexPath.Row];
cell.UpdateCell(item);
return cell;
}


I use custom Cell for TableView, so here is code for it



public ExperienceCellNew (IntPtr handle) : base (handle)
{

}
internal void UpdateCell(Experience experience)
{
var image_url = "https://xplorpal.com/" + experience.cover_image.img_path + "/150x150/" + experience.cover_image.img_file;
ExperienceTitleNew.Text = experience.title;
ExperiencePriceNew.Text = "$" + experience.price;
NSUrlSession session = NSUrlSession.SharedSession;
var dataTask = session.CreateDataTask(new NSUrlRequest(new NSUrl(image_url)), (data, response, error) =>
{
if (response != null)
{
DispatchQueue.MainQueue.DispatchAsync(() =>
{
ExperienceImageNew.Image = UIImage.LoadFromData(data);
});
}
});

dataTask.Resume();
}
}


My problem, that images not appears on View load, I have text in labels, but don't have images. If I scroll TableView, images are appears in cells.



Where can be problem and how to solve it?










share|improve this question



























    0















    I have Xamarin.iOS project, where is I use TableView



    Here is tableView source code



     public class ExperienceSourceNew: UITableViewSource
    {
    private UINavigationController primNav { get; set; }
    private UITableView tableView { get; set; }
    List<Experience> TableItems;
    ExperienceViewControllerNew _owner;
    static NSString cellIdentifier = new NSString("newcell_id");
    public ExperienceSourceNew(List<Experience> items, ExperienceViewControllerNew owner, UINavigationController nav)
    {
    TableItems = items;
    _owner = owner;
    primNav = nav;
    }
    public override nint RowsInSection(UITableView tableview, nint section)
    {

    if (TableItems.Count == 0)
    {


    var noDataLabel = new UILabel
    {
    Text = "No Experiences at your location at this time. Try to change destination",
    TextColor = UIColor.Black,
    TextAlignment = UITextAlignment.Center,
    LineBreakMode = UILineBreakMode.WordWrap,
    Lines = 0
    };
    tableview.BackgroundView = noDataLabel;
    tableview.SeparatorStyle = UITableViewCellSeparatorStyle.None;

    return TableItems.Count;
    }
    else
    {
    tableview.BackgroundView = null;
    tableview.SeparatorStyle = UITableViewCellSeparatorStyle.SingleLine;
    return TableItems.Count;
    }


    }

    public override async void RowSelected(UITableView tableView, NSIndexPath indexPath)
    {
    var selectedExperience = await ExperienceMethods.GetSelectedTour(TableItems[indexPath.Row].id);
    if (selectedExperience == "Saved")
    {
    ExperienceDetailViewController ExperienceDetailController = primNav.Storyboard.InstantiateViewController("ExperienceDetailViewController") as ExperienceDetailViewController;
    primNav.PushViewController(ExperienceDetailController, true);

    }
    else
    {
    UIAlertController okAlertController = UIAlertController.Create("", "Cannot select this experience", UIAlertControllerStyle.Alert);
    okAlertController.AddAction(UIAlertAction.Create("OK", UIAlertActionStyle.Default, null));
    }
    tableView.DeselectRow(indexPath, true);

    }


    public override UITableViewCell GetCell(UITableView tableView, NSIndexPath indexPath)
    {
    var cell = (ExperienceCellNew)tableView.DequeueReusableCell(cellIdentifier, indexPath);
    Experience item = TableItems[indexPath.Row];
    cell.UpdateCell(item);
    return cell;
    }


    I use custom Cell for TableView, so here is code for it



    public ExperienceCellNew (IntPtr handle) : base (handle)
    {

    }
    internal void UpdateCell(Experience experience)
    {
    var image_url = "https://xplorpal.com/" + experience.cover_image.img_path + "/150x150/" + experience.cover_image.img_file;
    ExperienceTitleNew.Text = experience.title;
    ExperiencePriceNew.Text = "$" + experience.price;
    NSUrlSession session = NSUrlSession.SharedSession;
    var dataTask = session.CreateDataTask(new NSUrlRequest(new NSUrl(image_url)), (data, response, error) =>
    {
    if (response != null)
    {
    DispatchQueue.MainQueue.DispatchAsync(() =>
    {
    ExperienceImageNew.Image = UIImage.LoadFromData(data);
    });
    }
    });

    dataTask.Resume();
    }
    }


    My problem, that images not appears on View load, I have text in labels, but don't have images. If I scroll TableView, images are appears in cells.



    Where can be problem and how to solve it?










    share|improve this question

























      0












      0








      0








      I have Xamarin.iOS project, where is I use TableView



      Here is tableView source code



       public class ExperienceSourceNew: UITableViewSource
      {
      private UINavigationController primNav { get; set; }
      private UITableView tableView { get; set; }
      List<Experience> TableItems;
      ExperienceViewControllerNew _owner;
      static NSString cellIdentifier = new NSString("newcell_id");
      public ExperienceSourceNew(List<Experience> items, ExperienceViewControllerNew owner, UINavigationController nav)
      {
      TableItems = items;
      _owner = owner;
      primNav = nav;
      }
      public override nint RowsInSection(UITableView tableview, nint section)
      {

      if (TableItems.Count == 0)
      {


      var noDataLabel = new UILabel
      {
      Text = "No Experiences at your location at this time. Try to change destination",
      TextColor = UIColor.Black,
      TextAlignment = UITextAlignment.Center,
      LineBreakMode = UILineBreakMode.WordWrap,
      Lines = 0
      };
      tableview.BackgroundView = noDataLabel;
      tableview.SeparatorStyle = UITableViewCellSeparatorStyle.None;

      return TableItems.Count;
      }
      else
      {
      tableview.BackgroundView = null;
      tableview.SeparatorStyle = UITableViewCellSeparatorStyle.SingleLine;
      return TableItems.Count;
      }


      }

      public override async void RowSelected(UITableView tableView, NSIndexPath indexPath)
      {
      var selectedExperience = await ExperienceMethods.GetSelectedTour(TableItems[indexPath.Row].id);
      if (selectedExperience == "Saved")
      {
      ExperienceDetailViewController ExperienceDetailController = primNav.Storyboard.InstantiateViewController("ExperienceDetailViewController") as ExperienceDetailViewController;
      primNav.PushViewController(ExperienceDetailController, true);

      }
      else
      {
      UIAlertController okAlertController = UIAlertController.Create("", "Cannot select this experience", UIAlertControllerStyle.Alert);
      okAlertController.AddAction(UIAlertAction.Create("OK", UIAlertActionStyle.Default, null));
      }
      tableView.DeselectRow(indexPath, true);

      }


      public override UITableViewCell GetCell(UITableView tableView, NSIndexPath indexPath)
      {
      var cell = (ExperienceCellNew)tableView.DequeueReusableCell(cellIdentifier, indexPath);
      Experience item = TableItems[indexPath.Row];
      cell.UpdateCell(item);
      return cell;
      }


      I use custom Cell for TableView, so here is code for it



      public ExperienceCellNew (IntPtr handle) : base (handle)
      {

      }
      internal void UpdateCell(Experience experience)
      {
      var image_url = "https://xplorpal.com/" + experience.cover_image.img_path + "/150x150/" + experience.cover_image.img_file;
      ExperienceTitleNew.Text = experience.title;
      ExperiencePriceNew.Text = "$" + experience.price;
      NSUrlSession session = NSUrlSession.SharedSession;
      var dataTask = session.CreateDataTask(new NSUrlRequest(new NSUrl(image_url)), (data, response, error) =>
      {
      if (response != null)
      {
      DispatchQueue.MainQueue.DispatchAsync(() =>
      {
      ExperienceImageNew.Image = UIImage.LoadFromData(data);
      });
      }
      });

      dataTask.Resume();
      }
      }


      My problem, that images not appears on View load, I have text in labels, but don't have images. If I scroll TableView, images are appears in cells.



      Where can be problem and how to solve it?










      share|improve this question














      I have Xamarin.iOS project, where is I use TableView



      Here is tableView source code



       public class ExperienceSourceNew: UITableViewSource
      {
      private UINavigationController primNav { get; set; }
      private UITableView tableView { get; set; }
      List<Experience> TableItems;
      ExperienceViewControllerNew _owner;
      static NSString cellIdentifier = new NSString("newcell_id");
      public ExperienceSourceNew(List<Experience> items, ExperienceViewControllerNew owner, UINavigationController nav)
      {
      TableItems = items;
      _owner = owner;
      primNav = nav;
      }
      public override nint RowsInSection(UITableView tableview, nint section)
      {

      if (TableItems.Count == 0)
      {


      var noDataLabel = new UILabel
      {
      Text = "No Experiences at your location at this time. Try to change destination",
      TextColor = UIColor.Black,
      TextAlignment = UITextAlignment.Center,
      LineBreakMode = UILineBreakMode.WordWrap,
      Lines = 0
      };
      tableview.BackgroundView = noDataLabel;
      tableview.SeparatorStyle = UITableViewCellSeparatorStyle.None;

      return TableItems.Count;
      }
      else
      {
      tableview.BackgroundView = null;
      tableview.SeparatorStyle = UITableViewCellSeparatorStyle.SingleLine;
      return TableItems.Count;
      }


      }

      public override async void RowSelected(UITableView tableView, NSIndexPath indexPath)
      {
      var selectedExperience = await ExperienceMethods.GetSelectedTour(TableItems[indexPath.Row].id);
      if (selectedExperience == "Saved")
      {
      ExperienceDetailViewController ExperienceDetailController = primNav.Storyboard.InstantiateViewController("ExperienceDetailViewController") as ExperienceDetailViewController;
      primNav.PushViewController(ExperienceDetailController, true);

      }
      else
      {
      UIAlertController okAlertController = UIAlertController.Create("", "Cannot select this experience", UIAlertControllerStyle.Alert);
      okAlertController.AddAction(UIAlertAction.Create("OK", UIAlertActionStyle.Default, null));
      }
      tableView.DeselectRow(indexPath, true);

      }


      public override UITableViewCell GetCell(UITableView tableView, NSIndexPath indexPath)
      {
      var cell = (ExperienceCellNew)tableView.DequeueReusableCell(cellIdentifier, indexPath);
      Experience item = TableItems[indexPath.Row];
      cell.UpdateCell(item);
      return cell;
      }


      I use custom Cell for TableView, so here is code for it



      public ExperienceCellNew (IntPtr handle) : base (handle)
      {

      }
      internal void UpdateCell(Experience experience)
      {
      var image_url = "https://xplorpal.com/" + experience.cover_image.img_path + "/150x150/" + experience.cover_image.img_file;
      ExperienceTitleNew.Text = experience.title;
      ExperiencePriceNew.Text = "$" + experience.price;
      NSUrlSession session = NSUrlSession.SharedSession;
      var dataTask = session.CreateDataTask(new NSUrlRequest(new NSUrl(image_url)), (data, response, error) =>
      {
      if (response != null)
      {
      DispatchQueue.MainQueue.DispatchAsync(() =>
      {
      ExperienceImageNew.Image = UIImage.LoadFromData(data);
      });
      }
      });

      dataTask.Resume();
      }
      }


      My problem, that images not appears on View load, I have text in labels, but don't have images. If I scroll TableView, images are appears in cells.



      Where can be problem and how to solve it?







      c# ios .net xamarin xamarin.ios






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Jan 20 at 15:31









      Eugene SukhEugene Sukh

      386112




      386112
























          2 Answers
          2






          active

          oldest

          votes


















          3














          Table Views with large number of rows display only a small fraction of their total items at a given time.It's efficient for table views to ask for only the cells for row that are being displayed Therefor on scrolling the table view, the cells get re-used and the data within the cell is repopulated.



          Since you are using a downloaded image it appears to be slow.



          You can try loading the image of the exact size as the image view within the cell.



          This is similar to your issue



          And also assigning the image to imageview on main thread and make it synchronous as UI changes require synchronous access to main thread.






          share|improve this answer


























          • What you mean - exact size?

            – Eugene Sukh
            Jan 25 at 7:29











          • If the image view is of 50x50 px then loading 1024x1024 would be unneccessary and take more time to load and display, therefore choosing the size which is nearest to the image view size would fasten the process.

            – pooja
            Jan 25 at 8:08











          • It's already min size. My problem is in loading image. It appears only after scroll. How it connect with image size? I try different size of images, so I think it not related to this. When I use this code not in tableview, in simple view with uiimage , all downloads great and image appears without scroll, or smth.

            – Eugene Sukh
            Jan 25 at 8:16













          • The tableview does not load all the images for all the cells at once. The images are downloaded when the cells are created .Since the cells are dynamic , they are created only as many as required to fill the screen. For example if four cells fill the screen only four to five cells are created at the start. Only when you start scrolling the other cells get created and that is when the images are downloaded . Since the download begins after you have scrolled , the images take time to load. You can try adding a local default image till the actual image gets downloaded

            – pooja
            Jan 25 at 8:45













          • Okay. When I have only one cell on screen, I see same problem.

            – Eugene Sukh
            Jan 25 at 8:50



















          0














          As an alternative, you can use FFImageLoading which will let you do this



          ImageService.LoadUrl(image_url).Into(ExperienceImageNew);





          share|improve this answer
























          • I was trying to use it, same thing. Images not appears in until scroll. My problem, I cannot understood, why

            – Eugene Sukh
            Jan 21 at 10:03











          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54277994%2fimage-not-loading-until-you-scroll-table-view%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          2 Answers
          2






          active

          oldest

          votes








          2 Answers
          2






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          3














          Table Views with large number of rows display only a small fraction of their total items at a given time.It's efficient for table views to ask for only the cells for row that are being displayed Therefor on scrolling the table view, the cells get re-used and the data within the cell is repopulated.



          Since you are using a downloaded image it appears to be slow.



          You can try loading the image of the exact size as the image view within the cell.



          This is similar to your issue



          And also assigning the image to imageview on main thread and make it synchronous as UI changes require synchronous access to main thread.






          share|improve this answer


























          • What you mean - exact size?

            – Eugene Sukh
            Jan 25 at 7:29











          • If the image view is of 50x50 px then loading 1024x1024 would be unneccessary and take more time to load and display, therefore choosing the size which is nearest to the image view size would fasten the process.

            – pooja
            Jan 25 at 8:08











          • It's already min size. My problem is in loading image. It appears only after scroll. How it connect with image size? I try different size of images, so I think it not related to this. When I use this code not in tableview, in simple view with uiimage , all downloads great and image appears without scroll, or smth.

            – Eugene Sukh
            Jan 25 at 8:16













          • The tableview does not load all the images for all the cells at once. The images are downloaded when the cells are created .Since the cells are dynamic , they are created only as many as required to fill the screen. For example if four cells fill the screen only four to five cells are created at the start. Only when you start scrolling the other cells get created and that is when the images are downloaded . Since the download begins after you have scrolled , the images take time to load. You can try adding a local default image till the actual image gets downloaded

            – pooja
            Jan 25 at 8:45













          • Okay. When I have only one cell on screen, I see same problem.

            – Eugene Sukh
            Jan 25 at 8:50
















          3














          Table Views with large number of rows display only a small fraction of their total items at a given time.It's efficient for table views to ask for only the cells for row that are being displayed Therefor on scrolling the table view, the cells get re-used and the data within the cell is repopulated.



          Since you are using a downloaded image it appears to be slow.



          You can try loading the image of the exact size as the image view within the cell.



          This is similar to your issue



          And also assigning the image to imageview on main thread and make it synchronous as UI changes require synchronous access to main thread.






          share|improve this answer


























          • What you mean - exact size?

            – Eugene Sukh
            Jan 25 at 7:29











          • If the image view is of 50x50 px then loading 1024x1024 would be unneccessary and take more time to load and display, therefore choosing the size which is nearest to the image view size would fasten the process.

            – pooja
            Jan 25 at 8:08











          • It's already min size. My problem is in loading image. It appears only after scroll. How it connect with image size? I try different size of images, so I think it not related to this. When I use this code not in tableview, in simple view with uiimage , all downloads great and image appears without scroll, or smth.

            – Eugene Sukh
            Jan 25 at 8:16













          • The tableview does not load all the images for all the cells at once. The images are downloaded when the cells are created .Since the cells are dynamic , they are created only as many as required to fill the screen. For example if four cells fill the screen only four to five cells are created at the start. Only when you start scrolling the other cells get created and that is when the images are downloaded . Since the download begins after you have scrolled , the images take time to load. You can try adding a local default image till the actual image gets downloaded

            – pooja
            Jan 25 at 8:45













          • Okay. When I have only one cell on screen, I see same problem.

            – Eugene Sukh
            Jan 25 at 8:50














          3












          3








          3







          Table Views with large number of rows display only a small fraction of their total items at a given time.It's efficient for table views to ask for only the cells for row that are being displayed Therefor on scrolling the table view, the cells get re-used and the data within the cell is repopulated.



          Since you are using a downloaded image it appears to be slow.



          You can try loading the image of the exact size as the image view within the cell.



          This is similar to your issue



          And also assigning the image to imageview on main thread and make it synchronous as UI changes require synchronous access to main thread.






          share|improve this answer















          Table Views with large number of rows display only a small fraction of their total items at a given time.It's efficient for table views to ask for only the cells for row that are being displayed Therefor on scrolling the table view, the cells get re-used and the data within the cell is repopulated.



          Since you are using a downloaded image it appears to be slow.



          You can try loading the image of the exact size as the image view within the cell.



          This is similar to your issue



          And also assigning the image to imageview on main thread and make it synchronous as UI changes require synchronous access to main thread.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Jan 25 at 9:33

























          answered Jan 22 at 9:51









          poojapooja

          638313




          638313













          • What you mean - exact size?

            – Eugene Sukh
            Jan 25 at 7:29











          • If the image view is of 50x50 px then loading 1024x1024 would be unneccessary and take more time to load and display, therefore choosing the size which is nearest to the image view size would fasten the process.

            – pooja
            Jan 25 at 8:08











          • It's already min size. My problem is in loading image. It appears only after scroll. How it connect with image size? I try different size of images, so I think it not related to this. When I use this code not in tableview, in simple view with uiimage , all downloads great and image appears without scroll, or smth.

            – Eugene Sukh
            Jan 25 at 8:16













          • The tableview does not load all the images for all the cells at once. The images are downloaded when the cells are created .Since the cells are dynamic , they are created only as many as required to fill the screen. For example if four cells fill the screen only four to five cells are created at the start. Only when you start scrolling the other cells get created and that is when the images are downloaded . Since the download begins after you have scrolled , the images take time to load. You can try adding a local default image till the actual image gets downloaded

            – pooja
            Jan 25 at 8:45













          • Okay. When I have only one cell on screen, I see same problem.

            – Eugene Sukh
            Jan 25 at 8:50



















          • What you mean - exact size?

            – Eugene Sukh
            Jan 25 at 7:29











          • If the image view is of 50x50 px then loading 1024x1024 would be unneccessary and take more time to load and display, therefore choosing the size which is nearest to the image view size would fasten the process.

            – pooja
            Jan 25 at 8:08











          • It's already min size. My problem is in loading image. It appears only after scroll. How it connect with image size? I try different size of images, so I think it not related to this. When I use this code not in tableview, in simple view with uiimage , all downloads great and image appears without scroll, or smth.

            – Eugene Sukh
            Jan 25 at 8:16













          • The tableview does not load all the images for all the cells at once. The images are downloaded when the cells are created .Since the cells are dynamic , they are created only as many as required to fill the screen. For example if four cells fill the screen only four to five cells are created at the start. Only when you start scrolling the other cells get created and that is when the images are downloaded . Since the download begins after you have scrolled , the images take time to load. You can try adding a local default image till the actual image gets downloaded

            – pooja
            Jan 25 at 8:45













          • Okay. When I have only one cell on screen, I see same problem.

            – Eugene Sukh
            Jan 25 at 8:50

















          What you mean - exact size?

          – Eugene Sukh
          Jan 25 at 7:29





          What you mean - exact size?

          – Eugene Sukh
          Jan 25 at 7:29













          If the image view is of 50x50 px then loading 1024x1024 would be unneccessary and take more time to load and display, therefore choosing the size which is nearest to the image view size would fasten the process.

          – pooja
          Jan 25 at 8:08





          If the image view is of 50x50 px then loading 1024x1024 would be unneccessary and take more time to load and display, therefore choosing the size which is nearest to the image view size would fasten the process.

          – pooja
          Jan 25 at 8:08













          It's already min size. My problem is in loading image. It appears only after scroll. How it connect with image size? I try different size of images, so I think it not related to this. When I use this code not in tableview, in simple view with uiimage , all downloads great and image appears without scroll, or smth.

          – Eugene Sukh
          Jan 25 at 8:16







          It's already min size. My problem is in loading image. It appears only after scroll. How it connect with image size? I try different size of images, so I think it not related to this. When I use this code not in tableview, in simple view with uiimage , all downloads great and image appears without scroll, or smth.

          – Eugene Sukh
          Jan 25 at 8:16















          The tableview does not load all the images for all the cells at once. The images are downloaded when the cells are created .Since the cells are dynamic , they are created only as many as required to fill the screen. For example if four cells fill the screen only four to five cells are created at the start. Only when you start scrolling the other cells get created and that is when the images are downloaded . Since the download begins after you have scrolled , the images take time to load. You can try adding a local default image till the actual image gets downloaded

          – pooja
          Jan 25 at 8:45







          The tableview does not load all the images for all the cells at once. The images are downloaded when the cells are created .Since the cells are dynamic , they are created only as many as required to fill the screen. For example if four cells fill the screen only four to five cells are created at the start. Only when you start scrolling the other cells get created and that is when the images are downloaded . Since the download begins after you have scrolled , the images take time to load. You can try adding a local default image till the actual image gets downloaded

          – pooja
          Jan 25 at 8:45















          Okay. When I have only one cell on screen, I see same problem.

          – Eugene Sukh
          Jan 25 at 8:50





          Okay. When I have only one cell on screen, I see same problem.

          – Eugene Sukh
          Jan 25 at 8:50













          0














          As an alternative, you can use FFImageLoading which will let you do this



          ImageService.LoadUrl(image_url).Into(ExperienceImageNew);





          share|improve this answer
























          • I was trying to use it, same thing. Images not appears in until scroll. My problem, I cannot understood, why

            – Eugene Sukh
            Jan 21 at 10:03
















          0














          As an alternative, you can use FFImageLoading which will let you do this



          ImageService.LoadUrl(image_url).Into(ExperienceImageNew);





          share|improve this answer
























          • I was trying to use it, same thing. Images not appears in until scroll. My problem, I cannot understood, why

            – Eugene Sukh
            Jan 21 at 10:03














          0












          0








          0







          As an alternative, you can use FFImageLoading which will let you do this



          ImageService.LoadUrl(image_url).Into(ExperienceImageNew);





          share|improve this answer













          As an alternative, you can use FFImageLoading which will let you do this



          ImageService.LoadUrl(image_url).Into(ExperienceImageNew);






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Jan 20 at 20:53









          pnavkpnavk

          3,04711331




          3,04711331













          • I was trying to use it, same thing. Images not appears in until scroll. My problem, I cannot understood, why

            – Eugene Sukh
            Jan 21 at 10:03



















          • I was trying to use it, same thing. Images not appears in until scroll. My problem, I cannot understood, why

            – Eugene Sukh
            Jan 21 at 10:03

















          I was trying to use it, same thing. Images not appears in until scroll. My problem, I cannot understood, why

          – Eugene Sukh
          Jan 21 at 10:03





          I was trying to use it, same thing. Images not appears in until scroll. My problem, I cannot understood, why

          – Eugene Sukh
          Jan 21 at 10:03


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54277994%2fimage-not-loading-until-you-scroll-table-view%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Homophylophilia

          Updating UILabel text programmatically using a function

          Cloud Functions - OpenCV Videocapture Read method fails for larger files from cloud storage