5

How can I implement this with UIPageViewController? so I can see previous and next page in active page.

enter image description here

I implemented this with UIScrollView before. Now, I want change it with UIPageViewController. Because I got problem with memory.

Hezron
  • 352
  • 1
  • 15
  • i am not sure with UIPageViewController but you can try this http://stackoverflow.com/a/41976632/5461400 – Harshal Valanda Mar 08 '17 at 04:23
  • If you want to show next and previous cell's 20 pixel, then in size for item at index path just return the size as ScreenWidth - 40 - (2 x padding). Whats the issue ?? :o – Sandeep Bhandari Mar 08 '17 at 05:59
  • @SandeepBhandari that doesn't work for `UIPageViewController` – Hezron Mar 08 '17 at 06:26
  • @hezron : My bad, but why dont u use collectionView instead ??? – Sandeep Bhandari Mar 08 '17 at 06:34
  • @SandeepBhandari like scrollView, collectionView load all pages. I want use pageViewController, because this will only load previous, active, and next page. – Hezron Mar 08 '17 at 06:55
  • @Hezron I don't think that UIPageViewController can handle this kind of functionality. Try to use UICollectionView. As far as I know, it is possible to reuse cells there, so there is no reason not to use it – Robert Khaireev Apr 19 '17 at 12:42
  • Possible duplicate of [Horizontal padding between UIPageViewController child view controllers](https://stackoverflow.com/questions/20694679/horizontal-padding-between-uipageviewcontroller-child-view-controllers) – adamjansch Mar 13 '18 at 11:39

0 Answers0