Commit edad50ee36a7b4b4801f4d0b6cb73ac367fac326

Authored by zhangxiaowen
1 parent 192a2bef

no message

CNLiveScioLive/Pages/Base/CNLiveBaseNavigationController.m
@@ -13,7 +13,6 @@ @@ -13,7 +13,6 @@
13 @end 13 @end
14 14
15 @implementation CNLiveBaseNavigationController 15 @implementation CNLiveBaseNavigationController
16 -  
17 - (void)viewDidLoad { 16 - (void)viewDidLoad {
18 [super viewDidLoad]; 17 [super viewDidLoad];
19 // Do any additional setup after loading the view. 18 // Do any additional setup after loading the view.
@@ -64,4 +63,18 @@ @@ -64,4 +63,18 @@
64 return self.childViewControllers.count > 1; 63 return self.childViewControllers.count > 1;
65 64
66 } 65 }
  66 +
  67 +- (BOOL)shouldAutorotate {
  68 + return self.topViewController.shouldAutorotate;
  69 +
  70 +}
  71 +
  72 +- (UIInterfaceOrientationMask)supportedInterfaceOrientations {
  73 + return self.topViewController.supportedInterfaceOrientations;
  74 +}
  75 +
  76 +- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation {
  77 + return self.topViewController.preferredInterfaceOrientationForPresentation;
  78 +}
  79 +
67 @end 80 @end
CNLiveScioLive/Pages/Base/CNLiveBaseViewController.m
@@ -28,7 +28,7 @@ @@ -28,7 +28,7 @@
28 28
29 [self setUpNavigationBar]; 29 [self setUpNavigationBar];
30 self.view.backgroundColor = [UIColor whiteColor]; 30 self.view.backgroundColor = [UIColor whiteColor];
31 - [self.navigationController setNavigationBarHidden:NO]; 31 +// [self.navigationController setNavigationBarHidden:NO];
32 32
33 } 33 }
34 34
@@ -179,9 +179,11 @@ @@ -179,9 +179,11 @@
179 179
180 - (BOOL)shouldAutorotate { 180 - (BOOL)shouldAutorotate {
181 return NO; 181 return NO;
  182 +
182 } 183 }
  184 +
183 - (UIInterfaceOrientationMask)supportedInterfaceOrientations { 185 - (UIInterfaceOrientationMask)supportedInterfaceOrientations {
184 return UIInterfaceOrientationMaskPortrait; 186 return UIInterfaceOrientationMaskPortrait;
  187 +
185 } 188 }
186 -  
187 @end 189 @end
CNLiveScioLive/Pages/Base/CNLiveENTabBarController.m
@@ -118,4 +118,13 @@ @@ -118,4 +118,13 @@
118 // Dispose of any resources that can be recreated. 118 // Dispose of any resources that can be recreated.
119 } 119 }
120 120
  121 +- (BOOL)shouldAutorotate{
  122 + return self.selectedViewController.shouldAutorotate;
  123 +}
  124 +
  125 +- (UIInterfaceOrientationMask)supportedInterfaceOrientations{
  126 + return [self.selectedViewController supportedInterfaceOrientations];
  127 +
  128 +}
  129 +
121 @end 130 @end
CNLiveScioLive/Pages/Base/CNLiveTabBarController.m
@@ -128,5 +128,13 @@ @@ -128,5 +128,13 @@
128 // Pass the selected object to the new view controller. 128 // Pass the selected object to the new view controller.
129 } 129 }
130 */ 130 */
  131 +- (BOOL)shouldAutorotate{
  132 + return self.selectedViewController.shouldAutorotate;
  133 +}
  134 +
  135 +- (UIInterfaceOrientationMask)supportedInterfaceOrientations{
  136 + return [self.selectedViewController supportedInterfaceOrientations];
  137 +
  138 +}
131 139
132 @end 140 @end
CNLiveScioLive/Pages/Home/CNHomeBaseViewController.m
@@ -370,4 +370,5 @@ static NSString *newsUpPicTableViewCell = @"CNLiveNewsUpPicTableViewCell"; @@ -370,4 +370,5 @@ static NSString *newsUpPicTableViewCell = @"CNLiveNewsUpPicTableViewCell";
370 return _data; 370 return _data;
371 } 371 }
372 372
  373 +
373 @end 374 @end
CNLiveScioLive/Pages/Home/CNHomeViewController.m
@@ -219,4 +219,5 @@ @@ -219,4 +219,5 @@
219 } 219 }
220 return _data; 220 return _data;
221 } 221 }
  222 +
