UICollectionView inside UIScrollView

I have

  • UIScrollView
    • Stickers
    • Stickers
    • UICollectionView

I turned off the scroll function of UICollectionViews, so I only want to scroll it using Scrollview. My problem is that I do not know how I can calculate the height of UICollectionViews so that I can update the UIScorllView. If there are many elements inside the UICollectionView, it is clipped.

I created this little HTML example to show what I'm looking for. http://jsfiddle.net/hDwPH/

Dummy code 
+4
ios objective-c xcode storyboard
source share
1 answer

So my suggestion would be to use a single UIScrollview. Create your own view (we'll call it A) with what you are trying to repeat in Collection and addSubview A in UIScrollview over and over again how many times you need.

Another way that just occurred to me would be to use the entire collection to create two collectible items, one of which has your tags, and you show it only for the first cell and the other collection for everyone else.

+2
source share

All Articles