如何弃用整个协议?
是否可以弃用整个协议?我使用的是 iOS SDK 5.0 Beta 7 附带的 GCC 编译器。
DEPRECATED_ATTRIBUTE
似乎不起作用。
例如,以下两条语句无法编译。
@protocol DEPRECATED_ATTRIBUTE MyProtocol
@protocol MyProtocol DEPRECATED_ATTRIBUTE
Is it possible to deprecate an entire protocol? I'm using the GCC compiler that is shipped with iOS SDK 5.0 Beta 7.
DEPRECATED_ATTRIBUTE
doesn't seem to work.
For example, the following two statements do not compile.
@protocol DEPRECATED_ATTRIBUTE MyProtocol
@protocol MyProtocol DEPRECATED_ATTRIBUTE
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我自己没有尝试过,但我认为以下语法应该有效。
这与弃用整个接口和单个方法的语法类似。
I haven't tried this myself, but I think that the following syntax should work.
This parallels the syntax for deprecating an entire interface as well as a single method.