Commit 09f2d0db24cc4e1d4323628d7284de17c61d2caf

Authored by yanglingyu
1 parent fa187f32

0.5.6

CNLiveCMineModule.podspec
... ... @@ -8,7 +8,7 @@
8 8  
9 9 Pod::Spec.new do |s|
10 10 s.name = 'CNLiveCMineModule'
11   - s.version = '0.5.5'
  11 + s.version = '0.5.6'
12 12 s.summary = '网家家C端个人中心'
13 13  
14 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 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 98 self.topSmallView.frame = CGRectMake(0, 0, kScreenWidth, kNavigationBarHeight);
95 99 self.topImageView.frame = CGRectMake(0, 0, kScreenWidth, DS_adapt_length(273));
96 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 185 }
182 186 #pragma mark - UIScrollViewDelegate
183 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 192 if (contentOffetY <= DS_adapt_length(35) && contentOffetY > 0) {
186 193 self.topSmallView.alpha = contentOffetY/DS_adapt_length(35) ;
187 194 [self.view addSubview:self.topImageView.codesView];
... ... @@ -190,12 +197,12 @@ static NSString *const CNSobotNotification_NewMessage = @&quot;CNSobotNotification_Ne
190 197 self.topImageView.iconImage.layer.mask = [self maskLayerWithWidth:DS_adapt_length(60) - self.topSmallView.alpha * DS_adapt_length(28)];
191 198 if ([CNLiveEnvironmentManager manager].isNewHomePage) {
192 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 201 make.left.equalTo(self.topImageView.backBtn).offset(DS_adapt_length( 12));
195 202 make.width.height.mas_equalTo(DS_adapt_length(60) - self.topSmallView.alpha * DS_adapt_length(28));
196 203 }];
197 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 206 make.right.equalTo(self.view).offset(-DS_adapt_length(10));
200 207 make.height.mas_equalTo(DS_adapt_length(30));
201 208 make.width.mas_equalTo(DS_adapt_length(70));
... ... @@ -208,12 +215,12 @@ static NSString *const CNSobotNotification_NewMessage = @&quot;CNSobotNotification_Ne
208 215 }];
209 216 }else{
210 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 219 make.left.equalTo(self.view).offset(DS_adapt_length( 12));
213 220 make.width.height.mas_equalTo(DS_adapt_length(60) - self.topSmallView.alpha * DS_adapt_length(28));
214 221 }];
215 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 224 make.right.equalTo(self.view).offset(-DS_adapt_length(10));
218 225 make.height.mas_equalTo(DS_adapt_length(30));
219 226 make.width.mas_equalTo(DS_adapt_length(105));
... ... @@ -229,12 +236,12 @@ static NSString *const CNSobotNotification_NewMessage = @&quot;CNSobotNotification_Ne
229 236 self.topImageView.iconImage.layer.mask = [self maskLayerWithWidth:DS_adapt_length(32)];
230 237 if ([CNLiveEnvironmentManager manager].isNewHomePage) {
231 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 240 make.left.equalTo(self.topImageView.backBtn.mas_right).offset(DS_adapt_length(12));
234 241 make.width.height.mas_equalTo(DS_adapt_length(32));
235 242 }];
236 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 245 make.right.equalTo(self.view).offset(-DS_adapt_length(10));
239 246 make.height.mas_equalTo(DS_adapt_length(30));
240 247 make.width.mas_equalTo(DS_adapt_length(70));
... ... @@ -247,12 +254,12 @@ static NSString *const CNSobotNotification_NewMessage = @&quot;CNSobotNotification_Ne
247 254 }];
248 255 }else{
249 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 258 make.left.equalTo(self.view).offset(DS_adapt_length(12));
252 259 make.width.height.mas_equalTo(DS_adapt_length(32));
253 260 }];
254 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 263 make.right.equalTo(self.view).offset(-DS_adapt_length(10));
257 264 make.height.mas_equalTo(DS_adapt_length(30));
258 265 make.width.mas_equalTo(DS_adapt_length(105));
... ... @@ -265,14 +272,14 @@ static NSString *const CNSobotNotification_NewMessage = @&quot;CNSobotNotification_Ne
265 272 [self.topImageView addSubview:self.topImageView.backBtn];
266 273 [self.topImageView addSubview:self.topImageView.iconImage];
267 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 276 make.left.equalTo(self.topImageView).offset(DS_adapt_length(12));
270 277 make.width.height.mas_equalTo(DS_adapt_length(60));
271 278 }];
272 279 self.topImageView.iconImage.layer.mask = [self maskLayerWithWidth:DS_adapt_length(60)];
273 280 if ([CNLiveEnvironmentManager manager].isNewHomePage) {
274 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 283 make.right.equalTo(self.topImageView).offset(-DS_adapt_length(10));
277 284 make.height.mas_equalTo(DS_adapt_length(30));
278 285 make.width.mas_equalTo(DS_adapt_length(70));
... ... @@ -285,7 +292,7 @@ static NSString *const CNSobotNotification_NewMessage = @&quot;CNSobotNotification_Ne
285 292 }];
286 293 }else{
287 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 296 make.right.equalTo(self.topImageView).offset(-DS_adapt_length(10));
290 297 make.height.mas_equalTo(DS_adapt_length(30));
291 298 make.width.mas_equalTo(DS_adapt_length(105));
... ...