随笔分类 - Programming with Objective-C
Reading makes you stronger!
摘要:苹果官方文档:不稳定的传送门读书笔记共有以下几篇,其他的知识点不重要或者已经熟悉不需记录《Programming with Objective-C》第三章 Working with Objects《Programming with Objective-C》第四章 Encapsulating Data...
阅读全文
摘要:Blocks are Objective-C objects, which means they can be added to collections like NSArray or NSDictionary.Block语法——无参数版本定义(Block的值)^{ NSLog(@"This ...
阅读全文
摘要:Object和普通变量的区别If you’re used to using terms like the stack and the heap, a local variable is allocated on the stack, while objects are allocated on th...
阅读全文
摘要:Designated Initializer不稳定的传送门合成属性Properties don’t always have to be backed by their own instance variables.As an example, theXYZPersonclass might defi...
阅读全文
摘要:1.分类里面只新增函数,不要新增变量;虽然新增是语法合法的,但是编译器并不会为你的property合成相应的成员变量、setter和getterCategories can be used to declare either instance methods or class methods but...
阅读全文
摘要:1.平台相关的数据类型These types, likeNSIntegerandNSUInteger, are defined differently depending on the target architecture. When building for a 32-bit environme...
阅读全文
摘要:一个类,可能有很多初始化函数,但是有主次之分,最主要的初始函数应该对类内应当需要初始化的变量进行初始化。这个最主要的初始函数即Designated Initializer(指定初始化器),可以理解为是类的默认初始函数。比如,UIView的Designated Initializer是initWith
阅读全文

浙公网安备 33010602011771号