Using UIPageViewController in storyboards

Is there a way to configure datasource, delegate and view controllers for a UIPageViewController in a storyboard without writing code? I see the outputs for the data source and delegation in the UIPageViewController, but there is no way to make connections between scenes and not add an additional controller to the same scene.

What is the purpose of creating a UIPageViewController in an interface builder, if it is not configured with IB at all?

+5
source share
1 answer

It is fully customizable in Xcode. You connect the data-source and delegate outputs to classes that inherit the corresponding protocols ( UIPageViewControllerDataSource and UIPageViewControllerDelegate ).

But you have to do some implementation for two protocols - usually by accessing your model data. Normally, but not required, the controller for UIPageView runs these two protocols. IN:

 @interface MyPageViewController : UIPageViewController <UITableViewDataSource, UITTableViewDelegate> ... @end 
+3
source

Source: https://habr.com/ru/post/952773/


All Articles