上面的效果主要是用到了UIPageViewController,http://www.jianshu.com/p/a676899d9b70 這篇文章講的挺細的 ,對於中間的圖片嵌入效果想了解的可以查看我以前寫的內容http://www.jianshu.com/p/a75c1a07cd51
/* UIPageViewController 為我們提供了2種翻頁樣式,一種是擬真,一種是滾動 UIPageViewControllerTransitionStylePageCurl//擬真 UIPageViewControllerTransitionStyleScroll//滾動 翻頁的方向 UIPageViewControllerNavigationOrientationHoriz//橫向 UIPageViewControllerNavigationOrientationVertical//縱向 */ UIPageViewController * pageVC = [[UIPageViewController alloc] initWithTransitionStyle:UIPageViewControllerTransitionStylePageCurl navigationOrientation:UIPageViewControllerNavigationOrientationHorizontal options:nil]; pageVC.delegate = self; pageVC.dataSource = self; [self addChildViewController:pageVC]; [self.view addSubview:pageVC.view]; //UIPageViewControllerNavigationDirectionForward,//橫向,像書一樣 //UIPageViewControllerNavigationDirectionReverse//縱向,像日歷一樣 TextViewController *readerController = [TextViewController alloc] init];//需要展示內容的控制器 [pageVC setViewControllers:@[ readerController ] direction:UIPageViewControllerNavigationDirectionForward animated:YES completion:nil]; #pragma mark -- UIPageViewControllerDelegate,UIPageViewControllerDataSource /* * 參數ViewController為當前正在顯示的VC控制器 return 的ViewController為將要顯示的VC控制器 */ //向前翻頁執行 - (nullable UIViewController *)pageViewController:(UIPageViewController *)pageViewController viewControllerBeforeViewController:(UIViewController *)viewController{} //向後翻頁時執行 - (nullable UIViewController *)pageViewController:(UIPageViewController *)pageViewController viewControllerAfterViewController:(UIViewController *)viewController{} //在動畫執行完畢後被調用,在controller切換完成後,我們可以在這個代理中進行一些後續操作 - (void)pageViewController:(UIPageViewController *)pageViewController didFinishAnimating:(BOOL)finished previousViewControllers:(nonnull NSArray*)previousViewControllers transitionCompleted:(BOOL)completed{ }
關於字符串分頁想了解的可以去這裡了解http://m.blog.csdn.net/article/details?id=10191101