Joker
Joker

Reputation: 734

Reusing scrollview

In my project, i want to show the images in zig-zag pattern in the scrollable view. So i used uiscrollview i subview the images in it. Its working fine, but it is taking too much of memory bcoz i loading all the images to the scrollview without using resusing strategy and its getting crash. And my view looks like this

enter image description here

Suggest me how can i achieve the reusing scrollview or any other views(grid or someother), but the images should be in zig-zag fasion.

Thanks a lot for spending time on this.

Upvotes: 1

Views: 196

Answers (1)

gabriellanata
gabriellanata

Reputation: 4336

Using a UICollectionView would be the correct way to go for this, they allow the displaying of cells to be customized any way you want. The style you are looking fall is sometimes called "pinterest style" or "waterfall style".

Here are a couple of links containing tutiorials on how to achieve this using a UICollectionView: http://pierceboggan.com/post/56951869926/pinterest-style-uicollectionviews-in-xamarin-ios http://maniacdev.com/2012/11/uicollectionview-subclass-library-adding-pinterest-style-grid-view-functionality

Upvotes: 2

Related Questions