Reputation: 1377
I dont know if someone knows this effect. However, I saw sometimes in apps that if I scroll down the ScrollView
some images appear through an alpha
animation that I can rarely see the image appearing. I have a scrollView
with about 30 images.
Is it possible to make this effect to my scrollView
because I don't know if it is fix my issue too.
My issue is that the view
loads so many pictures at one and sometimes crashes on iPod touch 4G
. So my idea was t give my scrollview
this awesome effect and maybe reduce the crashed trough that. I would be happy if someone could show me a sample.
Thanks in advance.
Upvotes: 0
Views: 218
Reputation: 6991
Ok so first of all you should probably consider using a tableview rather than a scrollview since what I think you're trying to achieve looks more like a list of images than anything else and yes this exists, and there are sample codes available from apple that show you how to do that called TableviewPlayground.
Second, how are you loading the images? a tableview is basically a 'lazy' view, you load the data thats on the screen, but not the rest in your datasource..
take a look at the tableview datasource protocol and properly implement the methods and
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
in particular.
UITableViewDatasource protocol reference
Upvotes: 1