Based on paging navigation implementation
After iOS 5, you can use the paging controller (Uipageviewcontroller) to build applications that are similar to e-book effects, which we call pagination based applications. There are a number of related view controllers for a paging application
The paging controller (Pageviewcontroller) needs to be placed in a parent view controller with a child view controller under the paging controller, with each child view controller corresponding to a page in the diagram.
Classes and protocols needed in applications based on paging navigation: Uipageviewcontrollerdatasource protocols and Uipageviewcontrollerdelegate protocols and Uipageviewcontroller classes, Uipageviewcontroller does not have a corresponding view class.
The most important method in the Uipageviewcontrollerdelegate entrustment agreement is pageviewcontroller:spinelocationforinterfaceorientation:, It sets the spine position (Spine Location) and initializes the home page according to the direction of the screen rotation.
There are two commonly used properties in Uipageviewcontroller: Two-sided display (doublesided) and spine position (spinelocation).
1. Two-sided display, is when the page is turned up, even pages will be displayed on the back. The figure is set to Yes doublesided, figure 6-14 doublesided set to No (single-sided display), one-sided display in the page turned up, can see the back of the page, the back content is the current page through the past, and the current content is the opposite mirror.
2. Spine position. The spine position is also an important attribute, but its Spinelocation property is read-only and, to set it, it needs to be passed through the Pageviewcontroller in the Uipageviewcontrollerdelegate Delegate protocol: Spinelocationforinterfaceorientation: Method. The spine position is defined by the enumeration uipageviewcontrollerspinelocation, and the member variables under that enumeration type are shown below.