I came across the following code snippets from Apple's Documentation.
The Interface is fairly straightforward:
#import <Foundation/Foundation.h>
#import "ApplicationCell.h"
@interface CompositeSubviewBasedApplicationCell : ApplicationCell {
UIView *cellContentView;
}
@end
The implementation:
#import "CompositeSubviewBasedApplicationCell.h"
@interface CompositeSubviewBasedApplicationCellContentView : UIView {
ApplicationCell *_cell;
BOOL _highlighted;
}
@end
@implementation CompositeSubviewBasedApplicationCellContentView
//not important, abbreviated...
@end
I can't quite figure out why there is another @interface declaration in the implementation file. I assume that it is a way of declaring private instance variable. Am I right?
And since the interface already said that CompositeSubviewBasedApplicationCell extends ApplicationCell, what does CompositeSubviewBasedApplicationCellContentView : UIView mean?
Thanks in advance.