An Xcode Objective-C / Swift 4 code snippet repository.
Installation via these commands will overwrite any existing code snippets!
cd ~/Library/Developer/Xcode/UserData/
git clone https://github.com/jfuellert/CodeSnippets.git
- Restart Xcode
- Constant
constant
- Delegate
delegate
- Declare local immutable property
var
- Declare lazy load local property
varlazy
- Mac Catalyst target wrapper
mactarget
- Create constraints
createconstraints
- Prepare for reuse
prepareforreuse
- Layout subviews
layoutsubviews
- Dealloc
deal
- Pragma mark
prag
- Comment
/
- Dispatch after
dispatchafter
- External CGFloat
externfloat
- External NSUInteger
externinteger
- External NSString
externstring
- Internal CGFloat
constfloat
- Internal NSUInteger
constinteger
- Internal NSString
conststring
- Delegate
delegate
- Assign
assign
- Strong
strong
- Copy
copy
- Weak
weak
- Assign readonly
assignreadonly
- Strong readonly
strongreadonly
- Copy readonly
copyreadonly
- Weak readonly
weakreadonly
- Init
init
- Dealloc
deal
- View did load
viewdidload
- Layout subviews
layoutsubviews
- Update constraints
updateconstraints
- Lazy load local property
var
- Prepare for reuse
prepareforreuse
- Keyframe animation
keyframe
- Get width
getwidth
- Get height
getheight
- Get min X
getminx
- Get min Y
getminy
- Get max X
getmaxx
- Get max Y
getmaxy
- Pragma mark
prag
- Comment
/