I have an custom UIVIewController that is the base class for other controllers and has an instance of a custom UIView variable that is accessed by inherited the classes.
It is possible that when you compile for target and for simulation the data members are either protected or private. Probably for target are private by default and this seems to cause the problem. Try out playing with the @private
and @protected
keywords.
However, I strongly suggest that you use properties even between your super/sub-classes. Having a complex structure is a bit hard to debug. Setting up a property will transfer the access to the data through the getter/setter methods (a breakpoint on @synthesize
also works) and you will be able to see in the call stack who is accessing what.
Especially, the syntax @synthesize propertyName = prefixDataNameSufix;
allows you to easily adjust your class interface style without having to modify your coding habits.