I am playing around with NIPagingScrollView and I am wondering a couple of things:
- Is it mandatory to return a view that has a width of 320px in pagingScrollView:pageViewForIndex:? If not, is there a way to automatically center the view in a page?
- I would like to display on the right edge and the left edge of the screen a piece of the right and left views of the NIPagingScrollView. Is it possible?
Thanks!
Martin
Basically, this works the same way as you'd do for a
UIScrollView:clipsToBoundstoNOon both theNIPagingScrollView, as well as it's childUIScrollViewinstance (pagingScrollView);NIPagingScrollViewless than the width of the parent view — 260px worked find for my needs, but adjust this as necessary;Honestly though, if you're targeting iOS 6 or higher I would suggest using a
UICollectionViewinstead ofNIPagingScrollView. You'll get a lot more flexibility in your layout.