如何在Objective C中做多个接口? [英] How to do multiple interfaces in Objective C?
本文介绍了如何在Objective C中做多个接口?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我如何在 Objective C 中执行以下操作(以下示例为伪代码):
How can I do the following things in Objective C (the examples below are in pseudo-code):
接口 A 扩展了 B、C
interface A extends B, C
接口 A
接口 B
X 类补充 A、B
3.接口A
X 类实现 A
Y 类实现 A
接口 B
类 Z 扩展 Y 实现 B
class Z extends Y implements B
谢谢!
推荐答案
听起来像家庭作业,你应该迈出第一步:http://en.wikipedia.org/wiki/Objective-C
Sounds like homework, you should take the first move: http://en.wikipedia.org/wiki/Objective-C
看2.2接口和实现
MyClass 扩展类
MyClass extends Class
@interface MyClass : Class { }
@end
MyClass extends Class 实现 Interface1 &接口2
MyClass extends Class implements Interface1 & Interface2
@interface MyClass : Class <Interface1, Interface2> {}
@end
这篇关于如何在Objective C中做多个接口?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文