feat:disable subnode's bounce of refreshable node on iOS
This commit is contained in:
parent
8a1e55168e
commit
10f159cfee
@ -22,6 +22,7 @@
|
|||||||
#import "DoricExtensions.h"
|
#import "DoricExtensions.h"
|
||||||
#import "DoricListItemNode.h"
|
#import "DoricListItemNode.h"
|
||||||
#import "DoricLayouts.h"
|
#import "DoricLayouts.h"
|
||||||
|
#import "DoricRefreshableNode.h"
|
||||||
|
|
||||||
@interface DoricTableViewCell : UITableViewCell
|
@interface DoricTableViewCell : UITableViewCell
|
||||||
@property(nonatomic, strong) DoricListItemNode *doricListItemNode;
|
@property(nonatomic, strong) DoricListItemNode *doricListItemNode;
|
||||||
@ -73,6 +74,13 @@ - (instancetype)initWithContext:(DoricContext *)doricContext {
|
|||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (void)initWithSuperNode:(DoricSuperNode *)superNode {
|
||||||
|
[super initWithSuperNode:superNode];
|
||||||
|
if ([superNode isKindOfClass:[DoricRefreshableNode class]]) {
|
||||||
|
self.view.bounces = NO;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
- (UITableView *)build {
|
- (UITableView *)build {
|
||||||
return [[DoricTableView new] also:^(UITableView *it) {
|
return [[DoricTableView new] also:^(UITableView *it) {
|
||||||
it.dataSource = self;
|
it.dataSource = self;
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
//
|
//
|
||||||
#import "DoricScrollerNode.h"
|
#import "DoricScrollerNode.h"
|
||||||
#import "DoricExtensions.h"
|
#import "DoricExtensions.h"
|
||||||
|
#import "DoricRefreshableNode.h"
|
||||||
|
|
||||||
@implementation DoricScrollView
|
@implementation DoricScrollView
|
||||||
|
|
||||||
@ -56,6 +57,13 @@ - (DoricScrollView *)build {
|
|||||||
return [DoricScrollView new];
|
return [DoricScrollView new];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (void)initWithSuperNode:(DoricSuperNode *)superNode {
|
||||||
|
[super initWithSuperNode:superNode];
|
||||||
|
if ([superNode isKindOfClass:[DoricRefreshableNode class]]) {
|
||||||
|
self.view.bounces = NO;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
- (void)blend:(NSDictionary *)props {
|
- (void)blend:(NSDictionary *)props {
|
||||||
[super blend:props];
|
[super blend:props];
|
||||||
NSDictionary *childModel = [self subModelOf:self.childViewId];
|
NSDictionary *childModel = [self subModelOf:self.childViewId];
|
||||||
|
Reference in New Issue
Block a user