222 @end 223 @end
CNLiveScioLive/Pages/Home/外宣要闻/View/CNLiveNewsLeftPicTableViewCell.m
@@ -123,7 +123,12 @@ @@ -123,7 +123,12 @@
123 _playImage.hidden = NO; 123 _playImage.hidden = NO;
124 _playImage.frame = CGRectMake(10+5+((80*MainScale)*16.0/9.0-30*MainScale)/2.0, (self.contentView.height-30*MainScale)/2.0, 30*MainScale, 30*MainScale); 124 _playImage.frame = CGRectMake(10+5+((80*MainScale)*16.0/9.0-30*MainScale)/2.0, (self.contentView.height-30*MainScale)/2.0, 30*MainScale, 30*MainScale);
125 125
126 - } else if ([_model.type isEqualToString:@"subject"]) { 126 + }
  127 + else if ([_model.type isEqualToString:@"subject"]) {
  128 + _playImage.hidden = YES;
  129 +
  130 + }
  131 + else if ([_model.type isEqualToString:@"article"]) {
127 _playImage.hidden = YES; 132 _playImage.hidden = YES;
128 133
129 } 134 }
CNLiveScioLive/Pages/Home/外宣要闻/View/CNLiveNewsUpPicTableViewCell.m
@@ -130,14 +130,16 @@ @@ -130,14 +130,16 @@
130 130
131 }]; 131 }];
132 132
133 - } else if ([_model.type isEqualToString:@"subject"]) { 133 + }
  134 + else if ([_model.type isEqualToString:@"subject"]) {
134 _playImage.hidden = YES; 135 _playImage.hidden = YES;
135 -// [_projectLabel mas_makeConstraints:^(MASConstraintMaker *make) {  
136 -// make.right.equalTo(self->_backgroundImage.mas_right).with.offset(-10);  
137 -// make.bottom.equalTo(self->_backgroundImage.mas_bottom).with.offset(-10);  
138 -// }];  
139 136
140 } 137 }
  138 + else if ([_model.type isEqualToString:@"article"]) {
  139 + _playImage.hidden = YES;
  140 +
  141 + }
  142 +
