问题
I have an Xcode (4.6) code snippet for creating properties – one for weak, one for strong properties:
![](https://i0.wp.com/i.stack.imgur.com/uHDGy.png)
Typing propstrong
works nicely in the interface declaration (.h file), but doesn’t offer me the snippet when I do it in the class continuation:
@interface MyClass ()
propstrong
// nothing happens :(
@end
I have tried all the completion scopes in the snippet editor (even “All”), to no avail. Any ideas?
回答1:
I had mistakenly left the Language field at its strangely-default selection, Objective-C++. Change this to Objective-C, and the snippet works in class continuations.
来源:https://stackoverflow.com/questions/14213686/xcode-code-snippet-for-class-continuation