This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
__block in MRC and ARC [according to Apple Documents] | |
Ref.: https://developer.apple.com/library/ios/releasenotes/ObjectiveC/RN-TransitioningToARC/Introduction/Introduction.html | |
{ | |
Use Lifetime Qualifiers to Avoid Strong Reference Cycles | |
You can use lifetime qualifiers to avoid strong reference cycles. For example, typically if you have a graph of objects arranged in a parent-child hierarchy and parents need to refer to their children and vice versa, then you make the parent-to-child relationship strong and the child-to-parent relationship weak. Other situations may be more subtle, particularly when they involve block objects. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
objects passed by reference OR by value [according to Apple Documents] | |
Ref.: https://developer.apple.com/library/ios/releasenotes/ObjectiveC/RN-TransitioningToARC/Introduction/Introduction.html | |
//------------------------------------------------------------------------------------------------------------------------// | |
Take care when using __weak variables on the stack. Consider the following example: | |
NSString * __weak string = [[NSString alloc] initWithFormat:@"First Name: %@", [self firstName]]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NSOperation And concurrency | |
concurrent And non-concurrent 并发与非并发 | |
NSOperationQueue and concurrent vs non-concurrent | |
http://stackoverflow.com/questions/1646795/nsoperationqueue-and-concurrent-vs-non-concurrent | |
NSOperation | |
http://nshipster.com/nsoperation/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Managing Toll-Free Bridging | |
Ref.: https://developer.apple.com/library/ios/releasenotes/ObjectiveC/RN-TransitioningToARC/Introduction/Introduction.html | |
In many Cocoa applications, you need to use Core Foundation-style objects, whether from the Core Foundation framework itself (such as CFArrayRef or CFMutableDictionaryRef) or from frameworks that adopt Core Foundation conventions such as Core Graphics (you might use types like CGColorSpaceRef and CGGradientRef). | |
The compiler does not automatically manage the lifetimes of Core Foundation objects; you must call CFRetain and CFRelease (or the corresponding type-specific variants) as dictated by the Core Foundation memory management rules (see Memory Management Programming Guide for Core Foundation). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
################################################ | |
# Added by OYXJ on 2016-01-01 | |
# | |
# Configure git to track only one file extension | |
# http://stackoverflow.com/questions/12799855/configure-git-to-track-only-one-file-extension | |
# | |
# Using .gitignore to ignore everything but specific directories | |
# http://stackoverflow.com/questions/5241644/using-gitignore-to-ignore-everything-but-specific-directories | |
# | |
# Git ignore file for Xcode projects (重要) |