Objective-c - What does the syntax getter assignment syntax mean when defining properties in iOS?
漂亮男人2017-05-16 13:19:04
0
1
752
When defining properties on iOS @property (assign, nonatomic, getter=isDidSelected) BOOL didSelected; What does getter=isDidSelected mean? After the Demo I downloaded was written like this, the attribute isDidSelected was no longer defined.
To put it bluntly, it’s just to change the name of the get method
If you don’t write getter=isDidSelected, then the get method of Boolean value didSelected is didSelected. You can
Come and rewrite it. Use together
Come and get it.
If you write getter=isDidSelected, then the get method of Boolean value didSelected is isDidSelected. You can
Come and rewrite it. Use together
Come and get it.