谈ObjC对象的两段构造模式

谈ObjC对象的两段构造模式 https://blog.csdn.net/logcabin/article/details/8505620 Objective-c语言在申请对象的时,需要使用两段构造(Two Stage Creation)的模式。一个对象的创建,需要先调用alloc方法或allocWithZone方法,再调用init方法或initWithSomething方法。如下是一个NSStr
相关文章
相关标签/搜索