更新时间:2022-12-10 12:00:23
如果同时覆盖setter和getter,编译器将不再为你自动创建实例变量。您可以将其添加到类实现中,如下所示:
If you override both the setter and the getter, the compiler will not automatically create the instance variable for you anymore. You can add it to your class implementation like so:
@implementation ClassName {
ViewFrameModel *_viewFrameModel;
}
...
@end