Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我刚开始从 iphone 构建目标 c。
我有界面:
@interface test : UIView
它实现了 UIView 的所有方法,现在我希望它的接口也继承自 CDVPlugin。我该怎么做?
我读到目标 c 不提供多重继承。
你不能从 CDVPlugin 和 UIView 中获得。
我建议做这样的事情
@interface test : NSObject { UIView *view; CDVPlugin *plugin; } @property(nonatomic, retain) UIView *view; @property(nonatomic, retain) CDVPlugin *plugin; @end
您可以向该类添加方法来处理您尝试执行的任何操作。然后只需使用 test.view 访问视图和 test.plugin 访问插件。