The protocol definition of TimelineViewDelegate currently looks like this:
@protocol TimelineViewDelegate <NSObject>
...
@end
Because TimelineView inherits from UIScrollView, and UIScrollView already has a property 'delegate', you require every class that is a TimelineViewDelegate to also explicitly be a UIScrollViewDelegate:
@interface TimelineView : UIScrollView
...
@property (weak, nonatomic) IBOutlet id<TimelineViewDelegate,UIScrollViewDelegate>delegate;
...
@end
However, if you would let the TimelineViewDelegate protocol inherit from UIScrollViewDelegate, you could overcome this 'issue', and thus requiring less unneccessary code.
If we change the protocol definition to this:
@protocol TimelineViewDelegate <NSObject, UIScrollViewDelegate>
And make this change in TimelineView.h:
@property (weak, nonatomic) IBOutlet id<TimelineViewDelegate,UIScrollViewDelegate>delegate;
In your sample code, the delegate and dataSource are set via interface builder, which is why no warning is given when compiling the sample project -- even though ViewController does not conform to the UIScrollViewDelegate protocol. When setting the data source and/or the delegate programmatically, however, a compile warning is given.