Objective-C中使用的@property和@synthesize是什么? [英] What are @property and @synthesize used for in Objective-C?
本文介绍了Objective-C中使用的@property和@synthesize是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
@property 和 @synthesize 的用途是什么?你能举例说明一下吗?
What is the use of @property and @synthesize? Can you explain with an example please?
推荐答案
答案很简短:它们为ivars创建访问器.
Really short answer: They create accessors for the ivars.
在维基百科上有一些示例.看看那些.
There are some examples on wikipedia. Look at those.
这篇关于Objective-C中使用的@property和@synthesize是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文