Ios 即使在实现委托方法之后,也不会显示页面控件

Ios 即使在实现委托方法之后,也不会显示页面控件,ios,swift,uipageviewcontroller,pagecontrol,Ios,Swift,Uipageviewcontroller,Pagecontrol,添加委托和数据源后,页视图控制器不显示。如何实现pageViewController数据源和委托 import UIKit 数据源 在ViewDidLoad中设置委托和数据源 override func viewDidLoad() { super.viewDidLoad() dataSource=self delegate = self let vc = storyboard?.instantiateViewContro

添加委托和数据源后,页视图控制器不显示。如何实现pageViewController数据源和委托

import UIKit
数据源

在ViewDidLoad中设置委托和数据源

    override func viewDidLoad() {
        super.viewDidLoad()
         dataSource=self
        delegate = self
        let vc = storyboard?.instantiateViewController(withIdentifier: "vc") as! ViewController
       self.setViewControllers([vc], direction: .forward, animated: true, completion: nil)

     }


    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }


}
替换

 override func index(ofAccessibilityElement element: Any) -> Int {
        return 0
    }

他完成了工作

我打错电话了

 override func index(ofAccessibilityElement element: Any) -> Int {
        return 0
    }
func presentationIndex(for pageViewController: UIPageViewController) -> Int {
        return 0
    }