在询问之前我不想放弃,因为这是任何 Java/.Net IDE 中的基本功能。编译器告诉我:
Incomplete implementation of class...
Method definition for '-someMethod:' not found
但是单击、右键单击、祈祷和谷歌搜索并没有让我自动创建一个方法存根。Xcode 可以为我创建一个方法存根并带我去那里吗?
如果不是,为什么会这样(除了“真正的程序员喜欢打字”)?
Edit: I thought that option-escape basically solved this for me, but it does not. It doesn't seem to be aware of all (any?) of the interfaces my class implements.
这可能是向 Apple 提交功能请求的一个选项。通常,我会设计我的 @interface 文件,然后将 @interface 复制/粘贴到 @implementation,从而将打字次数保持在绝对最低限度。
然而,如果能够单击警告并让 Xcode 在 @implementation 的底部创建方法,那就太好了。
注意:在@implementation后面保留分号是有效的
@interface PCStackValue : NSObject <NSCoding, NSCopying>
{
}
- (id) initWithDisplayRadix:(int) newRadix;
@end
@implementation PCStackValue
- (id) initWithDisplayRadix:(int) newRadix;
{
… do something;
}
@end
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)