Skip to content

Instantly share code, notes, and snippets.

@lucholaf
lucholaf / gist:e37f4d26e406250a156a
Last active September 5, 2016 15:06
Xcode pre-action: generate Swift FAT file to reduce compilation time, since it's faster to recompile the whole source code in a single file
> $PROJECT_DIR/merge.swift; find $PROJECT_DIR/ -iname *.swift -not -name merge.swift -exec cat {} >> $PROJECT_DIR/merge.swift \;
@lucholaf
lucholaf / iOS dev notes
Created November 20, 2014 13:45
iOS dev notes
WWDC 2013 - #???: What's new in Foundation Networking
-----------------------------------------------------
. NSURLConnection, configured through NSURLRequest. Has a global storage for cookies, cache, etc.
. NSURLSession, replaces NSURLConnection, per object configurable.
. Uploads/Downloads through the filesystem. Can be done Out-of-process, but not a regular data request.
. NSURLSessionTask per request, represents the status and progress. Cancel, Suspend, Resume.
. Per session policies: cache, cookies, credentials.
. backgroundSessionConfiguration
. Background Transfers
void generateMipMaps(CCTexture2D *texture)
{
if ([[UIScreen mainScreen] scale] > 1)
{
[texture generateMipmap];
ccTexParams texParams = { GL_LINEAR_MIPMAP_LINEAR, GL_LINEAR, GL_CLAMP_TO_EDGE, GL_CLAMP_TO_EDGE };
[texture setTexParameters:&texParams];
}
}