Commit 09f2d0db24cc4e1d4323628d7284de17c61d2caf

Authored by yanglingyu
1 parent fa187f32

0.5.6

CNLiveCMineModule.podspec
@@ -8,7 +8,7 @@ @@ -8,7 +8,7 @@
8 8
9 Pod::Spec.new do |s| 9 Pod::Spec.new do |s|
10 s.name = 'CNLiveCMineModule' 10 s.name = 'CNLiveCMineModule'
11 - s.version = '0.5.5' 11 + s.version = '0.5.6'
12 s.summary = '网家家C端个人中心' 12 s.summary = '网家家C端个人中心'
13 13
14 # This description is used to generate tags and improve search results. 14 # This description is used to generate tags and improve search results.
CNLiveCMineModule/Classes/CNCMine/ViewController/CNLiveMineVC.m
@@ -89,8 +89,12 @@ static NSString *const CNSobotNotification_NewMessage = @"CNSobotNotification_Ne @@ -89,8 +89,12 @@ static NSString *const CNSobotNotification_NewMessage = @"CNSobotNotification_Ne
89 make.height.mas_equalTo(DS_adapt_length(75.5)); 89 make.height.mas_equalTo(DS_adapt_length(75.5));
90 }]; 90 }];
91 } 91 }
92 -  
93 - self.bgScrollView.frame = CGRectMake(0, -kStatusHeight, kScreenWidth, kScreenHeight + kStatusHeight); 92 + if ([[[UIDevice currentDevice]systemVersion] floatValue] >= 11.0) {
  93 + self.bgScrollView.frame = CGRectMake(0, -kVerticalStatusHeight, kScreenWidth, kScreenHeight + kVerticalStatusHeight);
  94 + } else {
  95 + self.bgScrollView.frame = CGRectMake(0, 0, kScreenWidth, kScreenHeight);
  96 + }
  97 +
