objective c - Loading 8MP photos in the background on iOS -
objective c - Loading 8MP photos in the background on iOS -
i'm customizing gallery similar photos app in ios. want able scroll between individual photos in custom gallery. preloading images shown (if scroll right, preload i.e. 2 next images right)
however, image loading seems cpu consuming interferes scrolling. making scrolling hang split of second.
is there improve way this? (i have considered keeping smaller versions of each image matches screen resolution)
basically phone call in background thread:
uiimage *img = [uiimage imagewithcontentsoffile:path];
and perform selector on main thread initialises existing imageview loaded image.
i figured out in way.
i needed render image off-screen on background thread create sure loaded. otherwise not load until decided render in main thread. caused main thread block while loading.
ios objective-c
Comments
Post a Comment