From 5df1a9e0deae1f32812f8b040192169a921765a6 Mon Sep 17 00:00:00 2001 From: wanghualei Date: Fri, 19 Aug 2022 18:35:44 +0800 Subject: [PATCH] =?UTF-8?q?fix=20ios=2014.x=20=E4=B8=8A=E5=88=86=E4=BA=AB?= =?UTF-8?q?=E8=A7=86=E5=9B=BE=E5=81=8F=E7=A7=BB=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ios/Classes/Api/MOP_showBotomSheetModel.m | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ios/Classes/Api/MOP_showBotomSheetModel.m b/ios/Classes/Api/MOP_showBotomSheetModel.m index 522a23c..8c0922b 100644 --- a/ios/Classes/Api/MOP_showBotomSheetModel.m +++ b/ios/Classes/Api/MOP_showBotomSheetModel.m @@ -165,6 +165,10 @@ static NSString *cellID = @"cellid"; _collectionView.pagingEnabled = YES; _collectionView.showsVerticalScrollIndicator = NO; _collectionView.showsHorizontalScrollIndicator = NO; + _collectionView.backgroundColor = [UIColor whiteColor]; + if (@available(iOS 11.0, *)) { + _collectionView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever; + } } return _collectionView;; } @@ -180,9 +184,11 @@ static NSString *cellID = @"cellid"; self.imageView.frame = CGRectMake((frame.size.width-50)/2, 10, 50, 50); [self.contentView addSubview:self.imageView]; - self.label = [[UILabel alloc] initWithFrame:CGRectMake((frame.size.width-50)/2, 65, frame.size.width, 30)]; + // self.label = [[UILabel alloc] initWithFrame:CGRectMake((frame.size.width-50)/2, 65, frame.size.width, 30)]; + self.label = [[UILabel alloc] initWithFrame:CGRectMake(25, 65, frame.size.width-50, 30)]; self.label.font = [UIFont systemFontOfSize:14]; self.label.textColor = [UIColor grayColor]; + self.label.textAlignment = NSTextAlignmentCenter; [self.contentView addSubview:self.label]; }