2016年6月22日 星期三

iOS常見面試問題每日研究

本文原自 iOS 中级面试题
http://mrpeak.cn/ios/2016/01/07/push

Day 1. ARC, Automatic Reference Counting

Apple, Transitioning to ARC Release Notes
https://developer.apple.com/library/ios/releasenotes/ObjectiveC/RN-TransitioningToARC/Introduction/Introduction.html

Wiki, Automatic Reference Counting
https://en.wikipedia.org/wiki/Automatic_Reference_Counting

理解 Objective-C 的 ARC
http://www.oschina.net/translate/objc-automatic-reference-counting-in-xcode-explained

自動引用計數
https://tommy60703.gitbooks.io/swift-language-traditional-chinese/content/chapter2/16_Automatic_Reference_Counting.html

Swifter, @AUTORELEASEPOOL
http://swifter.tips/autoreleasepool/

Day 2. assign vs weak, __block vs __weak

被无数人写过的assign,retain,strong,weak,unsafe_unretained,还有copy
http://www.jianshu.com/p/4a1d1921284b

__weak与__block区别
http://honglu.me/2015/01/06/weak%E4%B8%8Eblock%E5%8C%BA%E5%88%AB/

Day 3. Atomic

Properties Are Atomic by Default
https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/EncapsulatingData/EncapsulatingData.html

iOS基礎之atomic與nonatomic,assign,copy與retain的定義和區別
http://fanli7.net/a/bianchengyuyan/C__/20130618/372617.html

Objective-C——atomic一定是线程安全的吗?
http://blog.csdn.net/chenyufeng1991/article/details/49687215

Day 4. Retain cycle

Swift 自動引用計數 類別實例之間的迴圈強參考
https://tommy60703.gitbooks.io/swift-language-traditional-chinese/content/chapter2/16_Automatic_Reference_Counting.html#strong_reference_cycles_between_class_instances

iOS blocks - 三個會造成retain cycle的anti patterns
http://popcornylu.blogspot.tw/2012/02/3-anti-patterns-which-lead-memory-leaks.html

Day 5. Runtime

Objective-C Runtime Programming Guide
https://developer.apple.com/library/ios/documentation/Cocoa/Conceptual/ObjCRuntimeGuide/Introduction/Introduction.html

iOS runtime学习笔记
http://www.jianshu.com/p/970ae3bac1ef

理解 Objective-C Runtime
http://justinyan.me/post/1624

Day 6. +(void)load; +(void)initialize;

Objective C类方法load和initialize的区别
http://www.cnblogs.com/ider/archive/2012/09/29/objective_c_load_vs_initialize.html

Day 7. Method swizzling

Objective-C的hook方案(一): Method Swizzling
http://blog.csdn.net/yiyaaixuexi/article/details/9374411

Objective-C Runtime 运行时之四:Method Swizzling
http://southpeak.github.io/blog/2014/11/06/objective-c-runtime-yun-xing-shi-zhi-si-:method-swizzling/

Day 8. UIView與CALayer

详解 CALayer 和 UIView 的区别和联系
http://www.cocoachina.com/ios/20150828/13244.html

KKBOX iOS/Mac OS X 基本開發教材 CALayer
https://zonble.gitbooks.io/kkbox-ios-dev/content/core_animation/calayer.html

Day 9. UIImageView 圓角

iOS 高效添加圆角效果实战讲解
http://www.jianshu.com/p/f970872fdc22

Day 10. drawRect

iOS重绘机制drawRect
http://blog.csdn.net/nyh1006/article/details/38899251

内存恶鬼drawRect
http://bihongbo.com/2016/01/03/memoryGhostdrawRect/

Day 11. 研究Alamofire

GitHub Alamofire/Alamofire
https://github.com/Alamofire/Alamofire

对于AlamoFire几点思考,AlamoFire几点思考
http://www.zendei.com/article/4319.html

Alamofire 源码赏析(一)基础篇
http://liuduo.me/2015/11/17/Alamofire-%E6%BA%90%E7%A0%81%E8%B5%8F%E6%9E%90%EF%BC%88%E4%B8%80%EF%BC%89%E5%9F%BA%E7%A1%80%E7%AF%87/

优秀源码阅读:Swift网络库Alamofire
http://www.cocoachina.com/ios/20151118/14240.html

从 Alamofire 源码学习 Swift
http://broccoliii.me/2016/05/07/Learning_Swift_from_Alamofire_source/

Day 12. Instrument

Instruments Tutorial with Swift: Getting Started
https://www.raywenderlich.com/97886/instruments-tutorial-with-swift-getting-started

Day . GCD

KKBOX GCD(Grand Central Dispatch)
https://zonble.gitbooks.io/kkbox-ios-dev/content/threading/gcd.html