Browse files

Update property snippet for ARC

Prior to ARC, the default storage for retainable pointer types was ‘assign’ meaning you pretty much had to set a storage type.

With ARC, the default storage type (for retainable pointer types) is now ‘strong’ meaning you probably want to leave out the storage type. Therefor I made the pop-up default to ‘readonly’ and deleting it will also delete the comma. You can still find ‘retain’ and friends in the pop-up (which now also include ‘weak’).
  • Loading branch information...
1 parent 11401c4 commit a3b55eccf8dbcb06773669baafb2fc6caa74fda6 @sorbits sorbits committed Jan 1, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 Snippets/Property.tmSnippet
@@ -3,7 +3,7 @@
<plist version="1.0">
- <string>@property (${2:nonatomic, }${1|retain,readonly,copy,assign|}) ${3:NSSomeClass}${3/^((?!NS(U?Integer|Point|Size|Rect)|C[GF]|BOOL|SEL)[A-Z]\w*)|.*/${1:?${TM_C_POINTER: *}: }/}${4:${3/^(?:(BOOL)|(SEL)|[A-Z](?:[A-Z]+|[a-z]+)([A-Z]\w*))/${1:?flag:${2:?action:\l$3}}/}};</string>
+ <string>@property (${2:nonatomic${1/.+/, /}}${1|readonly,weak,strong,copy,retain,assign|}) ${3:NSSomeClass}${3/^((?!NS(U?Integer|Point|Size|Rect)|C[GF]|BOOL|SEL)[A-Z]\w*)|.*/${1:?${TM_C_POINTER: *}: }/}${4:${3/^(?:(BOOL)|(SEL)|[A-Z](?:[A-Z]+|[a-z]+)([A-Z]\w*))/${1:?flag:${2:?action:\l$3}}/}};</string>
<string>Property (Objective-C 2.0)</string>

0 comments on commit a3b55ec

Please sign in to comment.