0

I look for this answer everywhere but I couldn't find satisfied answer so far.

I have UIScrollView with Tiled UITableView as subviews. I did it like it was showed in WWDS 2012 video and it work fine. But now I would like to use Auto Layout and I would like to know right and easy solution for this.

Because if I understand Auto Layout correct I can't specify constraints to subviews because it will be removed during tiling.

image representation of problem :

enter image description here

When tiling only one UITableView is on the scroll view, other are stored in NSSet but removed from superview.

But when you start scrolling, UItableView are added to scroll view.

enter image description here

Marko Zadravec
  • 8,298
  • 10
  • 55
  • 97
  • can you put a screenshot here! – Vaibhav Saran Feb 03 '14 at 07:20
  • It's look like you want to implement some kind of UICollectionView, so better checkout it and do not re-invent the wheel – Ossir Feb 03 '14 at 11:14
  • I am not quite sure if this is like UICollectionView. I would like to have any number of UITableViews and paging scroller to shift between them. – Marko Zadravec Feb 03 '14 at 11:18
  • Do they have the same type of cells? Cause if they're - it's definitely collection view. And there're plenty of implementation for paging scroller on the Internet=) – Ossir Feb 03 '14 at 11:21
  • Yes I know there is plenty samples of paging scroller, but I didn't found sample of paging scroller with unknown number of subview with auto layout :D I am little confused. So you say I should implement UICollectionView and do it so big that go offscreen horizontally and than do paging? – Marko Zadravec Feb 03 '14 at 11:27

1 Answers1

1

I think this implementation is obsolete today. Check out UICollectionView documentation. And for paging you can find some already implemented solutions too. For example:

http://mobileappdev.learningtree.com/2012/12/13/paging-with-collection-views-part-1/

One more example:

http://adoptioncurve.net/archives/2013/04/creating-a-paged-photo-gallery-with-a-uicollectionview/

And check out the article from this dude, I like his posts:

http://khanlou.com/2013/04/paging-a-overflowing-collection-view/

Ossir
  • 3,109
  • 1
  • 34
  • 52