美文网首页
OC语言@property @synthesize和id

OC语言@property @synthesize和id

作者: 隔壁小羊 | 来源:发表于2016-08-12 18:32 被阅读11次

1.@property @synthesize关键字

*注意:这两个关键字是编译器特性,让xcode可以自动生成getter和setter的声明和实现

*@property关键字

@property自动生产某个成员变量的set和get方法

*@synthesize关键字

@synthesize关键字帮助生成成员变量的setter和getter方法的实现。

id  这个关键字指向任何的对象

相关文章

网友评论

      本文标题:OC语言@property @synthesize和id

      本文链接:https://www.haomeiwen.com/subject/dxdesttx.html