实施后
func pageViewController(pageViewController: UIPageViewController, viewControllerBeforeViewController viewController: UIViewController) -> UIViewController?
func pageViewController(pageViewController: UIPageViewController, viewControllerAfterViewController viewController: UIViewController) -> UIViewController?
Xcode告诉我这个错误:
预期' {'在函数声明体中
http://i.stack.imgur.com/315n9.png
我希望你们能帮助我
答案 0 :(得分:1)
这两个函数都需要一个后面的闭包,返回一个UIViewController?您只需要包含以下内容:
func pageViewController(pageViewController: UIPageViewController, viewControllerBeforeViewController viewController: UIViewController) -> UIViewController? {
return //name of your viewController
}
func pageViewController(pageViewController: UIPageViewController, viewControllerAfterViewController viewController: UIViewController) -> UIViewController? {
return //name of your viewController
}