I'm creating an UIScrollView subclass. On this subclass, I need to detect the scroll events, but I also want to enable the detection of scroll events on a delegate. Also, this UIScrollView subclass needs a custom delegate.
// CustomScrollView.h
#import <UIKit/UIKit.h>
#import "CustomScrollViewDelegate.h"
@interface CustomScrollView : UIScrollView <UIScrollViewDelegate> {
...
}
@property (nonatomic, assign) id <DAGridViewDelegate> delegate;
...
@end
// CustomScrollView.m
#import "DAGridView.h"
@implementation DAGridView
@synthesize delegate;
- (id)init {
self = [super init];
if (self) {
...
}
return self;
}
...
@end
// CustomScrollViewDelegate.h
@class CustomScrollViewDelegate
@protocol CustomScrollViewDelegate <NSObject, CustomScrollViewDelegate>
...
@end
Thanks for helping!!
If you need some more information, comment!!