Commit b49a8f7803177fcf8e879494b001c56ca8842bac
1 parent
09f2d0db
bug修复
Showing
4 changed files
with
21 additions
and
16 deletions
CNLiveCMineModule/Classes/CNCMine/ViewController/CNLiveMineVC.m
| @@ -90,7 +90,7 @@ static NSString *const CNSobotNotification_NewMessage = @"CNSobotNotification_Ne | @@ -90,7 +90,7 @@ static NSString *const CNSobotNotification_NewMessage = @"CNSobotNotification_Ne | ||
| 90 | }]; | 90 | }]; |
| 91 | } | 91 | } |
| 92 | if ([[[UIDevice currentDevice]systemVersion] floatValue] >= 11.0) { | 92 | if ([[[UIDevice currentDevice]systemVersion] floatValue] >= 11.0) { |
| 93 | - self.bgScrollView.frame = CGRectMake(0, -kVerticalStatusHeight, kScreenWidth, kScreenHeight + kVerticalStatusHeight); | 93 | + self.bgScrollView.frame = CGRectMake(0, -kStatusHeight, kScreenWidth, kScreenHeight + kStatusHeight); |
| 94 | } else { | 94 | } else { |
| 95 | self.bgScrollView.frame = CGRectMake(0, 0, kScreenWidth, kScreenHeight); | 95 | self.bgScrollView.frame = CGRectMake(0, 0, kScreenWidth, kScreenHeight); |
| 96 | } | 96 | } |
| @@ -187,7 +187,7 @@ static NSString *const CNSobotNotification_NewMessage = @"CNSobotNotification_Ne | @@ -187,7 +187,7 @@ static NSString *const CNSobotNotification_NewMessage = @"CNSobotNotification_Ne | ||
| 187 | - (void)scrollViewDidScroll:(UIScrollView *)scrollView{ | 187 | - (void)scrollViewDidScroll:(UIScrollView *)scrollView{ |
| 188 | CGFloat contentOffetY = scrollView.offsetY; | 188 | CGFloat contentOffetY = scrollView.offsetY; |
| 189 | if ([[[UIDevice currentDevice]systemVersion] floatValue] >= 11.0) { | 189 | if ([[[UIDevice currentDevice]systemVersion] floatValue] >= 11.0) { |
| 190 | - contentOffetY = scrollView.offsetY + kVerticalStatusHeight; | 190 | + contentOffetY = scrollView.offsetY + kStatusHeight; |
| 191 | } | 191 | } |
| 192 | if (contentOffetY <= DS_adapt_length(35) && contentOffetY > 0) { | 192 | if (contentOffetY <= DS_adapt_length(35) && contentOffetY > 0) { |
| 193 | self.topSmallView.alpha = contentOffetY/DS_adapt_length(35) ; | 193 | self.topSmallView.alpha = contentOffetY/DS_adapt_length(35) ; |
| @@ -197,12 +197,12 @@ static NSString *const CNSobotNotification_NewMessage = @"CNSobotNotification_Ne | @@ -197,12 +197,12 @@ static NSString *const CNSobotNotification_NewMessage = @"CNSobotNotification_Ne | ||
| 197 | self.topImageView.iconImage.layer.mask = [self maskLayerWithWidth:DS_adapt_length(60) - self.topSmallView.alpha * DS_adapt_length(28)]; | 197 | self.topImageView.iconImage.layer.mask = [self maskLayerWithWidth:DS_adapt_length(60) - self.topSmallView.alpha * DS_adapt_length(28)]; |
| 198 | if ([CNLiveEnvironmentManager manager].isNewHomePage) { | 198 | if ([CNLiveEnvironmentManager manager].isNewHomePage) { |
| 199 | [self.topImageView.iconImage mas_remakeConstraints:^(MASConstraintMaker *make) { | 199 | [self.topImageView.iconImage mas_remakeConstraints:^(MASConstraintMaker *make) { |
| 200 | - make.top.equalTo(self.view).offset(kVerticalStatusHeight+DS_adapt_length(35) - contentOffetY); | 200 | + make.top.equalTo(self.view).offset(kStatusHeight+DS_adapt_length(35) - contentOffetY); |
| 201 | make.left.equalTo(self.topImageView.backBtn).offset(DS_adapt_length( 12)); | 201 | make.left.equalTo(self.topImageView.backBtn).offset(DS_adapt_length( 12)); |
| 202 | make.width.height.mas_equalTo(DS_adapt_length(60) - self.topSmallView.alpha * DS_adapt_length(28)); | 202 | make.width.height.mas_equalTo(DS_adapt_length(60) - self.topSmallView.alpha * DS_adapt_length(28)); |
| 203 | }]; | 203 | }]; |
| 204 | [self.topImageView.codesView mas_makeConstraints:^(MASConstraintMaker *make) { | 204 | [self.topImageView.codesView mas_makeConstraints:^(MASConstraintMaker *make) { |
| 205 | - make.top.equalTo(self.view).offset(kVerticalStatusHeight); | 205 | + make.top.equalTo(self.view).offset(kStatusHeight); |
| 206 | make.right.equalTo(self.view).offset(-DS_adapt_length(10)); | 206 | make.right.equalTo(self.view).offset(-DS_adapt_length(10)); |
| 207 | make.height.mas_equalTo(DS_adapt_length(30)); | 207 | make.height.mas_equalTo(DS_adapt_length(30)); |
| 208 | make.width.mas_equalTo(DS_adapt_length(70)); | 208 | make.width.mas_equalTo(DS_adapt_length(70)); |
| @@ -215,12 +215,12 @@ static NSString *const CNSobotNotification_NewMessage = @"CNSobotNotification_Ne | @@ -215,12 +215,12 @@ static NSString *const CNSobotNotification_NewMessage = @"CNSobotNotification_Ne | ||
| 215 | }]; | 215 | }]; |
| 216 | }else{ | 216 | }else{ |
| 217 | [self.topImageView.iconImage mas_remakeConstraints:^(MASConstraintMaker *make) { | 217 | [self.topImageView.iconImage mas_remakeConstraints:^(MASConstraintMaker *make) { |
| 218 | - make.top.equalTo(self.view).offset(kVerticalStatusHeight+DS_adapt_length(35) - contentOffetY); | 218 | + make.top.equalTo(self.view).offset(kStatusHeight+DS_adapt_length(35) - contentOffetY); |
| 219 | make.left.equalTo(self.view).offset(DS_adapt_length( 12)); | 219 | make.left.equalTo(self.view).offset(DS_adapt_length( 12)); |
| 220 | make.width.height.mas_equalTo(DS_adapt_length(60) - self.topSmallView.alpha * DS_adapt_length(28)); | 220 | make.width.height.mas_equalTo(DS_adapt_length(60) - self.topSmallView.alpha * DS_adapt_length(28)); |
| 221 | }]; | 221 | }]; |
| 222 | [self.topImageView.codesView mas_makeConstraints:^(MASConstraintMaker *make) { | 222 | [self.topImageView.codesView mas_makeConstraints:^(MASConstraintMaker *make) { |
| 223 | - make.top.equalTo(self.view).offset(kVerticalStatusHeight); | 223 | + make.top.equalTo(self.view).offset(kStatusHeight); |
| 224 | make.right.equalTo(self.view).offset(-DS_adapt_length(10)); | 224 | make.right.equalTo(self.view).offset(-DS_adapt_length(10)); |
| 225 | make.height.mas_equalTo(DS_adapt_length(30)); | 225 | make.height.mas_equalTo(DS_adapt_length(30)); |
| 226 | make.width.mas_equalTo(DS_adapt_length(105)); | 226 | make.width.mas_equalTo(DS_adapt_length(105)); |
| @@ -236,12 +236,12 @@ static NSString *const CNSobotNotification_NewMessage = @"CNSobotNotification_Ne | @@ -236,12 +236,12 @@ static NSString *const CNSobotNotification_NewMessage = @"CNSobotNotification_Ne | ||
| 236 | self.topImageView.iconImage.layer.mask = [self maskLayerWithWidth:DS_adapt_length(32)]; | 236 | self.topImageView.iconImage.layer.mask = [self maskLayerWithWidth:DS_adapt_length(32)]; |
| 237 | if ([CNLiveEnvironmentManager manager].isNewHomePage) { | 237 | if ([CNLiveEnvironmentManager manager].isNewHomePage) { |
| 238 | [self.topImageView.iconImage mas_remakeConstraints:^(MASConstraintMaker *make) { | 238 | [self.topImageView.iconImage mas_remakeConstraints:^(MASConstraintMaker *make) { |
| 239 | - make.top.equalTo(self.view).offset(kVerticalStatusHeight); | 239 | + make.top.equalTo(self.view).offset(kStatusHeight); |
| 240 | make.left.equalTo(self.topImageView.backBtn.mas_right).offset(DS_adapt_length(12)); | 240 | make.left.equalTo(self.topImageView.backBtn.mas_right).offset(DS_adapt_length(12)); |
| 241 | make.width.height.mas_equalTo(DS_adapt_length(32)); | 241 | make.width.height.mas_equalTo(DS_adapt_length(32)); |
| 242 | }]; | 242 | }]; |
| 243 | [self.topImageView.codesView mas_makeConstraints:^(MASConstraintMaker *make) { | 243 | [self.topImageView.codesView mas_makeConstraints:^(MASConstraintMaker *make) { |
| 244 | - make.top.equalTo(self.view).offset(kVerticalStatusHeight); | 244 | + make.top.equalTo(self.view).offset(kStatusHeight); |
| 245 | make.right.equalTo(self.view).offset(-DS_adapt_length(10)); | 245 | make.right.equalTo(self.view).offset(-DS_adapt_length(10)); |
| 246 | make.height.mas_equalTo(DS_adapt_length(30)); | 246 | make.height.mas_equalTo(DS_adapt_length(30)); |
| 247 | make.width.mas_equalTo(DS_adapt_length(70)); | 247 | make.width.mas_equalTo(DS_adapt_length(70)); |
| @@ -254,12 +254,12 @@ static NSString *const CNSobotNotification_NewMessage = @"CNSobotNotification_Ne | @@ -254,12 +254,12 @@ static NSString *const CNSobotNotification_NewMessage = @"CNSobotNotification_Ne | ||
| 254 | }]; | 254 | }]; |
| 255 | }else{ | 255 | }else{ |
| 256 | [self.topImageView.iconImage mas_remakeConstraints:^(MASConstraintMaker *make) { | 256 | [self.topImageView.iconImage mas_remakeConstraints:^(MASConstraintMaker *make) { |
| 257 | - make.top.equalTo(self.view).offset(kVerticalStatusHeight); | 257 | + make.top.equalTo(self.view).offset(kStatusHeight); |
| 258 | make.left.equalTo(self.view).offset(DS_adapt_length(12)); | 258 | make.left.equalTo(self.view).offset(DS_adapt_length(12)); |
| 259 | make.width.height.mas_equalTo(DS_adapt_length(32)); | 259 | make.width.height.mas_equalTo(DS_adapt_length(32)); |
| 260 | }]; | 260 | }]; |
| 261 | [self.topImageView.codesView mas_makeConstraints:^(MASConstraintMaker *make) { | 261 | [self.topImageView.codesView mas_makeConstraints:^(MASConstraintMaker *make) { |
| 262 | - make.top.equalTo(self.view).offset(kVerticalStatusHeight); | 262 | + make.top.equalTo(self.view).offset(kStatusHeight); |
| 263 | make.right.equalTo(self.view).offset(-DS_adapt_length(10)); | 263 | make.right.equalTo(self.view).offset(-DS_adapt_length(10)); |
| 264 | make.height.mas_equalTo(DS_adapt_length(30)); | 264 | make.height.mas_equalTo(DS_adapt_length(30)); |
| 265 | make.width.mas_equalTo(DS_adapt_length(105)); | 265 | make.width.mas_equalTo(DS_adapt_length(105)); |
| @@ -272,14 +272,14 @@ static NSString *const CNSobotNotification_NewMessage = @"CNSobotNotification_Ne | @@ -272,14 +272,14 @@ static NSString *const CNSobotNotification_NewMessage = @"CNSobotNotification_Ne | ||
| 272 | [self.topImageView addSubview:self.topImageView.backBtn]; | 272 | [self.topImageView addSubview:self.topImageView.backBtn]; |
| 273 | [self.topImageView addSubview:self.topImageView.iconImage]; | 273 | [self.topImageView addSubview:self.topImageView.iconImage]; |
| 274 | [self.topImageView.iconImage mas_remakeConstraints:^(MASConstraintMaker *make) { | 274 | [self.topImageView.iconImage mas_remakeConstraints:^(MASConstraintMaker *make) { |
| 275 | - make.top.equalTo(self.topImageView).offset(kVerticalStatusHeight+DS_adapt_length(35)); | 275 | + make.top.equalTo(self.topImageView).offset(kStatusHeight+DS_adapt_length(35)); |
| 276 | make.left.equalTo(self.topImageView).offset(DS_adapt_length(12)); | 276 | make.left.equalTo(self.topImageView).offset(DS_adapt_length(12)); |
| 277 | make.width.height.mas_equalTo(DS_adapt_length(60)); | 277 | make.width.height.mas_equalTo(DS_adapt_length(60)); |
| 278 | }]; | 278 | }]; |
| 279 | self.topImageView.iconImage.layer.mask = [self maskLayerWithWidth:DS_adapt_length(60)]; | 279 | self.topImageView.iconImage.layer.mask = [self maskLayerWithWidth:DS_adapt_length(60)]; |
| 280 | if ([CNLiveEnvironmentManager manager].isNewHomePage) { | 280 | if ([CNLiveEnvironmentManager manager].isNewHomePage) { |
| 281 | [self.topImageView.codesView mas_remakeConstraints:^(MASConstraintMaker *make) { | 281 | [self.topImageView.codesView mas_remakeConstraints:^(MASConstraintMaker *make) { |
| 282 | - make.top.equalTo(self.topImageView.mas_top).offset(kVerticalStatusHeight); | 282 | + make.top.equalTo(self.topImageView.mas_top).offset(kStatusHeight); |
| 283 | make.right.equalTo(self.topImageView).offset(-DS_adapt_length(10)); | 283 | make.right.equalTo(self.topImageView).offset(-DS_adapt_length(10)); |
| 284 | make.height.mas_equalTo(DS_adapt_length(30)); | 284 | make.height.mas_equalTo(DS_adapt_length(30)); |
| 285 | make.width.mas_equalTo(DS_adapt_length(70)); | 285 | make.width.mas_equalTo(DS_adapt_length(70)); |
| @@ -292,7 +292,7 @@ static NSString *const CNSobotNotification_NewMessage = @"CNSobotNotification_Ne | @@ -292,7 +292,7 @@ static NSString *const CNSobotNotification_NewMessage = @"CNSobotNotification_Ne | ||
| 292 | }]; | 292 | }]; |
| 293 | }else{ | 293 | }else{ |
| 294 | [self.topImageView.codesView mas_remakeConstraints:^(MASConstraintMaker *make) { | 294 | [self.topImageView.codesView mas_remakeConstraints:^(MASConstraintMaker *make) { |
| 295 | - make.top.equalTo(self.topImageView.mas_top).offset(kVerticalStatusHeight); | 295 | + make.top.equalTo(self.topImageView.mas_top).offset(kStatusHeight); |
| 296 | make.right.equalTo(self.topImageView).offset(-DS_adapt_length(10)); | 296 | make.right.equalTo(self.topImageView).offset(-DS_adapt_length(10)); |
| 297 | make.height.mas_equalTo(DS_adapt_length(30)); | 297 | make.height.mas_equalTo(DS_adapt_length(30)); |
| 298 | make.width.mas_equalTo(DS_adapt_length(105)); | 298 | make.width.mas_equalTo(DS_adapt_length(105)); |
CNLiveCMineModule/Classes/CNCSubMine/View/CNLiveToolsCell.m
| @@ -17,6 +17,9 @@ | @@ -17,6 +17,9 @@ | ||
| 17 | { | 17 | { |
| 18 | if (self = [super initWithFrame:frame]) { | 18 | if (self = [super initWithFrame:frame]) { |
| 19 | [self.contentView addSubview:self.listView]; | 19 | [self.contentView addSubview:self.listView]; |
| 20 | + [self.listView mas_makeConstraints:^(MASConstraintMaker *make) { | ||
| 21 | + make.left.right.top.bottom.equalTo(self); | ||
| 22 | + }]; | ||
| 20 | } | 23 | } |
| 21 | return self; | 24 | return self; |
| 22 | } | 25 | } |
| @@ -29,7 +32,7 @@ | @@ -29,7 +32,7 @@ | ||
| 29 | 32 | ||
| 30 | - (CNListCollectionView *)listView{ | 33 | - (CNListCollectionView *)listView{ |
| 31 | if (!_listView) { | 34 | if (!_listView) { |
| 32 | - _listView = [[CNListCollectionView alloc] initWithFrame:CGRectMake(0, 0, self.width, self.height)]; | 35 | + _listView = [[CNListCollectionView alloc] initWithFrame:CGRectZero]; |
| 33 | } | 36 | } |
| 34 | return _listView; | 37 | return _listView; |
| 35 | } | 38 | } |
CNLiveCMineModule/Classes/Colletion/View/CNMineCollectionCell.m
| @@ -71,6 +71,7 @@ | @@ -71,6 +71,7 @@ | ||
| 71 | [_timeLabel mas_makeConstraints:^(MASConstraintMaker *make) { | 71 | [_timeLabel mas_makeConstraints:^(MASConstraintMaker *make) { |
| 72 | make.top.mas_equalTo(weakSelf.iconView.mas_bottom).offset(10*RATIO); | 72 | make.top.mas_equalTo(weakSelf.iconView.mas_bottom).offset(10*RATIO); |
| 73 | make.left.mas_equalTo(weakSelf.contentView).offset(20); | 73 | make.left.mas_equalTo(weakSelf.contentView).offset(20); |
| 74 | + make.right.mas_equalTo(weakSelf.contentView).offset(-20); | ||
| 74 | }]; | 75 | }]; |
| 75 | [_playerView mas_makeConstraints:^(MASConstraintMaker *make) { | 76 | [_playerView mas_makeConstraints:^(MASConstraintMaker *make) { |
| 76 | make.center.mas_equalTo(weakSelf.iconView); | 77 | make.center.mas_equalTo(weakSelf.iconView); |
| @@ -218,7 +219,8 @@ | @@ -218,7 +219,8 @@ | ||
| 218 | _timeLabel.textColor = CNLiveColorWithHexString(@"#989898"); | 219 | _timeLabel.textColor = CNLiveColorWithHexString(@"#989898"); |
| 219 | _timeLabel.font = UIFontCNMake(12); | 220 | _timeLabel.font = UIFontCNMake(12); |
| 220 | _timeLabel.numberOfLines = 1; | 221 | _timeLabel.numberOfLines = 1; |
| 221 | - _timeLabel.lineBreakMode = NSTextAlignmentLeft; | 222 | + _timeLabel.textAlignment = NSTextAlignmentLeft; |
| 223 | + _timeLabel.lineBreakMode = NSLineBreakByTruncatingMiddle; | ||
| 222 | } | 224 | } |
| 223 | return _timeLabel; | 225 | return _timeLabel; |
| 224 | } | 226 | } |
Example/CNLiveCMineModule/CNLIVEAppDelegate.m
| @@ -28,7 +28,7 @@ | @@ -28,7 +28,7 @@ | ||
| 28 | 28 | ||
| 29 | [super application:application didFinishLaunchingWithOptions:launchOptions]; | 29 | [super application:application didFinishLaunchingWithOptions:launchOptions]; |
| 30 | 30 | ||
| 31 | - [CNUserInfoManager manager].userInfoModel.uid = @"398926";//@"10510277";//11174272//12857262 | 31 | + [CNUserInfoManager manager].userInfoModel.uid = @"11174272";//@"10510277";//11174272//12857262 |
| 32 | 32 | ||
| 33 | self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; | 33 | self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; |
| 34 | self.window.backgroundColor = [UIColor whiteColor]; | 34 | self.window.backgroundColor = [UIColor whiteColor]; |