I'll appreciate if anyone can explain the logic behind protocol inheritance. e.g. what does the following mean (UITableView.h):
@protocol UITableViewDelegate<NSObject, UIScrollViewDelegate>
The following class implementation doesn't work. I have a class View1 (which inherits UIView), with an associated protocol. I have another class, View2 (which inhertits View1). Now i want to inherit the the protocol as well. Can anyone please point me in the right direction.
Class 1:
@protocol View1Delegate;
@interface View1 : UIView {
id <View1Delegate> delegate;
// . . .
}
@property (nonatomic, assign) id <View1Delegate> delegate; // default nil. weak reference
@end
@protocol View1Delegate <NSObject>
- (void)View1DelegateMethod;
@end
@implementation View1
@synthesize delegate;
// . . .
@end
Class 2:
@protocol View2Delegate;
@interface View2 : View1 {
id <View2Delegate> delegate;
// . . .
}
@property (nonatomic, assign) id <View2Delegate> delegate; // default nil. weak reference
@end
@protocol View2Delegate <NSObject>
- (void)View2DelegateMethod;
@end
@implementation View2
@synthesize delegate;
// . . .
@end