properties - Objective-C: use variable in children class, which is created automatically by property in parent class? -
properties - Objective-C: use variable in children class, which is created automatically by property in parent class? -
i want subclass icarousel
have troubles private variables. example:
icarousel.h
@interface icarousel : uiview ... @property (nonatomic, assign, getter = isvertical) bool vertical; ... @end
icarousel.m
@implementation icarousel - (void)setup { ... _vertical = ...; ... } - (void)setvertical:(bool)vertical { if (_vertical != vertical) { _vertical = vertical; [self layoutitemviews]; } } @end
they set variable _vertical
without accessing of property , avoid calling of overridden setter method.
could access same variable, not property in kid class without changing of icarousel
.h , .m files?
objective-c properties private protected icarousel
Comments
Post a Comment