是否可以在appCode中自动将方法声明为头文件(.h)?

S.J*_*Lim 1 objective-c appcode

我使用了appCode.

当我在@implementation文件中编写方法时,我想通过appCode的一些功能自动将方法声明为heder文件.

ex)我在@implementation文件中编写了一个方法.

@implementation myClass
- (void)testMethod{
}
@end
Run Code Online (Sandbox Code Playgroud)

自动将方法声明为@interface文件.

@interface myClass
- (void)testMethod;  <== automatically insert.
@end
Run Code Online (Sandbox Code Playgroud)

如何通过appcode的功能自动将方法声明为头文件?

小智 7

使用插入光标位于testMethod名称时,调用Opt + Enter并从列表中选择"声明接口中的方法".