Commit 132757082a67257a472f11c25d9f4f1cb91c81d3
1 parent
357c9aa3
14系统兼容问题
Showing
3 changed files
with
9 additions
and
1 deletions
CNLiveScioLive/Pages/Live/View/CNLiveIndicatorTableViewCell.m
| @@ -23,6 +23,7 @@ | @@ -23,6 +23,7 @@ | ||
| 23 | { | 23 | { |
| 24 | self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]; | 24 | self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]; |
| 25 | if (self) { | 25 | if (self) { |
| 26 | + self.contentView.backgroundColor = [UIColor whiteColor]; | ||
| 26 | // self.accessoryType = UITableViewCellAccessoryDisclosureIndicator; | 27 | // self.accessoryType = UITableViewCellAccessoryDisclosureIndicator; |
| 27 | _titleLabel = [[UILabel alloc] init]; | 28 | _titleLabel = [[UILabel alloc] init]; |
| 28 | _titleLabel.numberOfLines = 2; | 29 | _titleLabel.numberOfLines = 2; |
CNLiveScioLive/Pages/Tools/SDCycleScrollView/SDCollectionViewCell.m
| @@ -46,6 +46,7 @@ | @@ -46,6 +46,7 @@ | ||
| 46 | if (self = [super initWithFrame:frame]) { | 46 | if (self = [super initWithFrame:frame]) { |
| 47 | [self setupImageView]; | 47 | [self setupImageView]; |
| 48 | [self setupTitleLabel]; | 48 | [self setupTitleLabel]; |
| 49 | + [self setupTitleBgView]; | ||
| 49 | } | 50 | } |
| 50 | 51 | ||
| 51 | return self; | 52 | return self; |
| @@ -113,7 +114,7 @@ | @@ -113,7 +114,7 @@ | ||
| 113 | CGFloat titleLabelX = 10; | 114 | CGFloat titleLabelX = 10; |
| 114 | CGFloat titleLabelY = self.sd_height - titleLabelH-10; | 115 | CGFloat titleLabelY = self.sd_height - titleLabelH-10; |
| 115 | _titleLabel.frame = CGRectMake(titleLabelX, titleLabelY, titleLabelW-2*titleLabelX, titleLabelH); | 116 | _titleLabel.frame = CGRectMake(titleLabelX, titleLabelY, titleLabelW-2*titleLabelX, titleLabelH); |
| 116 | - [self setupTitleBgView]; | 117 | + _bgView.frame = CGRectMake(0, _titleLabel.sd_y, [UIScreen mainScreen].bounds.size.width, _titleLabel.sd_height + 20); |
| 117 | } | 118 | } |
| 118 | } | 119 | } |
| 119 | - (void)setupTitleBgView | 120 | - (void)setupTitleBgView |
CNLiveScioLive/Pages/Tools/SDCycleScrollView/SDCycleScrollView.m
| @@ -510,6 +510,12 @@ NSString * const ID = @"SDCycleScrollViewCell"; | @@ -510,6 +510,12 @@ NSString * const ID = @"SDCycleScrollViewCell"; | ||
| 510 | size = [pageControl sizeForNumberOfPages:self.imagePathsGroup.count]; | 510 | size = [pageControl sizeForNumberOfPages:self.imagePathsGroup.count]; |
| 511 | } else { | 511 | } else { |
| 512 | size = CGSizeMake(self.imagePathsGroup.count * self.pageControlDotSize.width * 1.5, self.pageControlDotSize.height); | 512 | size = CGSizeMake(self.imagePathsGroup.count * self.pageControlDotSize.width * 1.5, self.pageControlDotSize.height); |
| 513 | + if (@available(iOS 14.0, *)) { | ||
| 514 | + if ([self.pageControl isKindOfClass:[UIPageControl class]]) { | ||
| 515 | + UIPageControl *pageControl = (UIPageControl *)_pageControl; | ||
| 516 | + size.width = [pageControl sizeForNumberOfPages:self.imagePathsGroup.count].width; | ||
| 517 | + } | ||
| 518 | + } | ||
| 513 | } | 519 | } |
| 514 | CGFloat x = (self.sd_width - size.width) * 0.5; | 520 | CGFloat x = (self.sd_width - size.width) * 0.5; |
| 515 | if (self.pageControlAliment == SDCycleScrollViewPageContolAlimentRight) { | 521 | if (self.pageControlAliment == SDCycleScrollViewPageContolAlimentRight) { |