CodeSnippets for Xcode + a python script to generate a readme so you can see what's in em
Python
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
3509D55C-0F28-4A06-8CA6-9A38549319C8.codesnippet
4C036366-69F0-4B2C-8CE7-2BEE96D7DD81.codesnippet
8604B449-29B8-4052-AB3C-DB25546C7C64.codesnippet
A08D56BE-27C0-49D6-9BE3-3437BF4004DC.codesnippet
B05C4D3A-17E6-40A4-A0DC-202E7BCFD439.codesnippet
BDE0BADF-C770-43D7-ADCE-C970EC8FFAF8.codesnippet
F21CBC68-51C1-4EDC-8199-CD67E96F308A.codesnippet
readme.md
readme.py

readme.md

Checkout to: ~/Library/Developer/Xcode/UserData/CodeSnippets/

clang warning push/pop

#pragma clang diagnostic push
#pragma clang diagnostic ignored "<#-W warning#>"
<#code#>
#pragma clang diagnostic pop

dispatch_once

static id <#object#>;
static dispatch_once_t once;
dispatch_once(&once, ^{
    <#object#> = <#value#>;
});

init

- (id)init{
    if(!(self = [super init])){
        return nil;
    }

    <#code#>

    return self;
}

Log Class:MethodName

NSLog(@"%@:%@", NSStringFromClass([self class]), NSStringFromSelector(_cmd));

Log Method Name

NSLog(@"%@", NSStringFromSelector(_cmd));

Pragma section

#pragma mark - <#section#>

Requires ARC

#if !__has_feature(objc_arc)
#error <#library#> must be built with ARC.
// You can turn on ARC for only <#library#> files by adding -fobjc-arc to the build phase for each of its files.
#endif

Generated by readme.py: python readme.py