1.instancetype和id区别
id在编译时不能判断对象的真实类型;
instancetype在编译时能判断对象的真实类型,不符合会警告;
id可以做变量,返回值,行参;
instancetype只能做返回值,返回类型 为所在类的类型;
2.synthesize & denamic
3.
id在编译时不能判断对象的真实类型;
instancetype在编译时能判断对象的真实类型,不符合会警告;
id可以做变量,返回值,行参;
instancetype只能做返回值,返回类型 为所在类的类型;
3.
本文标题:mszj
本文链接:https://www.haomeiwen.com/subject/yprvhttx.html
网友评论