读书人

object-c 中@synthesize的用途

发布时间: 2012-09-10 11:02:32 作者: rapoo

object-c 中@synthesize的用处

In your class implementation, you can use the?@synthesize?compiler directive to ask the compiler to generate the methods according to the specification in the declaration:

@synthesize flag;
@synthesize nameObject;
@synthesize rootView;

You can combine the?@synthesize?statements in a single line if you want:

@synthesize flag, nameObject, rootView;

读书人网 >移动开发

热点推荐