feat:fix Nested slider
This commit is contained in:
parent
b67ba993b4
commit
50c31c4a14
@ -156,6 +156,7 @@ @interface DoricFlowLayoutNode () <UICollectionViewDataSource, UICollectionViewD
|
||||
@property(nonatomic, assign) NSUInteger columnCount;
|
||||
@property(nonatomic, assign) CGFloat columnSpace;
|
||||
@property(nonatomic, assign) CGFloat rowSpace;
|
||||
@property(nonatomic, copy) NSString *renderItemFuncId;
|
||||
@end
|
||||
|
||||
@implementation DoricFlowLayoutNode
|
||||
@ -198,9 +199,14 @@ - (void)blendView:(UICollectionView *)view forPropName:(NSString *)name propValu
|
||||
self.itemCount = [prop unsignedIntegerValue];
|
||||
[self.view reloadData];
|
||||
} else if ([@"renderItem" isEqualToString:name]) {
|
||||
[self.itemViewIds removeAllObjects];
|
||||
[self clearSubModel];
|
||||
[self.view reloadData];
|
||||
if ([self.renderItemFuncId isEqualToString:prop]) {
|
||||
} else {
|
||||
[self.itemViewIds removeAllObjects];
|
||||
[self clearSubModel];
|
||||
[self.view reloadData];
|
||||
self.renderItemFuncId = prop;
|
||||
}
|
||||
|
||||
} else if ([@"batchCount" isEqualToString:name]) {
|
||||
self.batchCount = [prop unsignedIntegerValue];
|
||||
} else {
|
||||
|
@ -54,7 +54,11 @@ @interface DoricScrollerNode ()
|
||||
|
||||
@implementation DoricScrollerNode
|
||||
- (DoricScrollView *)build {
|
||||
return [DoricScrollView new];
|
||||
return [[DoricScrollView new] also:^(DoricScrollView *it) {
|
||||
if (@available(iOS 11, *)) {
|
||||
it.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
|
||||
}
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)initWithSuperNode:(DoricSuperNode *)superNode {
|
||||
|
@ -37,6 +37,7 @@ @interface DoricSliderNode () <UICollectionViewDataSource, UICollectionViewDeleg
|
||||
@property(nonatomic, assign) NSUInteger batchCount;
|
||||
@property(nonatomic, copy) NSString *onPageSelectedFuncId;
|
||||
@property(nonatomic, assign) NSUInteger lastPosition;
|
||||
@property(nonatomic, copy) NSString *renderPageFuncId;
|
||||
@end
|
||||
|
||||
@interface DoricSliderView : UICollectionView
|
||||
@ -92,9 +93,14 @@ - (void)blendView:(UICollectionView *)view forPropName:(NSString *)name propValu
|
||||
self.itemCount = [prop unsignedIntegerValue];
|
||||
[self.view reloadData];
|
||||
} else if ([@"renderPage" isEqualToString:name]) {
|
||||
[self.itemViewIds removeAllObjects];
|
||||
[self clearSubModel];
|
||||
[self.view reloadData];
|
||||
if ([self.renderPageFuncId isEqualToString:prop]) {
|
||||
|
||||
} else {
|
||||
[self.itemViewIds removeAllObjects];
|
||||
[self clearSubModel];
|
||||
[self.view reloadData];
|
||||
self.renderPageFuncId = prop;
|
||||
}
|
||||
} else if ([@"batchCount" isEqualToString:name]) {
|
||||
self.batchCount = [prop unsignedIntegerValue];
|
||||
} else if ([@"onPageSlided" isEqualToString:name]) {
|
||||
|
Reference in New Issue
Block a user