iphone - How to load iOS iCarousel with items dynamically along scroll -


i have 200+ items on local storage supposed show in icarousel.

i know can update data model array , call [carousel reloaddata]. don't want include control this. want keep last choice because include visual flicker in reloading.

i ideally want during scrolling itself. like:

  • i can keep 20 items in datasource array
  • i can fill carousel these 20
  • as user scrolls, @ point, empty datasource array
  • empty carousel , call reloaddata update newer items
  • user should not aware reloading happened.

in nutshell, without consuming resources want carousel scrolling smooth , seamless.

what icarousel events should trap , when?

should reusing same item views or remove existing , start afresh new data?

p.s.

on side note, know how many item views carousel can support @ time, memory considerations? on single item view, have 2 uilabels, 1 image (different each item view) , 1 background image (same each item view). can estimate total possible item views carousel can support @ given time? if can 100 can afford reload flicker after 100. don't want have after scrolling 20.

there won't 200 views loaded. scroll asked view , given index. if there reusable view provided, use it. if not, create new one. should tell carousel how many views there (200+, not 10 , change). carousel manage memory if reuse views properly. can run test, log pointer each view , see how many uniques there when reuse views. should close number of views can on screen @ 1 time.


Comments