错误“调用中缺少参数'coder'的参数”

时间:2019-07-16 12:31:02

标签: ios swift xcode uiviewcontroller storyboard

我正在尝试运行此代码,但出现错误提示 呼叫中缺少参数“编码器”的参数 如果有人可以帮助我解决此错误。

有关完整代码,请访问:https://github.com/aidev1065/WWDC2018_Scholarship_Submission-Accepted/blob/master/README.md

        let vc = PageViewController()
        vc.modalPresentationStyle = .formSheet
        present(vc, animated: true, completion: nil)

1 个答案:

答案 0 :(得分:1)

在PageViewController类中,删除旧方法init并添加新init

override init(transitionStyle style: UIPageViewController.TransitionStyle, navigationOrientation: UIPageViewController.NavigationOrientation, options: [UIPageViewController.OptionsKey : Any]? = nil) { super.init(transitionStyle: .scroll, navigationOrientation: .horizontal, options: options) }

您的问题将得到解决