C99标准新增指定初始化(Designated Initializer),即可按照任意顺序对数组某些元素或结构体某些成员进行选择性初始化,只需指明它们所对应的数组下标或结构体成员名。
基于88个网页-相关网页
...evaluation):即便你目前没有设置自定义属性的值,也应该等到调用者需要时再创建对象。 指定初始化函数(designated initializer):即类中的某个初始化方法被指派为指定初始化函数。
基于48个网页-相关网页
这个最主要的初始函数即Designated Initializer(指定初始化器),可以理解为是类的默认初始函数。比如,UIView的Designated Initializer是initWithFrame:而不是init: 原则1.
基于34个网页-相关网页
指定初始化方法 (designated initializer)就是指能确保所有实例变量都能被初始化的方法, 这种方法是初始化的核心,类的非初始化方法会调用指定初始化方法完成初始化。
基于20个网页-相关网页
This is the designated initializer for this class.
这个是指定这个类初始化。
The designated initializer syntax allows you to initialize members by name, without regard to the order in which they appear in an object.
指定的初始化程序语法允许您通过名字初始化成员,不用理会它们在对象中出现的顺序。
When you use an object initializer to create an instance of a named type, the default constructor for the class is called, followed by initialization of designated members in the order you specify.
当您使用物件初始设定式来建立具名型别的执行个体时,会呼叫类别的预设建构函式,接著按照您指定的顺序初始化指定的成员。
应用推荐