Commit 3b7f4785fd7a508daf213484288f76500ca75d7e

Authored by yanglingyu
1 parent 09c19fd8

卡线程操作到辅线程操作,更改图片名字

CNLiveScioLive.xcodeproj/xcshareddata/xcschemes/CNLiveScioLive.xcscheme
@@ -60,6 +60,13 @@ @@ -60,6 +60,13 @@
60 ReferencedContainer = "container:CNLiveScioLive.xcodeproj"> 60 ReferencedContainer = "container:CNLiveScioLive.xcodeproj">
61 </BuildableReference> 61 </BuildableReference>
62 </BuildableProductRunnable> 62 </BuildableProductRunnable>
  63 + <EnvironmentVariables>
  64 + <EnvironmentVariable
  65 + key = "OS_ACTIVITY_MODE"
  66 + value = "disable"
  67 + isEnabled = "YES">
  68 + </EnvironmentVariable>
  69 + </EnvironmentVariables>
63 </LaunchAction> 70 </LaunchAction>
64 <ProfileAction 71 <ProfileAction
65 buildConfiguration = "Release" 72 buildConfiguration = "Release"
CNLiveScioLive/Pages/Home/搜索/View/VideoTableViewCell.m
@@ -53,8 +53,8 @@ @@ -53,8 +53,8 @@
53 frame.size.width += 10; 53 frame.size.width += 10;
54 frame.size.height+= 6; 54 frame.size.height+= 6;
55 frame.origin.x = MainScreenWidth - frame.size.width - 22; 55 frame.origin.x = MainScreenWidth - frame.size.width - 22;
56 - frame.origin.y -= 3;  
57 } 56 }
58 [_tagsLabel setFrame:frame]; 57 [_tagsLabel setFrame:frame];
  58 + _tagsLabel.centerY = _timeLabel.centerY;
59 } 59 }
60 @end 60 @end
CNLiveScioLive/Pages/Home/新闻详情/OldController/OldArticleDetailViewController.m
@@ -33,15 +33,18 @@ @@ -33,15 +33,18 @@
33 _imageArray = [[ NSMutableArray alloc] init]; 33 _imageArray = [[ NSMutableArray alloc] init];
34 34
35 NSString *url = [NSString stringWithFormat:@"%@?from=ios",dictionary[@"pageUrl"]]; 35 NSString *url = [NSString stringWithFormat:@"%@?from=ios",dictionary[@"pageUrl"]];
36 - htmlString = [NSString stringWithContentsOfURL:[NSURL URLWithString:url] encoding:NSUTF8StringEncoding error:nil];  
37 - //替换掉html页面中的展示js  
38 - NSString *replace=[htmlString stringByReplacingOccurrencesOfString:@"previewImage.start(obj);" withString:@""];  
39 - htmlString=replace;  
40 - htmlUrl=dictionary[@"pageUrl"];  
41 - if ([htmlString containsString:@"<video"]) {  
42 - isHaveVideo = YES;  
43 - [[JGMusicManager shareMusicManager] playStop];  
44 - } 36 + dispatch_async(dispatch_get_global_queue(0, 0), ^{
  37 + self->htmlString = [NSString stringWithContentsOfURL:[NSURL URLWithString:url] encoding:NSUTF8StringEncoding error:nil];
  38 + //替换掉html页面中的展示js
  39 + NSString *replace=[self->htmlString stringByReplacingOccurrencesOfString:@"previewImage.start(obj);" withString:@""];
  40 + self->htmlString=replace;
  41 + self->htmlUrl=dictionary[@"pageUrl"];
  42 + if ([self->htmlString containsString:@"<video"]) {
  43 + self->isHaveVideo = YES;
  44 + [[JGMusicManager shareMusicManager] playStop];
  45 + }
  46 + });
  47 +
45 } 48 }
46 return self; 49 return self;
47 } 50 }
CNLiveScioLive/Pages/Home/新闻详情/OldController/OldVideoDetailViewController.m
@@ -40,7 +40,8 @@ @@ -40,7 +40,8 @@
40 self->bgImg = [UIImage imageWithData:data]; 40 self->bgImg = [UIImage imageWithData:data];
41 dispatch_async(dispatch_get_main_queue(), ^{ 41 dispatch_async(dispatch_get_main_queue(), ^{
42 if (self.liveController && self->bgImg) { 42 if (self.liveController && self->bgImg) {
43 - self.liveController.view.contentMode=UIViewContentModeScaleToFill; 43 + self.liveController.view.contentMode=UIViewContentModeScaleAspectFill;
  44 + self.liveController.view.clipsToBounds = YES;
44 self.liveController.view.layer.contents = (__bridge id _Nullable) (self->bgImg.CGImage); 45 self.liveController.view.layer.contents = (__bridge id _Nullable) (self->bgImg.CGImage);
45 46
46 } 47 }
@@ -274,7 +275,8 @@ @@ -274,7 +275,8 @@
274 [self.view addSubview:bgView]; 275 [self.view addSubview:bgView];
275 self.liveController = [[CNLivePlayerController alloc] initWithContentURL:[NSURL URLWithString:self -> url]]; 276 self.liveController = [[CNLivePlayerController alloc] initWithContentURL:[NSURL URLWithString:self -> url]];
276 if (!(nil==bgImg)) { 277 if (!(nil==bgImg)) {
277 - self.liveController.view.contentMode=UIViewContentModeScaleAspectFill; 278 + self.liveController.view.layer.contentsScale=UIViewContentModeScaleAspectFill;
  279 + self.liveController.view.clipsToBounds = YES;
278 self.liveController.view.layer.contents = (__bridge id _Nullable)(self->bgImg.CGImage); 280 self.liveController.view.layer.contents = (__bridge id _Nullable)(self->bgImg.CGImage);
279 } 281 }
280 [[AVAudioSession sharedInstance] setActive:YES error:nil]; 282 [[AVAudioSession sharedInstance] setActive:YES error:nil];
CNLiveScioLive/Pages/Home/新闻详情/OldController/SCIOSpecialViewController.m
@@ -167,8 +167,8 @@ @@ -167,8 +167,8 @@
167 // 设置上拉加载 167 // 设置上拉加载
168 MJRefreshGifHeader *header = [MJRefreshGifHeader headerWithRefreshingTarget:self refreshingAction:@selector(loadData)]; 168 MJRefreshGifHeader *header = [MJRefreshGifHeader headerWithRefreshingTarget:self refreshingAction:@selector(loadData)];
169 NSMutableArray *refreshingImages = [NSMutableArray array]; 169 NSMutableArray *refreshingImages = [NSMutableArray array];
170 - for (NSUInteger i = 1; i <= 4; i++) {  
171 - UIImage *image = [UIImage imageNamed:[NSString stringWithFormat:@"refresh0%zd", i]]; 170 + for (NSUInteger i = 1; i < 4; i++) {
  171 + UIImage *image = [UIImage imageNamed:[NSString stringWithFormat:@"refresh_animation%lu", (unsigned long)i]];
172 [refreshingImages addObject:image]; 172 [refreshingImages addObject:image];
173 } 173 }
174 [header setImages:refreshingImages forState:MJRefreshStateRefreshing]; 174 [header setImages:refreshingImages forState:MJRefreshStateRefreshing];