| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- //
- // TCViewController.m
- // TCLVBIMDemo
- //
- // Created by annidyfeng on 16/7/29.
- // Copyright © 2016年 tencent. All rights reserved.
- //
- #import "TCNavigationController.h"
- //#import "UIImage+Additions.h"
- #import "CYUINavigationBar.h"
- @interface TCNavigationController ()
- @end
- @implementation TCNavigationController
- - (void)viewDidLoad {
- [super viewDidLoad];
- // Do any additional setup after loading the view.
- }
- - (void)didReceiveMemoryWarning {
- [super didReceiveMemoryWarning];
- // Dispose of any resources that can be recreated.
- }
- /*
- #pragma mark - Navigation
- // In a storyboard-based application, you will often want to do a little preparation before navigation
- - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
- // Get the new view controller using [segue destinationViewController].
- // Pass the selected object to the new view controller.
- }
- */
- + (void)initialize
- {
- if (self == [TCNavigationController class]) {
- CYUINavigationBar *bar = [CYUINavigationBar appearance];
- [bar setBackgroundColor:UIColorFromRGB(0xe5e5e5)];
- [bar setTintColor:[UIColor blackColor]];
- [bar setBarTintColor: UIColorFromRGB(0xe5e5e5)];
- [bar setTitleTextAttributes:@{NSForegroundColorAttributeName:UIColorFromRGB(0x000000)}];
- }
- }
- - (BOOL)shouldAutorotate
- {
- return [self.topViewController shouldAutorotate];
- }
- - (UIInterfaceOrientationMask)supportedInterfaceOrientations
- {
- return [self.topViewController supportedInterfaceOrientations];
- }
- - (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation
- {
- return [self.topViewController preferredInterfaceOrientationForPresentation];
- }
- //ios5.0 横竖屏
- - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
- {
- return [self shouldAutorotate];
- }
- @end
|