如何覆盖@synthesized getters? [英] How to override @synthesized getters?
本文介绍了如何覆盖@synthesized getters?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何覆盖属性合成的getter?
how to override a property synthesized getter?
推荐答案
在属性定义中,您可以指定getter和setter方法如下:
Inside of your property definition you can specify getter and setter methods as follows:
@property (nonatomic, retain, getter = getterMethodName, setter = setterMethodName) NSString *someString;
您可以仅指定getter,仅指定setter,或同时指定两者。
You can specify the getter only, the setter only, or both.
这篇关于如何覆盖@synthesized getters?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文