使用PageMenuController时遇到问题,
在此System.Int32 source code in the .Net reference Source中,说明是将ContainerView
添加到我的视图中并将我的控制器类嵌入到我的视图中
这是我的代码:
testViewController
let viewController = self.storyboard?.instantiateViewControllerWithIdentifier("TestTableViewController") as! TestTableViewController
viewController.title = "Menu title"
let viewController1 = self.storyboard?.instantiateViewControllerWithIdentifier("Test1TableViewController") as! Test1TableViewController
viewController1.title = "Menu title"
let viewControllers = [viewController, viewController1]
let pagingMenuController = self.childViewControllers.first as! PagingMenuController
pagingMenuController.delegate = self
options.menuHeight = 60
options.menuDisplayMode = .Standard(widthMode: .Flexible, centerItem: true, scrollingMode: .PagingEnabled)
options.menuItemMode = .None
pagingMenuController.setup(viewControllers, options: options)
但我在self.childViewControllers.first as! PagingMenuController
收到错误,错误消息为EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0)
我认为错误不是来自PagingMenuController
,请帮助我如何识别错误?