UIPageViewController with Peeking

后端 未结 3 904

I\'m trying to create a page browser by using a UIPageViewController in Interface Builder that allows displaying part of the adjacent pages (aka peeking). I\'ve

3条回答
  •  醉话见心
    2020-12-31 15:34

    I was just searching for a good solution to the same feature. I found a nice tutorial on Ray Wenderlich's site titled "How To Use UIScrollView to Scroll and Zoom Content". It illustrates multiple things you can do with UIScrollView. The fourth and final is "Viewing Previous/Next Pages" which is your "peek" feature.

    I haven't implemented this yet, but the key steps seem to be:

    • Create a UIScrollView narrower than your screen
    • Turn on Paging Enabled
    • Turn off Clip Subviews
    • Fill the UIScrollView with your pages side by side
    • Embed the UIScrollView inside a UIView that fills the width of the screen so that you can capture and pass touches outside the Scroll View

提交回复
热议问题