iOS:add ScrollViewDelegate for scroller,list and flowlayout
This commit is contained in:
@@ -47,7 +47,7 @@ - (void)layoutSelf:(CGSize)targetSize {
|
||||
|
||||
@end
|
||||
|
||||
@interface DoricScrollerNode ()
|
||||
@interface DoricScrollerNode () <UIScrollViewDelegate>
|
||||
@property(nonatomic, strong) DoricViewNode *childNode;
|
||||
@property(nonatomic, copy) NSString *childViewId;
|
||||
@end
|
||||
@@ -55,6 +55,7 @@ @interface DoricScrollerNode ()
|
||||
@implementation DoricScrollerNode
|
||||
- (DoricScrollView *)build {
|
||||
return [[DoricScrollView new] also:^(DoricScrollView *it) {
|
||||
it.delegate = self;
|
||||
if (@available(iOS 11, *)) {
|
||||
it.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
|
||||
}
|
||||
@@ -123,4 +124,7 @@ - (DoricViewNode *)subNodeWithViewId:(NSString *)viewId {
|
||||
}
|
||||
return nil;
|
||||
}
|
||||
- (void)scrollViewDidScroll:(UIScrollView *)scrollView {
|
||||
[self.delegate scrollViewDidScroll:scrollView];
|
||||
}
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user