I would suggest a readonly string property in ClassB.h
.
ClassB.h:
@property (nonatomic, readonly) NSString *classAString;
ClassB.m:
- (NSString *) classAString
{
return self.classA.displayString;
}
This acts as a "getter" method for the particular string you need, and avoids others getting access to classA.
Edit:
Others suggested adding classA as a readonly property in ClassB.h. This will still allow modification of classA properties, it will only guarantee that classA is not reassigned to another ClassA instance.