Whenever I scroll on list view in IOS images set in the imageView wrapper inside list view template are disappears and loads when view is visible to user.
Asked
Active
Viewed 126 times
-3
-
Can you show some code? – Rene Pot Jul 17 '18 at 17:10
1 Answers
3
This is the correct behaviour and as expected from Ti.UI.ListView.
You need to follow these points to understand how ListView works.
- ListView is used for the best performance while showing up a large list of items, mostly containing the ImageView. If the view is not visible to the user, then there's no point in showing the view in UI or keeping it in memory.
- ListView basically unload the invisible views from memory and load them up again once they become visible to user.
- Now the view which is visible to user is reloaded again when you scroll to that view and it seems your images are of large sizes which takes time to load up again.
- I suggest to use this amazing module Av.ImageView to show images in a proper way. This module will do all sort of caching and a more smooth animation transition while the view is visible to user.
- If you do not want to use the above module or you do not have control on reducing the size/resolutions of images, then you can use Ti.UI.TableView
- But use it at your discretion because any other UI element than ListView will slow down your app quite a lot.
It's always recommended to follow the best practices to keep the app's performance at top priority.

Prashant Saini
- 3,539
- 1
- 10
- 24