文章目錄 Method swizzling is not atomicChanges behavior of un-owned codePossible naming conflictsSwizzling changes the method's argumentsThe order of swizzles mattersDifficult to understand (looks recursive)Difficult to debug
C++和Objective-C混編Using C++ With Objective-C 蘋果的Objective-C編譯器允許使用者在同一個源檔案裡自由地混合使用C++和Objective-C,混編後的語言叫Objective-C++。有了它,你就可以在Objective-C應用程式中使用已有的C++類庫。 Objective-C和C++混編的要點 在
以下內容主要是學習《Effective Objective-C 2.0》所做的筆記,我所購買的原書為英文原版,由於自己英文水平有限,理解可能有疏漏原書購買地址:亞馬遜3、Interface and API DesignItem 15: Use Prefix Names to Avoid Namespace
以下內容主要是學習《Effective Objective-C 2.0》所做的筆記,我所購買的原書為英文原版,由於自己英文水平有限,理解可能有疏漏原書購買地址:亞馬遜4、Protocols and CategoriesItem 23: Use Delegate and Data Source Protocols for Interobject Communication一些知識點:(1)一個協議的命名通常是類名之後加一個Delegate。(2)通常將一個Delegate聲明在類延續類別中。(3)
以下內容主要是學習《Effective Objective-C 2.0》所做的筆記,我所購買的原書為英文原版,由於自己英文水平有限,理解可能有疏漏原書購買地址:亞馬遜6、Blocks and Grand Central DispatchItem 37: Understand Blocks一些知識點:(1)block結構return_type
以下內容主要是學習《Effective Objective-C 2.0》所做的筆記,我所購買的原書為英文原版,由於自己英文水平有限,理解可能有疏漏原書購買地址:亞馬遜7、The System FrameworksItem 47: Familiarize Yourself with the System
很多初學者對nil,Nil,NULL,NSNull,[NSNull null]這五個概念很混淆!先借用網上的解釋:nil: A null pointer to an Objective-C object. Nil: A null pointer to an Objective-C class. NULL: A null pointer to anything else. (primitive type or absence of data) NSNull: A class defines