Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kgn/xcodesnippets
CodeSnippets for Xcode + a python script to generate a readme so you can see what's in em
https://github.com/kgn/xcodesnippets
Last synced: about 1 month ago
JSON representation
CodeSnippets for Xcode + a python script to generate a readme so you can see what's in em
- Host: GitHub
- URL: https://github.com/kgn/xcodesnippets
- Owner: kgn
- Created: 2012-10-19T07:06:23.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2012-10-21T15:36:00.000Z (about 12 years ago)
- Last Synced: 2023-03-11T10:28:09.140Z (over 1 year ago)
- Language: Python
- Homepage:
- Size: 98.6 KB
- Stars: 2
- Watchers: 4
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
Checkout to: `~/Library/Developer/Xcode/UserData/CodeSnippets/`
## clang warning push/pop
``` obj-c
#pragma clang diagnostic push
#pragma clang diagnostic ignored "<#-W warning#>"
<#code#>
#pragma clang diagnostic pop
```## dispatch_once
``` obj-c
static id <#object#>;
static dispatch_once_t once;
dispatch_once(&once, ^{
<#object#> = <#value#>;
});
```## init
``` obj-c
- (id)init{
if(!(self = [super init])){
return nil;
}<#code#>
return self;
}
```## Log Class:MethodName
``` obj-c
NSLog(@"%@:%@", NSStringFromClass([self class]), NSStringFromSelector(_cmd));
```## Log Method Name
``` obj-c
NSLog(@"%@", NSStringFromSelector(_cmd));
```## Pragma section
``` obj-c
#pragma mark - <#section#>
```## Requires ARC
``` obj-c
#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`*