diff --git a/xplan-ios/Main/Mine/View/Noble/View/SubViews/XPNobleRankTableViewCell.m b/xplan-ios/Main/Mine/View/Noble/View/SubViews/XPNobleRankTableViewCell.m index 262b3802..8765c3f0 100644 --- a/xplan-ios/Main/Mine/View/Noble/View/SubViews/XPNobleRankTableViewCell.m +++ b/xplan-ios/Main/Mine/View/Noble/View/SubViews/XPNobleRankTableViewCell.m @@ -58,7 +58,6 @@ - (void)initSubViewConstraints { [self.rankButton mas_makeConstraints:^(MASConstraintMaker *make) { - make.size.mas_equalTo(CGSizeMake(25 * 1.2, 21 * 1.2)); make.left.mas_equalTo(self.contentView).offset(15); make.centerY.mas_equalTo(self.contentView); }]; @@ -122,6 +121,7 @@ _rankButton = [UIButton buttonWithType:UIButtonTypeCustom]; [_rankButton setTitleColor:[UIColor colorWithWhite:1 alpha:0.3] forState:UIControlStateNormal]; _rankButton.titleLabel.font = [UIFont systemFontOfSize:24 weight:UIFontWeightBold]; + [_rankButton setContentCompressionResistancePriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisHorizontal]; } return _rankButton; } diff --git a/xplan-ios/Main/Mine/View/Noble/View/XPNobleRankViewController.m b/xplan-ios/Main/Mine/View/Noble/View/XPNobleRankViewController.m index fca4ed9a..bdaf0e42 100644 --- a/xplan-ios/Main/Mine/View/Noble/View/XPNobleRankViewController.m +++ b/xplan-ios/Main/Mine/View/Noble/View/XPNobleRankViewController.m @@ -68,8 +68,17 @@ [self.view addSubview:self.myInfoView]; [self.contentImageView addSubview:self.tableView]; + CGFloat scale = 283.0 / 375.0; + CGFloat kOffY = (scale * KScreenWidth + 8 + 40 + 16 + 443) - KScreenHeight; + CGFloat kbottomHeight = ( 64 + kSafeAreaBottomHeight); + if (kOffY > 0) { + self.tableView.contentInset = UIEdgeInsetsMake(0, 0, kbottomHeight+ kOffY + 10, 0); + } else if(fabs(kOffY) > kbottomHeight) { + self.tableView.contentInset = UIEdgeInsetsMake(0, 0, fabs(kOffY) - kbottomHeight + 10, 0); + } else { + self.tableView.contentInset = UIEdgeInsetsMake(0, 0, kbottomHeight + 10, 0); + } - self.tableView.contentInset = UIEdgeInsetsMake(0, 0, 64 + kSafeAreaBottomHeight, 0); } - (void)initSubViewConstraints { @@ -79,10 +88,11 @@ make.top.mas_equalTo(self.view).offset(kStatusBarHeight); }]; - CGFloat scale = 283.0 / 375.0; + CGFloat scale = 283.0 / 375.0; [self.topImageView mas_makeConstraints:^(MASConstraintMaker *make) { - make.left.right.top.mas_equalTo(self.view); + make.left.right.mas_equalTo(self.view); make.height.mas_equalTo(KScreenWidth * scale); + make.top.mas_equalTo(self.view.mas_top); }]; [self.updateView mas_makeConstraints:^(MASConstraintMaker *make) { @@ -101,7 +111,7 @@ [self.tableView mas_makeConstraints:^(MASConstraintMaker *make) { make.top.mas_equalTo(self.contentImageView).offset(10); make.left.right.mas_equalTo(self.contentImageView); - make.bottom.mas_equalTo(self.contentImageView).offset(-88); + make.bottom.mas_equalTo(self.contentImageView); }]; [self.myInfoView mas_makeConstraints:^(MASConstraintMaker *make) {