iOS CollectionView with horizontal paging instead of vertical scrolling
        Posted  
        
            by 
                Nico Griffioen
            
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Nico Griffioen
        
        
        
        Published on 2013-06-30T22:18:08Z
        Indexed on 
            2013/06/30
            22:20 UTC
        
        
        Read the original article
        Hit count: 353
        
I'm working on a project for a client. It's an iPad pdf reader. The client wants a collection view, but instead of scrolling vertically, he wants it to use a page control. It's pretty hard to explain, but what I basically want is all the PDFs on the device in a grid, like on the iBooks app. When that grid overflows, I want to use a page control to display the extra elements on a second page (like in the weather app).
My thoughts on this were: - Create a page control with one page. - On that page, create a UICollectionView. - If the number of elements is greater than 9 add a page to the page control and add another UICollectionView, until there are enough pages to display all elements.
However, this seems horribly inefficient, so my question is if there's a better way to do this.
© Stack Overflow or respective owner