Commit edad50ee36a7b4b4801f4d0b6cb73ac367fac326

Authored by zhangxiaowen
1 parent 192a2bef

no message

CNLiveScioLive/Pages/Base/CNLiveBaseNavigationController.m
... ... @@ -13,7 +13,6 @@
13 13 @end
14 14  
15 15 @implementation CNLiveBaseNavigationController
16   -
17 16 - (void)viewDidLoad {
18 17 [super viewDidLoad];
19 18 // Do any additional setup after loading the view.
... ... @@ -64,4 +63,18 @@
64 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 80 @end
... ...
CNLiveScioLive/Pages/Base/CNLiveBaseViewController.m
... ... @@ -28,7 +28,7 @@
28 28  
29 29 [self setUpNavigationBar];
30 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 179  
180 180 - (BOOL)shouldAutorotate {
181 181 return NO;
  182 +
182 183 }
  184 +
183 185 - (UIInterfaceOrientationMask)supportedInterfaceOrientations {
184 186 return UIInterfaceOrientationMaskPortrait;
  187 +
185 188 }
186   -
187 189 @end
... ...
CNLiveScioLive/Pages/Base/CNLiveENTabBarController.m
... ... @@ -118,4 +118,13 @@
118 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 130 @end
... ...
CNLiveScioLive/Pages/Base/CNLiveTabBarController.m
... ... @@ -128,5 +128,13 @@
128 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 140 @end
... ...
CNLiveScioLive/Pages/Home/CNHomeBaseViewController.m
... ... @@ -370,4 +370,5 @@ static NSString *newsUpPicTableViewCell = @"CNLiveNewsUpPicTableViewCell";
370 370 return _data;
371 371 }
372 372  
  373 +
373 374 @end
... ...
CNLiveScioLive/Pages/Home/CNHomeViewController.m
... ... @@ -219,4 +219,5 @@
219 219 }
220 220 return _data;
221 221 }
  222 +
222 223 @end
... ...
CNLiveScioLive/Pages/Home/外宣要闻/View/CNLiveNewsLeftPicTableViewCell.m
... ... @@ -123,7 +123,12 @@
123 123 _playImage.hidden = NO;
124 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 132 _playImage.hidden = YES;
128 133  
129 134 }
... ...
CNLiveScioLive/Pages/Home/外宣要闻/View/CNLiveNewsUpPicTableViewCell.m
... ... @@ -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 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 143 [_projectLabel mas_updateConstraints:^(MASConstraintMaker *make) {
142 144 make.right.equalTo(self->_backgroundImage.mas_right).with.offset(-10);
143 145 make.bottom.equalTo(self->_backgroundImage.mas_bottom).with.offset(-5);
... ...
CNLiveScioLive/Pages/Home/新闻详情/OldController/BaseViewController.h
... ... @@ -8,4 +8,5 @@
8 8  
9 9 #import <UIKit/UIKit.h>
10 10 @interface BaseViewController : UIViewController
11   -@end
12 11 \ No newline at end of file
  12 +
  13 +@end
... ...
CNLiveScioLive/Pages/Home/新闻详情/OldController/BaseViewController.m
... ... @@ -16,10 +16,13 @@
16 16  
17 17 [[UIApplication sharedApplication] setStatusBarOrientation:UIInterfaceOrientationPortrait];
18 18 }
  19 +
19 20 - (BOOL)shouldAutorotate {
20 21 return NO;
21 22 }
  23 +
22 24 - (UIInterfaceOrientationMask)supportedInterfaceOrientations {
23 25 return UIInterfaceOrientationMaskPortrait;
24 26 }
  27 +
25 28 @end
... ...
CNLiveScioLive/Pages/Home/新闻详情/OldController/OldVideoDetailViewController.m
... ... @@ -66,31 +66,9 @@
66 66 NSString* strHtml = [[NSString alloc] initWithFormat:@"%@%@%@%@%@",htmlHeader,htmldate,htmlForm,htmlBody,htmlFooter];
67 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 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 72 - (void)loadShareView {
95 73 UIImageView *lineImage = [[UIImageView alloc] init];
96 74 if (iPhoneX) {
... ... @@ -246,6 +224,7 @@
246 224 [[AVAudioSession sharedInstance] setCategory: AVAudioSessionCategoryPlayback error: &error];
247 225 [[AVAudioSession sharedInstance] setActive:YES error:nil];
248 226 }
  227 +
249 228 - (void)viewDidLoad {
250 229 [super viewDidLoad];
251 230 [self loadShareView];
... ... @@ -325,7 +304,7 @@
325 304 } authFailed:^(NSDictionary *errorInfo) {
326 305 NSLog(@"初始化点播播放器失败%@", errorInfo);
327 306 }];
328   -
  307 +
329 308 [[NSUserDefaults standardUserDefaults] setObject:@0 forKey:@"ZXVideoPlayer_DidLockScreen"];
330 309 __weak typeof(self) weakSelf = self;
331 310 self.liveController.videoPlayerGoBackBlock = ^{
... ... @@ -486,14 +465,14 @@
486 465 if ([_dic[@"errorCode"] isEqualToString:@"0"]) {
487 466 NSArray *array = _dic[@"programs"];
488 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 470 } else {
492 471 // [self.errorLabe setFrame:CGRectMake(12, [heightArr[fontIndex] floatValue], MainScreenWidth - 24, 20)];
493 472 // self.errorLabe.hidden = NO;
494 473 }
495 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 476 [self.tableView reloadData];
498 477 } else {
499 478 [AlertViewTool showHUDViewText:_dic[@"errorMessage"]];
... ... @@ -603,14 +582,19 @@
603 582 if ([cell respondsToSelector:@selector(setLayoutMargins:)])
604 583 [cell setLayoutMargins:UIEdgeInsetsZero];
605 584 }
  585 +
606 586 - (void)didReceiveMemoryWarning {
607 587 [super didReceiveMemoryWarning];
608 588 }
  589 +
609 590 - (BOOL)shouldAutorotate {
610 591 return ![[[NSUserDefaults standardUserDefaults] objectForKey:@"ZXVideoPlayer_DidLockScreen"] boolValue];
  592 +
611 593 }
  594 +
612 595 - (UIInterfaceOrientationMask)supportedInterfaceOrientations {
613 596 return UIInterfaceOrientationMaskAllButUpsideDown;
  597 +
614 598 }
615 599  
616 600 @end
... ...
CNLiveScioLive/Pages/Home/答记者问/Controller/CNLiveReporterAskedViewController.m
... ... @@ -391,4 +391,5 @@ static NSString *newsUpPicTableViewCell = @&quot;CNLiveNewsUpPicTableViewCell&quot;;
391 391 }
392 392 return _data;
393 393 }
  394 +
394 395 @end
... ...
CNLiveScioLive/Pages/Live/Controller/GraphicLiveViewController.m
... ... @@ -251,7 +251,6 @@
251 251 - (void)webViewDidFinishLoad:(UIWebView *)webView{
252 252  
253 253 if (![[Reachability reachabilityForInternetConnection] currentReachabilityStatus]) {
254   - [AlertViewTool showHUDViewText:CustomStr(@"NetworkiInterruption")];
255 254 [self setUpUIWithTag:webView.tag Height:0];
256 255 return;
257 256 }
... ...
CNLiveScioLive/Pages/Tools/CNLivePlayer/CNLivePlayerController.m
No preview for this file type