【发布时间】:2016-04-12 16:02:35
【问题描述】:
我想提供一个符合 UITableViewDataSource 协议的辅助视图控制器。但是这个类不是有意的,必须通过继承来终结。
试图这样做,编译器要求我在帮助类中实现协议。 我该如何解决这个问题?
class BigHeadViewController: UIViewController, UITableViewDelegate, UITableViewDataSource {
// Helper class that do ton of the job
}
class StoryTableViewController: BigHeadViewController {
// final implementation, must implement UITableViewDataSource
}
【问题讨论】:
标签: ios swift inheritance protocols