Skip to content

Instantly share code, notes, and snippets.

@lucholaf
lucholaf / gist:e37f4d26e406250a156a
Last active Sep 5, 2016
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
View gist:e37f4d26e406250a156a
> $PROJECT_DIR/merge.swift; find $PROJECT_DIR/ -iname *.swift -not -name merge.swift -exec cat {} >> $PROJECT_DIR/merge.swift \;
View 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
View gist:2988188
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];
}
}
You can’t perform that action at this time.