Commit b49a8f7803177fcf8e879494b001c56ca8842bac

Authored by yanglingyu
1 parent 09f2d0db

bug修复

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