94 self.topSmallView.frame = CGRectMake(0, 0, kScreenWidth, kNavigationBarHeight); 98 self.topSmallView.frame = CGRectMake(0, 0, kScreenWidth, kNavigationBarHeight);
95 self.topImageView.frame = CGRectMake(0, 0, kScreenWidth, DS_adapt_length(273)); 99 self.topImageView.frame = CGRectMake(0, 0, kScreenWidth, DS_adapt_length(273));
96 self.orderView.frame = CGRectMake(DS_adapt_length(10), self.topImageView.bottom -DS_adapt_length(55), kScreenWidth - DS_adapt_length( 20), DS_adapt_length(80)); 100 self.orderView.frame = CGRectMake(DS_adapt_length(10), self.topImageView.bottom -DS_adapt_length(55), kScreenWidth - DS_adapt_length( 20), DS_adapt_length(80));
@@ -181,7 +185,10 @@ static NSString *const CNSobotNotification_NewMessage = @"CNSobotNotification_Ne @@ -181,7 +185,10 @@ static NSString *const CNSobotNotification_NewMessage = @"CNSobotNotification_Ne
181 } 185 }
182 #pragma mark - UIScrollViewDelegate 186 #pragma mark - UIScrollViewDelegate
183 - (void)scrollViewDidScroll:(UIScrollView *)scrollView{ 187 - (void)scrollViewDidScroll:(UIScrollView *)scrollView{
184 - CGFloat contentOffetY = scrollView.offsetY + kStatusHeight; 188 + CGFloat contentOffetY = scrollView.offsetY;
  189 + if ([[[UIDevice currentDevice]systemVersion] floatValue] >= 11.0) {
  190 + contentOffetY = scrollView.offsetY + kVerticalStatusHeight;
  191 + }
185 if (contentOffetY <= DS_adapt_length(35) && contentOffetY > 0) { 192 if (contentOffetY <= DS_adapt_length(35) && contentOffetY > 0) {
186 self.topSmallView.alpha = contentOffetY/DS_adapt_length(35) ; 193 self.topSmallView.alpha = contentOffetY/DS_adapt_length(35) ;
187 [self.view addSubview:self.topImageView.codesView]; 194 [self.view addSubview:self.topImageView.codesView];
@@ -190,12 +197,12 @@ static NSString *const CNSobotNotification_NewMessage = @&quot;CNSobotNotification_Ne @@ -190,12 +197,12 @@ static NSString *const CNSobotNotification_NewMessage = @&quot;CNSobotNotification_Ne
190 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)];
191 if ([CNLiveEnvironmentManager manager].isNewHomePage) { 198 if ([CNLiveEnvironmentManager manager].isNewHomePage) {
192 [self.topImageView.iconImage mas_remakeConstraints:^(MASConstraintMaker *make) { 199 [self.topImageView.iconImage mas_remakeConstraints:^(MASConstraintMaker *make) {
193 - make.top.equalTo(self.view).offset(kStatusHeight+DS_adapt_length(35) - contentOffetY); 200 + make.top.equalTo(self.view).offset(kVerticalStatusHeight+DS_adapt_length(35) - contentOffetY);
194 make.left.equalTo(self.topImageView.backBtn).offset(DS_adapt_length( 12)); 201 make.left.equalTo(self.topImageView.backBtn).offset(DS_adapt_length( 12));
195 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));
196 }]; 203 }];
197 [self.topImageView.codesView mas_makeConstraints:^(MASConstraintMaker *make) { 204 [self.topImageView.codesView mas_makeConstraints:^(MASConstraintMaker *make) {
198 - make.top.equalTo(self.view).offset(kStatusHeight); 205 + make.top.equalTo(self.view).offset(kVerticalStatusHeight);
199 make.right.equalTo(self.view).offset(-DS_adapt_length(10)); 206 make.right.equalTo(self.view).offset(-DS_adapt_length(10));
200 make.height.mas_equalTo(DS_adapt_length(30)); 207 make.height.mas_equalTo(DS_adapt_length(30));
201 make.width.mas_equalTo(DS_adapt_length(70)); 208 make.width.mas_equalTo(DS_adapt_length(70));
@@ -208,12 +215,12 @@ static NSString *const CNSobotNotification_NewMessage = @&quot;CNSobotNotification_Ne @@ -208,12 +215,12 @@ static NSString *const CNSobotNotification_NewMessage = @&quot;CNSobotNotification_Ne
208 }]; 215 }];
209 }else{ 216 }else{
210 [self.topImageView.iconImage mas_remakeConstraints:^(MASConstraintMaker *make) { 217 [self.topImageView.iconImage mas_remakeConstraints:^(MASConstraintMaker *make) {
211 - make.top.equalTo(self.view).offset(kStatusHeight+DS_adapt_length(35) - contentOffetY); 218 + make.top.equalTo(self.view).offset(kVerticalStatusHeight+DS_adapt_length(35) - contentOffetY);
212 make.left.equalTo(self.view).offset(DS_adapt_length( 12)); 219 make.left.equalTo(self.view).offset(DS_adapt_length( 12));
213 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));
214 }]; 221 }];
215 [self.topImageView.codesView mas_makeConstraints:^(MASConstraintMaker *make) { 222 [self.topImageView.codesView mas_makeConstraints:^(MASConstraintMaker *make) {
216 - make.top.equalTo(self.view).offset(kStatusHeight); 223 + make.top.equalTo(self.view).offset(kVerticalStatusHeight);
217 make.right.equalTo(self.view).offset(-DS_adapt_length(10)); 224 make.right.equalTo(self.view).offset(-DS_adapt_length(10));
218 make.height.mas_equalTo(DS_adapt_length(30)); 225 make.height.mas_equalTo(DS_adapt_length(30));
219 make.width.mas_equalTo(DS_adapt_length(105)); 226 make.width.mas_equalTo(DS_adapt_length(105));
@@ -229,12 +236,12 @@ static NSString *const CNSobotNotification_NewMessage = @&quot;CNSobotNotification_Ne @@ -229,12 +236,12 @@ static NSString *const CNSobotNotification_NewMessage = @&quot;CNSobotNotification_Ne
229 self.topImageView.iconImage.layer.mask = [self maskLayerWithWidth:DS_adapt_length(32)]; 236 self.topImageView.iconImage.layer.mask = [self maskLayerWithWidth:DS_adapt_length(32)];
230 if ([CNLiveEnvironmentManager manager].isNewHomePage) { 237 if ([CNLiveEnvironmentManager manager].isNewHomePage) {
231 [self.topImageView.iconImage mas_remakeConstraints:^(MASConstraintMaker *make) { 238 [self.topImageView.iconImage mas_remakeConstraints:^(MASConstraintMaker *make) {
232 - make.top.equalTo(self.view).offset(kStatusHeight); 239 + make.top.equalTo(self.view).offset(kVerticalStatusHeight);
233 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));
234 make.width.height.mas_equalTo(DS_adapt_length(32)); 241 make.width.height.mas_equalTo(DS_adapt_length(32));
235 }]; 242 }];
236 [self.topImageView.codesView mas_makeConstraints:^(MASConstraintMaker *make) { 243 [self.topImageView.codesView mas_makeConstraints:^(MASConstraintMaker *make) {
237 - make.top.equalTo(self.view).offset(kStatusHeight); 244 + make.top.equalTo(self.view).offset(kVerticalStatusHeight);
238 make.right.equalTo(self.view).offset(-DS_adapt_length(10)); 245 make.right.equalTo(self.view).offset(-DS_adapt_length(10));
239 make.height.mas_equalTo(DS_adapt_length(30)); 246 make.height.mas_equalTo(DS_adapt_length(30));
240 make.width.mas_equalTo(DS_adapt_length(70)); 247 make.width.mas_equalTo(DS_adapt_length(70));
@@ -247,12 +254,12 @@ static NSString *const CNSobotNotification_NewMessage = @&quot;CNSobotNotification_Ne @@ -247,12 +254,12 @@ static NSString *const CNSobotNotification_NewMessage = @&quot;CNSobotNotification_Ne
247 }]; 254 }];
248 }else{ 255 }else{
249 [self.topImageView.iconImage mas_remakeConstraints:^(MASConstraintMaker *make) { 256 [self.topImageView.iconImage mas_remakeConstraints:^(MASConstraintMaker *make) {
250 - make.top.equalTo(self.view).offset(kStatusHeight); 257 + make.top.equalTo(self.view).offset(kVerticalStatusHeight);
251 make.left.equalTo(self.view).offset(DS_adapt_length(12)); 258 make.left.equalTo(self.view).offset(DS_adapt_length(12));
252 make.width.height.mas_equalTo(DS_adapt_length(32)); 259 make.width.height.mas_equalTo(DS_adapt_length(32));
253 }]; 260 }];
254 [self.topImageView.codesView mas_makeConstraints:^(MASConstraintMaker *make) { 261 [self.topImageView.codesView mas_makeConstraints:^(MASConstraintMaker *make) {
255 - make.top.equalTo(self.view).offset(kStatusHeight); 262 + make.top.equalTo(self.view).offset(kVerticalStatusHeight);
256 make.right.equalTo(self.view).offset(-DS_adapt_length(10)); 263 make.right.equalTo(self.view).offset(-DS_adapt_length(10));
257 make.height.mas_equalTo(DS_adapt_length(30)); 264 make.height.mas_equalTo(DS_adapt_length(30));
258 make.width.mas_equalTo(DS_adapt_length(105)); 265 make.width.mas_equalTo(DS_adapt_length(105));
@@ -265,14 +272,14 @@ static NSString *const CNSobotNotification_NewMessage = @&quot;CNSobotNotification_Ne @@ -265,14 +272,14 @@ static NSString *const CNSobotNotification_NewMessage = @&quot;CNSobotNotification_Ne
265 [self.topImageView addSubview:self.topImageView.backBtn]; 272 [self.topImageView addSubview:self.topImageView.backBtn];
266 [self.topImageView addSubview:self.topImageView.iconImage]; 273 [self.topImageView addSubview:self.topImageView.iconImage];
267 [self.topImageView.iconImage mas_remakeConstraints:^(MASConstraintMaker *make) { 274 [self.topImageView.iconImage mas_remakeConstraints:^(MASConstraintMaker *make) {
268 - make.top.equalTo(self.topImageView).offset(kStatusHeight+DS_adapt_length(35)); 275 + make.top.equalTo(self.topImageView).offset(kVerticalStatusHeight+DS_adapt_length(35));
269 make.left.equalTo(self.topImageView).offset(DS_adapt_length(12)); 276 make.left.equalTo(self.topImageView).offset(DS_adapt_length(12));
270 make.width.height.mas_equalTo(DS_adapt_length(60)); 277 make.width.height.mas_equalTo(DS_adapt_length(60));
271 }]; 278 }];
272 self.topImageView.iconImage.layer.mask = [self maskLayerWithWidth:DS_adapt_length(60)]; 279 self.topImageView.iconImage.layer.mask = [self maskLayerWithWidth:DS_adapt_length(60)];
273 if ([CNLiveEnvironmentManager manager].isNewHomePage) { 280 if ([CNLiveEnvironmentManager manager].isNewHomePage) {
274 [self.topImageView.codesView mas_remakeConstraints:^(MASConstraintMaker *make) { 281 [self.topImageView.codesView mas_remakeConstraints:^(MASConstraintMaker *make) {
275 - make.top.equalTo(self.topImageView.mas_top).offset(kStatusHeight); 282 + make.top.equalTo(self.topImageView.mas_top).offset(kVerticalStatusHeight);
276 make.right.equalTo(self.topImageView).offset(-DS_adapt_length(10)); 283 make.right.equalTo(self.topImageView).offset(-DS_adapt_length(10));
277 make.height.mas_equalTo(DS_adapt_length(30)); 284 make.height.mas_equalTo(DS_adapt_length(30));
278 make.width.mas_equalTo(DS_adapt_length(70)); 285 make.width.mas_equalTo(DS_adapt_length(70));
@@ -285,7 +292,7 @@ static NSString *const CNSobotNotification_NewMessage = @&quot;CNSobotNotification_Ne @@ -285,7 +292,7 @@ static NSString *const CNSobotNotification_NewMessage = @&quot;CNSobotNotification_Ne
285 }]; 292 }];
286 }else{ 293 }else{
287 [self.topImageView.codesView mas_remakeConstraints:^(MASConstraintMaker *make) { 294 [self.topImageView.codesView mas_remakeConstraints:^(MASConstraintMaker *make) {
288 - make.top.equalTo(self.topImageView.mas_top).offset(kStatusHeight); 295 + make.top.equalTo(self.topImageView.mas_top).offset(kVerticalStatusHeight);
289 make.right.equalTo(self.topImageView).offset(-DS_adapt_length(10)); 296 make.right.equalTo(self.topImageView).offset(-DS_adapt_length(10));
290 make.height.mas_equalTo(DS_adapt_length(30)); 297 make.height.mas_equalTo(DS_adapt_length(30));
291 make.width.mas_equalTo(DS_adapt_length(105)); 298 make.width.mas_equalTo(DS_adapt_length(105));