XCode Code Snippet

Swift

Macro – macro

var <#NAME#> : <#type#> {
    get{
        return <#nil#>
    }
}

Singleton – Singleton

class var sharedInstance: <#ClassName#> {
    dispatch_once(&Inner.token) {
        Inner.instance = <#ClassName#>()
    }
    return Inner.instance!
}

struct Inner {
    static var instance: <#ClassName#>?
    static var token: dispatch_once_t = 0
}

Mark – mark:

//MARK: <#content#>

Obj - C

pragma mark – mark:

#pragma mark - <#title#>