草庐IT

ASDataSource

全部标签

ios - Swift 类 : Property not initialized at super. init 调用中的错误 - 如何初始化需要在其初始化参数中使用 self 的属性

我正在快速覆盖UITableViewController,其中我有两个必需的变量,它们是通过使用self的weak引用初始化的,因为这些用于实现UITableViewDataSource协议(protocol),需要self引用才能使用其tableView属性classVideosListViewController:UITableViewController{requiredinit(coderaDecoder:NSCoder){super.init(coder:aDecoder)self.datasourceOfflineVideos=ASDataSource(tableViewC