So I have a UIScrollview that scrolls horizontally with paging through a bunch of different UIImageViews containing user avatars. But, I want to only load the avatars from their URL IFF they are actually showing on the screen (4 are showing at a time, but I can scroll through like 30 or more or less). Is there a way of detecting which UIImageView/ which page it is on? Or does anyone have any general recommendations or ideas for how I should go about this problem? Thank you in advance.
So I have a UIScrollview that scrolls horizontally with paging through a bunch of
Share
-(void)scrollViewDidScroll:(UIScrollView *)scrollView{Or If you tag your imageViews (starting at 1) you can retrieve them via:
-(void)scrollViewDidScroll:(UIScrollView *)scrollView{You can use scrollViewDidScroll to detect the position at any point if you use the modulus: