iOS: do not show indication in slider

This commit is contained in:
pengfei.zhou 2021-04-30 14:20:45 +08:00 committed by osborn
parent 91b1a3c24c
commit f8b983b8d2

View File

@ -59,7 +59,6 @@ - (instancetype)initWithContext:(DoricContext *)doricContext {
- (UICollectionView *)build { - (UICollectionView *)build {
UICollectionViewFlowLayout *flowLayout = [[UICollectionViewFlowLayout alloc] init]; UICollectionViewFlowLayout *flowLayout = [[UICollectionViewFlowLayout alloc] init];
[flowLayout setScrollDirection:UICollectionViewScrollDirectionHorizontal]; [flowLayout setScrollDirection:UICollectionViewScrollDirectionHorizontal];
return [[[DoricSliderView alloc] initWithFrame:CGRectZero return [[[DoricSliderView alloc] initWithFrame:CGRectZero
collectionViewLayout:flowLayout] collectionViewLayout:flowLayout]
also:^(UICollectionView *it) { also:^(UICollectionView *it) {
@ -67,6 +66,8 @@ - (UICollectionView *)build {
it.pagingEnabled = YES; it.pagingEnabled = YES;
it.delegate = self; it.delegate = self;
it.dataSource = self; it.dataSource = self;
it.showsHorizontalScrollIndicator = NO;
it.showsVerticalScrollIndicator = NO;
[it registerClass:[DoricSliderViewCell class] forCellWithReuseIdentifier:@"doricCell"]; [it registerClass:[DoricSliderViewCell class] forCellWithReuseIdentifier:@"doricCell"];
if (@available(iOS 11, *)) { if (@available(iOS 11, *)) {
it.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever; it.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;