Commit ec14fb71f26d54045c29064603ff15ca1520c120
1 parent
efc9d39d
添加tabar页头图片
Showing
8 changed files
with
57 additions
and
9 deletions
CNLiveScioLive/Assets.xcassets/common/Contents.json
CNLiveScioLive/Assets.xcassets/common/cnlive_headerBack.imageset/Contents.json
0 → 100644
| 1 | +{ | ||
| 2 | + "images" : [ | ||
| 3 | + { | ||
| 4 | + "idiom" : "universal", | ||
| 5 | + "scale" : "1x" | ||
| 6 | + }, | ||
| 7 | + { | ||
| 8 | + "filename" : "src=http---pic.soutu123.cn-element_origin_min_pic-16-12-15-1442592a1d29c69c2a2bb85e7692feed.jpg!-fw-700-quality-90-unsharp-true-compress-true&refer=http---pic.soutu123.cn&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg.jpeg", | ||
| 9 | + "idiom" : "universal", | ||
| 10 | + "scale" : "2x" | ||
| 11 | + }, | ||
| 12 | + { | ||
| 13 | + "idiom" : "universal", | ||
| 14 | + "scale" : "3x" | ||
| 15 | + } | ||
| 16 | + ], | ||
| 17 | + "info" : { | ||
| 18 | + "author" : "xcode", | ||
| 19 | + "version" : 1 | ||
| 20 | + } | ||
| 21 | +} |
CNLiveScioLive/Assets.xcassets/common/cnlive_headerBack.imageset/src=http---pic.soutu123.cn-element_origin_min_pic-16-12-15-1442592a1d29c69c2a2bb85e7692feed.jpg!-fw-700-quality-90-unsharp-true-compress-true&refer=http---pic.soutu123.cn&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg.jpeg
0 → 100644
32 KB
CNLiveScioLive/Pages/Home/CNHomeENViewController.m
| @@ -181,11 +181,19 @@ static NSString *newsUpPicTableViewCell = @"CNLiveNewsUpPicTableViewCell"; | @@ -181,11 +181,19 @@ static NSString *newsUpPicTableViewCell = @"CNLiveNewsUpPicTableViewCell"; | ||
| 181 | _isRefreshing = NO; | 181 | _isRefreshing = NO; |
| 182 | 182 | ||
| 183 | [self.view addSubview:self.tableView]; | 183 | [self.view addSubview:self.tableView]; |
| 184 | - | ||
| 185 | - [self loadData]; | ||
| 186 | 184 | ||
| 187 | // Do any additional setup after loading the view. | 185 | // Do any additional setup after loading the view. |
| 188 | } | 186 | } |
| 187 | +-(void)viewWillAppear:(BOOL)animated | ||
| 188 | +{ | ||
| 189 | + [super viewWillAppear:animated]; | ||
| 190 | + [self.navigationController.navigationBar setBackgroundImage:[UIImage imageNamed:@"cnlive_headerBack"] forBarMetrics:UIBarMetricsDefault]; | ||
| 191 | +} | ||
| 192 | +-(void)viewWillDisappear:(BOOL)animated | ||
| 193 | +{ | ||
| 194 | + [super viewWillDisappear:animated]; | ||
| 195 | + [self.navigationController.navigationBar setBackgroundImage:[UIImage imageNamed:@""] forBarMetrics:UIBarMetricsDefault]; | ||
| 196 | +} | ||
| 189 | 197 | ||
| 190 | - (void)didReceiveMemoryWarning { | 198 | - (void)didReceiveMemoryWarning { |
| 191 | [super didReceiveMemoryWarning]; | 199 | [super didReceiveMemoryWarning]; |
CNLiveScioLive/Pages/Home/CNHomeViewController.m
| @@ -137,6 +137,11 @@ | @@ -137,6 +137,11 @@ | ||
| 137 | [super viewWillAppear:animated]; | 137 | [super viewWillAppear:animated]; |
| 138 | [self.navigationController setNavigationBarHidden:NO]; | 138 | [self.navigationController setNavigationBarHidden:NO]; |
| 139 | } | 139 | } |
| 140 | +-(void)viewWillDisappear:(BOOL)animated | ||
| 141 | +{ | ||
| 142 | + [super viewWillDisappear:animated]; | ||
| 143 | + [self.navigationController.navigationBar setBackgroundImage:[UIImage imageNamed:@""] forBarMetrics:UIBarMetricsDefault]; | ||
| 144 | +} | ||
| 140 | - (void)viewDidLoad { | 145 | - (void)viewDidLoad { |
| 141 | [super viewDidLoad]; | 146 | [super viewDidLoad]; |
| 142 | // Do any additional setup after loading the view. | 147 | // Do any additional setup after loading the view. |
| @@ -147,7 +152,7 @@ | @@ -147,7 +152,7 @@ | ||
| 147 | 152 | ||
| 148 | #pragma mark - UI | 153 | #pragma mark - UI |
| 149 | - (void)setUpNavigationBar{ | 154 | - (void)setUpNavigationBar{ |
| 150 | - | 155 | + [self.navigationController.navigationBar setBackgroundImage:[UIImage imageNamed:@"cnlive_headerBack"] forBarMetrics:UIBarMetricsDefault]; |
| 151 | //左 | 156 | //左 |
| 152 | UIButton *headerButton = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 200, 44)]; | 157 | UIButton *headerButton = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 200, 44)]; |
| 153 | headerButton.userInteractionEnabled = NO; | 158 | headerButton.userInteractionEnabled = NO; |
CNLiveScioLive/Pages/Live/Controller/CNLiveViewController.m
| @@ -218,6 +218,7 @@ static NSString *indicatorTableViewCell = @"CNLiveIndicatorTableViewCell"; | @@ -218,6 +218,7 @@ static NSString *indicatorTableViewCell = @"CNLiveIndicatorTableViewCell"; | ||
| 218 | } | 218 | } |
| 219 | - (void)viewWillAppear:(BOOL)animated{ | 219 | - (void)viewWillAppear:(BOOL)animated{ |
| 220 | [super viewWillAppear:animated]; | 220 | [super viewWillAppear:animated]; |
| 221 | + [self.navigationController.navigationBar setBackgroundImage:[UIImage imageNamed:@"cnlive_headerBack"] forBarMetrics:UIBarMetricsDefault]; | ||
| 221 | //直播开始统计 | 222 | //直播开始统计 |
| 222 | [CNLiveStat statLivePlayerWithChannelId:@"zbsc"]; | 223 | [CNLiveStat statLivePlayerWithChannelId:@"zbsc"]; |
| 223 | [CNLiveStat beginEvent:@"zbsc"]; | 224 | [CNLiveStat beginEvent:@"zbsc"]; |
| @@ -257,6 +258,11 @@ static NSString *indicatorTableViewCell = @"CNLiveIndicatorTableViewCell"; | @@ -257,6 +258,11 @@ static NSString *indicatorTableViewCell = @"CNLiveIndicatorTableViewCell"; | ||
| 257 | 258 | ||
| 258 | // Do any additional setup after loading the view. | 259 | // Do any additional setup after loading the view. |
| 259 | } | 260 | } |
| 261 | +-(void)viewWillDisappear:(BOOL)animated | ||
| 262 | +{ | ||
| 263 | + [super viewWillDisappear:animated]; | ||
| 264 | + [self.navigationController.navigationBar setBackgroundImage:[UIImage imageNamed:@""] forBarMetrics:UIBarMetricsDefault]; | ||
| 265 | +} | ||
| 260 | - (void)viewDidDisappear:(BOOL)animated{ | 266 | - (void)viewDidDisappear:(BOOL)animated{ |
| 261 | [super viewDidDisappear:animated]; | 267 | [super viewDidDisappear:animated]; |
| 262 | //时长统计结束 | 268 | //时长统计结束 |
| @@ -264,7 +270,6 @@ static NSString *indicatorTableViewCell = @"CNLiveIndicatorTableViewCell"; | @@ -264,7 +270,6 @@ static NSString *indicatorTableViewCell = @"CNLiveIndicatorTableViewCell"; | ||
| 264 | } | 270 | } |
| 265 | #pragma mark - UI | 271 | #pragma mark - UI |
| 266 | - (void)setUpNavigationBar{ | 272 | - (void)setUpNavigationBar{ |
| 267 | - | ||
| 268 | //左 | 273 | //左 |
| 269 | UIButton *headerButton = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 200, 44)]; | 274 | UIButton *headerButton = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 200, 44)]; |
| 270 | headerButton.userInteractionEnabled = NO; | 275 | headerButton.userInteractionEnabled = NO; |
CNLiveScioLive/Pages/My/CNMyViewController.m
| @@ -26,8 +26,15 @@ | @@ -26,8 +26,15 @@ | ||
| 26 | 26 | ||
| 27 | @implementation CNMyViewController | 27 | @implementation CNMyViewController |
| 28 | static NSString *identifier = @"CNMyTableViewCell"; | 28 | static NSString *identifier = @"CNMyTableViewCell"; |
| 29 | -- (void)viewDidAppear:(BOOL)animated{ | ||
| 30 | - | 29 | +-(void)viewWillDisappear:(BOOL)animated |
| 30 | +{ | ||
| 31 | + [super viewWillDisappear:animated]; | ||
| 32 | + [self.navigationController.navigationBar setBackgroundImage:[UIImage imageNamed:@""] forBarMetrics:UIBarMetricsDefault]; | ||
| 33 | +} | ||
| 34 | +-(void)viewWillAppear:(BOOL)animated | ||
| 35 | +{ | ||
| 36 | + [super viewWillAppear:animated]; | ||
| 37 | + [self.navigationController.navigationBar setBackgroundImage:[UIImage imageNamed:@"cnlive_headerBack"] forBarMetrics:UIBarMetricsDefault]; | ||
| 31 | } | 38 | } |
| 32 | - (void)viewDidLoad { | 39 | - (void)viewDidLoad { |
| 33 | [super viewDidLoad]; | 40 | [super viewDidLoad]; |
CNLiveScioLive/Pages/Newsound/OldController/VoiceViewController.m
| @@ -394,6 +394,7 @@ static const NSInteger margin = 34; | @@ -394,6 +394,7 @@ static const NSInteger margin = 34; | ||
| 394 | 394 | ||
| 395 | - (void)viewWillAppear:(BOOL)animated { | 395 | - (void)viewWillAppear:(BOOL)animated { |
| 396 | [super viewWillAppear:animated]; | 396 | [super viewWillAppear:animated]; |
| 397 | + [self.navigationController.navigationBar setBackgroundImage:[UIImage imageNamed:@"cnlive_headerBack"] forBarMetrics:UIBarMetricsDefault]; | ||
| 397 | NSError *error = nil; | 398 | NSError *error = nil; |
| 398 | [[AVAudioSession sharedInstance] setCategory: AVAudioSessionCategoryPlayback error: &error]; | 399 | [[AVAudioSession sharedInstance] setCategory: AVAudioSessionCategoryPlayback error: &error]; |
| 399 | [[AVAudioSession sharedInstance] setActive:YES error:nil]; | 400 | [[AVAudioSession sharedInstance] setActive:YES error:nil]; |
| @@ -448,6 +449,7 @@ static const NSInteger margin = 34; | @@ -448,6 +449,7 @@ static const NSInteger margin = 34; | ||
| 448 | } | 449 | } |
| 449 | - (void)viewWillDisappear:(BOOL)animated { | 450 | - (void)viewWillDisappear:(BOOL)animated { |
| 450 | [super viewWillDisappear:animated]; | 451 | [super viewWillDisappear:animated]; |
| 452 | + [self.navigationController.navigationBar setBackgroundImage:[UIImage imageNamed:@""] forBarMetrics:UIBarMetricsDefault]; | ||
| 451 | [[UIApplication sharedApplication] endReceivingRemoteControlEvents]; | 453 | [[UIApplication sharedApplication] endReceivingRemoteControlEvents]; |
| 452 | [self resignFirstResponder]; | 454 | [self resignFirstResponder]; |
| 453 | [music playStop]; | 455 | [music playStop]; |