无法使用Swift 2.2,Xcode版本7.3(7D175)
打开可选类型 “警卫让”失败了请帮忙! 这是怎么回事?
EDIT1
let localPresenter = presenter
let localDataSource = dataSource
let configurator: ViewControllerConfigurator = { inputView in
let a = inputView as? ChatTableViewController
guard var chatListController = a else {
throw ApplicationErrors.ModuleConfigureError.WrongViewInput
}
localPresenter.view = chatListController
chatListController.presenter = localPresenter
chatListController.tableView.dataSource = localDataSource
}
EDIT2 这段代码工作正常:
let localPresenter = presenter
let localDataSource = dataSource
let configurator: ViewControllerConfigurator = { inputView in
let a = inputView as? ChatTableViewController
if let chatListController = a {
localPresenter.view = chatListController
chatListController.presenter = localPresenter
chatListController.tableView.dataSource = localDataSource
} else {
throw ApplicationErrors.ModuleConfigureError.WrongViewInput
}
}