Adding UIPageView as a portion of a screen
ios, ios5, ipad
Solution
Yes, this is possible, and the implementation is very easy.
Steps (implemented in XCode 6 using Storyboards)
- Begin with an empty view controller.
- Add a Container View from the object library on the right. The Container View may automatically embed in a regular View Controller, in which case you can just delete the View Controller because we want to embed a Page View Controller.
- Select a Page View Controller from the object library on the right, and place it wherever you want in your Storyboard.
- Ctrl Click + drag from the Container View to the Page View Controller, and select embed from the menu that appears. The Page View Controller should automatically resize itself to be the same size as the Container View in the original View Controller.
Problem
Pretty new to iOS development and curious whether something is possible and if so the best want to do it. I'd like to make a UIPageViewController be a portion of the screen. I.e., I want to have a menu bar, perhaps some additional controls and then place the page view controller on a portion of that page (so the menu bar isn't part of the page turning control). In other words, a UIPageView that acts like a scrollView that doesn't take up the whole screen. Acceptable design? Thanks.