UIPageViewController within NavigationController

后端 未结 4 724
耶瑟儿~
耶瑟儿~ 2020-12-23 10:54

I\'ve read every tutorial I\'ve found about UIPageViewController, but they show just basics, I\'d like to create something like new twitter app has:

4条回答
  •  失恋的感觉
    2020-12-23 11:04

    Mr. Isuru ! I got your question... Solution given by Mr. Micnguyen is the exact solution but the mentioned delegate method (didFinishAnimating()) is called when swipe action is done due to which initially title is not shown.

    Hence to resolve that problem, we need to set its initial value in viewDidLoad() method of UIPageViewController class as mentioned below:

    • (void)viewDidLoad(){ self.navigationitem.title = arrayname[0]; }

    Thanks !

提交回复
热议问题