在我的类(class)中,我想从我的类(class)中扩展 2 个类(class)。 这是例子
@interface TableViewCell : UITableViewCell <UITableViewDataSource, UITableViewDelegate> {
}
这里我像这样扩展 UITableViewCell
以任何其他方式扩展另一个类,如 UIViewController
......
任何人都可以给我建议。
最佳答案
Objective-C 不允许多重继承。
您可以使用协议(protocol)来实现您的要求。
关于iphone - 扩展多个预定义类,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9681434/