141 [_projectLabel mas_updateConstraints:^(MASConstraintMaker *make) { 143 [_projectLabel mas_updateConstraints:^(MASConstraintMaker *make) {
142 make.right.equalTo(self->_backgroundImage.mas_right).with.offset(-10); 144 make.right.equalTo(self->_backgroundImage.mas_right).with.offset(-10);
143 make.bottom.equalTo(self->_backgroundImage.mas_bottom).with.offset(-5); 145 make.bottom.equalTo(self->_backgroundImage.mas_bottom).with.offset(-5);
CNLiveScioLive/Pages/Home/新闻详情/OldController/BaseViewController.h
@@ -8,4 +8,5 @@ @@ -8,4 +8,5 @@
8 8
9 #import <UIKit/UIKit.h> 9 #import <UIKit/UIKit.h>
10 @interface BaseViewController : UIViewController 10 @interface BaseViewController : UIViewController
11 -@end  
12 \ No newline at end of file 11 \ No newline at end of file
  12 +
  13 +@end
CNLiveScioLive/Pages/Home/新闻详情/OldController/BaseViewController.m
@@ -16,10 +16,13 @@ @@ -16,10 +16,13 @@
16 16
17 [[UIApplication sharedApplication] setStatusBarOrientation:UIInterfaceOrientationPortrait]; 17 [[UIApplication sharedApplication] setStatusBarOrientation:UIInterfaceOrientationPortrait];
18 } 18 }
  19 +
19 - (BOOL)shouldAutorotate { 20 - (BOOL)shouldAutorotate {
20 return NO; 21 return NO;
21 } 22 }
  23 +
22 - (UIInterfaceOrientationMask)supportedInterfaceOrientations { 24 - (UIInterfaceOrientationMask)supportedInterfaceOrientations {
23 return UIInterfaceOrientationMaskPortrait; 25 return UIInterfaceOrientationMaskPortrait;
24 } 26 }
  27 +
25 @end 28 @end
CNLiveScioLive/Pages/Home/新闻详情/OldController/OldVideoDetailViewController.m
@@ -66,31 +66,9 @@ @@ -66,31 +66,9 @@
66 NSString* strHtml = [[NSString alloc] initWithFormat:@"%@%@%@%@%@",htmlHeader,htmldate,htmlForm,htmlBody,htmlFooter]; 66 NSString* strHtml = [[NSString alloc] initWithFormat:@"%@%@%@%@%@",htmlHeader,htmldate,htmlForm,htmlBody,htmlFooter];
67 return strHtml; 67 return strHtml;
68 } 68 }
69 -//- (void)setNaviation{  
70 -// [self.navigationController.navigationBar setBarTintColor:HEXCOLOR(0x195ac9)];  
71 -// [self.navigationController.navigationBar setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:[UIFont systemFontOfSize:20],NSFontAttributeName,[UIColor whiteColor],NSForegroundColorAttributeName,nil]];  
72 -// UIButton *leftButton = [UIButton buttonWithType:UIButtonTypeCustom];  
73 -// [leftButton addTarget:self action:@selector(Pop:) forControlEvents:UIControlEventTouchUpInside];  
74 -// [leftButton setImage:[UIImage imageNamed:@"cnlive_white_back"] forState:UIControlStateNormal];  
75 -// [leftButton setFrame:CGRectMake(0, 0, 44, 44)];  
76 -// self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:leftButton];  
77 -// self.navigationItem.hidesBackButton = YES;  
78 -// self.navigationItem.backBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"" style:UIBarButtonItemStylePlain target:nil action:nil];  
79 -//} 69 +
80 #pragma mark - UI 70 #pragma mark - UI
81 -//- (void)setUpNavigationBar{  
82 -// self.navigationController.navigationBar.barTintColor = Color_Blue;  
83 -// self.navigationController.navigationBar.titleTextAttributes = @{NSForegroundColorAttributeName:[UIColor whiteColor], NSFontAttributeName:[UIFont systemFontOfSize:18]};  
84 -// //左  
85 -// UIButton *headerButton = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 20, 20)];  
86 -// headerButton.layer.cornerRadius = 2.0;  
87 -// headerButton.layer.masksToBounds = true;  
88 -// [headerButton setImage:[UIImage imageNamed:@"cnlive_white_back"] forState:UIControlStateNormal];  
89 -// [headerButton addTarget:self action:@selector(goBack) forControlEvents:UIControlEventTouchUpInside];  
90 -// self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:headerButton];  
91 -// self.navigationItem.title = _dictionary[@"cmsColumnName"];  
92 -//  
93 -//} 71 +
94 - (void)loadShareView { 72 - (void)loadShareView {
95 UIImageView *lineImage = [[UIImageView alloc] init]; 73 UIImageView *lineImage = [[UIImageView alloc] init];
96 if (iPhoneX) { 74 if (iPhoneX) {
@@ -246,6 +224,7 @@ @@ -246,6 +224,7 @@
246 [[AVAudioSession sharedInstance] setCategory: AVAudioSessionCategoryPlayback error: &error]; 224 [[AVAudioSession sharedInstance] setCategory: AVAudioSessionCategoryPlayback error: &error];
247 [[AVAudioSession sharedInstance] setActive:YES error:nil]; 225 [[AVAudioSession sharedInstance] setActive:YES error:nil];
248 } 226 }
  227 +
249 - (void)viewDidLoad { 228 - (void)viewDidLoad {
250 [super viewDidLoad]; 229 [super viewDidLoad];
251 [self loadShareView]; 230 [self loadShareView];
@@ -325,7 +304,7 @@ @@ -325,7 +304,7 @@
325 } authFailed:^(NSDictionary *errorInfo) { 304 } authFailed:^(NSDictionary *errorInfo) {
326 NSLog(@"初始化点播播放器失败%@", errorInfo); 305 NSLog(@"初始化点播播放器失败%@", errorInfo);
327 }]; 306 }];
328 - 307 +
329 [[NSUserDefaults standardUserDefaults] setObject:@0 forKey:@"ZXVideoPlayer_DidLockScreen"]; 308 [[NSUserDefaults standardUserDefaults] setObject:@0 forKey:@"ZXVideoPlayer_DidLockScreen"];
330 __weak typeof(self) weakSelf = self; 309 __weak typeof(self) weakSelf = self;
331 self.liveController.videoPlayerGoBackBlock = ^{ 310 self.liveController.videoPlayerGoBackBlock = ^{
@@ -486,14 +465,14 @@ @@ -486,14 +465,14 @@
486 if ([_dic[@"errorCode"] isEqualToString:@"0"]) { 465 if ([_dic[@"errorCode"] isEqualToString:@"0"]) {
487 NSArray *array = _dic[@"programs"]; 466 NSArray *array = _dic[@"programs"];
488 if (0 != [array count]) { 467 if (0 != [array count]) {
489 - _newsArray = [NSArray arrayWithArray:array];  
490 - [self.tableView setFrame:CGRectMake(0, [heightArr[fontIndex] floatValue], MainScreenWidth, 36 + 86*_newsArray.count)]; 468 + self->_newsArray = [NSArray arrayWithArray:array];
  469 + [self.tableView setFrame:CGRectMake(0, [self->heightArr[self->fontIndex] floatValue], MainScreenWidth, 36 + 86*self->_newsArray.count)];
491 } else { 470 } else {
492 // [self.errorLabe setFrame:CGRectMake(12, [heightArr[fontIndex] floatValue], MainScreenWidth - 24, 20)]; 471 // [self.errorLabe setFrame:CGRectMake(12, [heightArr[fontIndex] floatValue], MainScreenWidth - 24, 20)];
493 // self.errorLabe.hidden = NO; 472 // self.errorLabe.hidden = NO;
494 } 473 }
495 NSLog(@"%@",NSStringFromCGRect(self.tableView.frame)); 474 NSLog(@"%@",NSStringFromCGRect(self.tableView.frame));
496 - [backgroundView setContentSize:CGSizeMake(MainScreenWidth, [heightArr[fontIndex] floatValue] + self.tableView.frame.size.height)]; 475 + [self->backgroundView setContentSize:CGSizeMake(MainScreenWidth, [heightArr[self->fontIndex] floatValue] + self.tableView.frame.size.height)];
497 [self.tableView reloadData]; 476 [self.tableView reloadData];
498 } else { 477 } else {
499 [AlertViewTool showHUDViewText:_dic[@"errorMessage"]]; 478 [AlertViewTool showHUDViewText:_dic[@"errorMessage"]];
@@ -603,14 +582,19 @@ @@ -603,14 +582,19 @@
603 if ([cell respondsToSelector:@selector(setLayoutMargins:)]) 582 if ([cell respondsToSelector:@selector(setLayoutMargins:)])
604 [cell setLayoutMargins:UIEdgeInsetsZero]; 583 [cell setLayoutMargins:UIEdgeInsetsZero];
605 } 584 }
  585 +
606 - (void)didReceiveMemoryWarning { 586 - (void)didReceiveMemoryWarning {
607 [super didReceiveMemoryWarning]; 587 [super didReceiveMemoryWarning];
608 } 588 }
  589 +
609 - (BOOL)shouldAutorotate { 590 - (BOOL)shouldAutorotate {
610 return ![[[NSUserDefaults standardUserDefaults] objectForKey:@"ZXVideoPlayer_DidLockScreen"] boolValue]; 591 return ![[[NSUserDefaults standardUserDefaults] objectForKey:@"ZXVideoPlayer_DidLockScreen"] boolValue];
  592 +
611 } 593 }
  594 +
612 - (UIInterfaceOrientationMask)supportedInterfaceOrientations { 595 - (UIInterfaceOrientationMask)supportedInterfaceOrientations {
613 return UIInterfaceOrientationMaskAllButUpsideDown; 596 return UIInterfaceOrientationMaskAllButUpsideDown;
  597 +
614 } 598 }
615 599
616 @end 600 @end
CNLiveScioLive/Pages/Home/答记者问/Controller/CNLiveReporterAskedViewController.m
@@ -391,4 +391,5 @@ static NSString *newsUpPicTableViewCell = @&quot;CNLiveNewsUpPicTableViewCell&quot;; @@ -391,4 +391,5 @@ static NSString *newsUpPicTableViewCell = @&quot;CNLiveNewsUpPicTableViewCell&quot;;
391 } 391 }
392 return _data; 392 return _data;
393 } 393 }
  394 +
394 @end 395 @end
CNLiveScioLive/Pages/Live/Controller/GraphicLiveViewController.m
@@ -251,7 +251,6 @@ @@ -251,7 +251,6 @@
251 - (void)webViewDidFinishLoad:(UIWebView *)webView{ 251 - (void)webViewDidFinishLoad:(UIWebView *)webView{
252 252
253 if (![[Reachability reachabilityForInternetConnection] currentReachabilityStatus]) { 253 if (![[Reachability reachabilityForInternetConnection] currentReachabilityStatus]) {
254 - [AlertViewTool showHUDViewText:CustomStr(@"NetworkiInterruption")];  
255 [self setUpUIWithTag:webView.tag Height:0]; 254 [self setUpUIWithTag:webView.tag Height:0];
256 return; 255 return;
257 } 256 }
CNLiveScioLive/Pages/Tools/CNLivePlayer/CNLivePlayerController.m
No preview for this file type