Search code examples
objective-ciosxcodecode-snippets

Xcode code snippet for class continuation?


I have an Xcode (4.6) code snippet for creating properties – one for weak, one for strong properties:

Weak/strong property snippet in the Xcode code snippet editor

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?


Solution

  • 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.