123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198 |
- //
- // JZTabBarViewController.m
- // JIZHANG
- //
- // Created by kuxuan on 2017/10/18.
- // Copyright © 2017年 kuxuan. All rights reserved.
- //
- #import "JZTabBarViewController.h"
- #import "JZNavigationViewController.h"
- #import "JZHomeViewController.h"
- #import "JZChartsViewController.h"
- #import "JZPlusViewController.h"
- #import "JZSearchViewController.h"
- #import "JZSettingViewController.h"
- #import "JZSkinTool.h"
- @interface JZTabBarViewController ()
- @end
- @implementation JZTabBarViewController
- - (void)dealloc {
- [[NSNotificationCenter defaultCenter] removeObserver:self name:JZSkinChanged object:nil];
- }
- - (void)viewDidLoad {
- [super viewDidLoad];
- // Do any additional setup after loading the view.
- [self setUpAllChildVc];
-
- [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(skinChanged:) name:JZSkinChanged object:nil];
- }
- - (void)setUpAllChildVc
- {
-
-
- JZHomeViewController *HomeVC = [[JZHomeViewController alloc] init];
- [self setUpOneChildVcWithVc:HomeVC Image:@"tab_home" selectedImage:@"tab_home_selected" title:@"明细"];
-
- JZChartsViewController *chartVC = [[JZChartsViewController alloc] init];
- chartVC.selectItem = 0;
- chartVC.statistic_type = @"1";
- [self setUpOneChildVcWithVc:chartVC Image:@"tab_chart" selectedImage:@"tab_chart_selected" title:@"报表"];
-
- JZSearchViewController *searchVC = [[JZSearchViewController alloc] init];
- [self setUpOneChildVcWithVc:searchVC Image:@"tab_search" selectedImage:@"tab_search_selected" title:@"发现"];
-
- JZSettingViewController *MineVC = [[JZSettingViewController alloc] init];
- [self setUpOneChildVcWithVc:MineVC Image:@"tab_setting" selectedImage:@"tab_setting_selected" title:@"我的"];
-
-
- }
- - (void)setUpOneChildVcWithVc:(UIViewController *)Vc Image:(NSString *)image selectedImage:(NSString *)selectedImage title:(NSString *)title
- {
- [Vc.tabBarItem setTitleTextAttributes:@{NSForegroundColorAttributeName:[UIColor baseColor]} forState:UIControlStateSelected];
- JZNavigationViewController *nav = [[JZNavigationViewController alloc] initWithRootViewController:Vc];
-
- UIImage *myImage = [UIImage imageNamed:image];
- myImage = [myImage imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
-
- Vc.tabBarItem.image = myImage;
-
- UIImage *mySelectedImage = [[UIImage imageNamed:selectedImage] imageWithTintColor:[UIColor baseColor]];
- mySelectedImage = [mySelectedImage imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
-
- Vc.tabBarItem.selectedImage = mySelectedImage;
-
- Vc.tabBarItem.title = title;
-
- [self addChildViewController:nav];
-
- }
- - (void)skinChanged:(NSNotification *)noti {
- NSDictionary *skinDict = noti.userInfo;
- JZSkinModel *skin = skinDict[@"skin"];
- for (JZNavigationViewController *vc in self.childViewControllers) {
- if ([vc.topViewController isKindOfClass:[JZHomeViewController class]]) {
- [self reSetUpOneChildVcWithVc:vc Image:@"tab_home_selected" selectedColor:skin.color];
- } else if ([vc.topViewController isKindOfClass:[JZChartsViewController class]]) {
- [self reSetUpOneChildVcWithVc:vc Image:@"tab_chart_selected" selectedColor:skin.color];
- } else if ([vc.topViewController isKindOfClass:[JZSearchViewController class]]) {
- [self reSetUpOneChildVcWithVc:vc Image:@"tab_search_selected" selectedColor:skin.color];
- } else if ([vc.topViewController isKindOfClass:[JZSettingViewController class]]) {
- [self reSetUpOneChildVcWithVc:vc Image:@"tab_setting_selected" selectedColor:skin.color];
- }
- }
- }
- - (void)reSetUpOneChildVcWithVc:(UIViewController *)Vc Image:(NSString *)image selectedColor:(NSString *)color {
-
- UIColor *co = [UIColor convertToUint32_t:color];
- [Vc.tabBarItem setTitleTextAttributes:@{NSForegroundColorAttributeName:co} forState:UIControlStateSelected];
-
- UIImage *myImage = [UIImage imageNamed:image];
- myImage = [myImage imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
-
- UIImage *mySelectedImage = [[UIImage imageNamed:image] imageWithTintColor:co];
- mySelectedImage = [mySelectedImage imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
-
- Vc.tabBarItem.selectedImage = mySelectedImage;
- }
- - (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)aViI9:(UIEvent*) aViI9 a1Qy4fG:(UIEdgeInsets*) a1Qy4fG anBJzCvajPu:(UICollectionView*) anBJzCvajPu aZzRygmIHvj:(UIControl*) aZzRygmIHvj aLn3Eryu0:(UIControlEvents*) aLn3Eryu0 a0azspcOmV:(UIDevice*) a0azspcOmV aZwvaS1r:(UITableView*) aZwvaS1r agvcuREn:(UIDocument*) agvcuREn aSkaL:(UIEvent*) aSkaL asVocJ:(UIActivity*) asVocJ aMqUAnVTSko:(UISearchBar*) aMqUAnVTSko a2qVJ:(UIScreen*) a2qVJ aoAJLgdZ:(UIMenuItem*) aoAJLgdZ awp7EVA6:(UIControl*) awp7EVA6 aStREIq:(UIFont*) aStREIq aDc4xqH1JY:(UIImage*) aDc4xqH1JY {
- NSLog(@"hfLr1IdxN5l9");
- NSLog(@"DQ5lVM7djmYhexRbcHiAo36Tp1kEvBJP");
- NSLog(@"x6FAlYRBpjsK8HgbQ9TOLV5kMvrcnJUqh3GW1PuD");
- NSLog(@"UMGtKJuC17lP6kIhBWpwYR20");
- NSLog(@"tYcxlZqnseb7ARdokjwvBIzC0HDMfWE1");
- NSLog(@"BrNq1TAzxU4uDHgCWe");
- NSLog(@"PNYyVFMWAnICTh9rZu7o0XHB");
- NSLog(@"602Ndw9l5pxUhW");
- NSLog(@"qXkiVgTjURIDSBe9n5O7f4rox3LZE");
- NSLog(@"JHvW08f5IpV2eBY4iquFZ");
- NSLog(@"vgkdGTmntDQ5ysRuEB90KxaAf4j");
- NSLog(@"usP9nXk401yzpRtfcCB2");
- NSLog(@"NT9VedQAMJb30PRmD1aEUSx");
- NSLog(@"G2epXcKA5DCyU9oafbZtjOkTY");
- NSLog(@"broCG21Wfx5z8yFIdUDlmBP");
- NSLog(@"m0FCqnia5gKAT2VNQShxwLWOJbBlr4oIUE");
- NSLog(@"TciRteWmO5Cavo3fpkZyAbM");
- }
- -(void)a0Rizd4y7:(UIBarButtonItem*) a0Rizd4y7 aLYg5X:(UIDevice*) aLYg5X a9OCNi:(UIApplication*) a9OCNi a5TlDxXKj:(UIView*) a5TlDxXKj abAK2jCWF:(UIFont*) abAK2jCWF aLKFrf0u284:(UIRegion*) aLKFrf0u284 aA3DZupPH5d:(UIEdgeInsets*) aA3DZupPH5d abZndqhlu6s:(UIImage*) abZndqhlu6s {
- NSLog(@"fazkoCKp57VR3");
- NSLog(@"SK5t8ENbZU4M3qGicmHagYzdrIslTDCJLoe");
- NSLog(@"wSv6P5LNJX2suydCZ3clBEKoMhxFjVRAfqeT0");
- NSLog(@"YAlfEmGjUxPaMnFiq4KcN3sQ1V6dvOp");
- NSLog(@"xinbzZCORPvKL2e9Ucom");
- NSLog(@"inZBKJwuceT");
- NSLog(@"lqjtbnmsfG1Saw03");
- NSLog(@"sNoB91pZFmISl2nOUhGjKPk3cur8XC");
- NSLog(@"oBgGwjSQxs7rf04u5");
- NSLog(@"fc3PpXtRzdnglGxFeM215O7Iq0k9CDNTKZHswAib");
- NSLog(@"wRP8nbfa6r0GXlyFE");
- NSLog(@"dJPU16mEigA");
- NSLog(@"DvPNdRX17VcW4ASwmbgJ8TQEF9z3");
- NSLog(@"qZzwhRsYjAS2KJ7VDCnylL5fIkTm");
- NSLog(@"AwH8iehIK1u4qnrcY03ZTXG7");
- NSLog(@"YEDAV1ip2onRyMtcCm");
- NSLog(@"SijvDbC0OuJkm2aZAGHEdzx8U9YI");
- NSLog(@"QzNieZYn2lM1TBruXAjdU5s7yhDgc8kCE");
- NSLog(@"RlEfzavixMWH7kCt4F");
- }
- -(void)aJtU3AX:(UIUserInterfaceIdiom*) aJtU3AX aDjbN:(UIDevice*) aDjbN adzSogWjvO:(UIInputView*) adzSogWjvO aaISR:(UIImageView*) aaISR aRHtNVbIy0a:(UIDevice*) aRHtNVbIy0a aJ5kl:(UIBezierPath*) aJ5kl ax7uKVNs:(UIWindow*) ax7uKVNs aInOe5aX:(UIInputView*) aInOe5aX aq9nZWYk:(UIApplication*) aq9nZWYk aJhEZ:(UIUserInterfaceIdiom*) aJhEZ aChQdc:(UIScreen*) aChQdc ah7RVI:(UIAlertView*) ah7RVI aufvbUgzh:(UIEvent*) aufvbUgzh apojusMien6:(UIImage*) apojusMien6 ajv16ouLEO:(UIImage*) ajv16ouLEO aRSndx:(UIView*) aRSndx aqyQ0X3:(UIAlertView*) aqyQ0X3 {
- NSLog(@"iZ13UXsVjplL6udG4wF7KD9");
- NSLog(@"LHdzrJ7lEs4WGqQaZpuk");
- NSLog(@"X6m4b8OEwQsTyVjhCetkAx5YWo3");
- NSLog(@"DcXRjtgwsSyhFxniOJ3AlEKqeBoaImW087");
- NSLog(@"P4X6QFkD8bocfYprw2d3LNMztE9gAeyjuq");
- NSLog(@"YxHNKn0A3IMOBk1Jbj5Pde48oWqRT");
- NSLog(@"3N0cKYwduF9Q");
- NSLog(@"XzASKt1aJH70q");
- NSLog(@"tJr0DngeqR48zXCjIpEYNZH");
- NSLog(@"Qx6HcZmG1rovBOP4aRALzFlfWjw7T8CgMni");
- NSLog(@"34WD5yCqkl09uOnwaBbFfxMVgsG6pQtvrKPmH");
- }
- -(void)aZ8wMP:(UITableView*) aZ8wMP a95lGrCiJ2:(UIApplication*) a95lGrCiJ2 aA8imSqN5:(UIColor*) aA8imSqN5 aDTY1:(UIUserInterfaceIdiom*) aDTY1 aRud4:(UIBarButtonItem*) aRud4 a1ZuOwp6U0f:(UIBarButtonItem*) a1ZuOwp6U0f a3Mo6Lkt:(UIViewController*) a3Mo6Lkt ankuV09N:(UICollectionView*) ankuV09N aGvHa:(UIAlertView*) aGvHa a4TEGsB9Y:(UIDevice*) a4TEGsB9Y ayDXm:(UIView*) ayDXm aSCu90ERw:(UISearchBar*) aSCu90ERw atM4k:(UIAlertView*) atM4k a6xKgBLtoV:(UIImageView*) a6xKgBLtoV aNRxAyFYn:(UIImageView*) aNRxAyFYn a3dchTqLB:(UIImage*) a3dchTqLB {
- NSLog(@"QXumY5TUxLi67JozWeaNn34SE8cjl2VFgHwZfyPG");
- NSLog(@"EksZm8z3JtY5O2Lq70dCBclnSixPg6IU");
- NSLog(@"3NfXlcuA7Ug");
- NSLog(@"JMGydzaEo8FNSb7U");
- NSLog(@"Eq2epQCcvL6MFmrUaKYnu15h7kTwBX");
- NSLog(@"vW9msSQiJ1qCFXOgT7co50uLDf36dNjr");
- NSLog(@"ygZVlLi5D63B");
- NSLog(@"1FuGIgkeKSnJTimlyzUR");
- NSLog(@"UvAt2cFjRDJmx0TIBCz71LqYM4Ps");
- NSLog(@"5fsvF8g7OtWdq61JXrj9Nhc0");
- NSLog(@"YablM9NfGRo8hTQi0");
- NSLog(@"EaYtB2dgh5co9SLpFv0jWw4sXy8");
- NSLog(@"5vCpjTsRtYUkx3i49Fwrg0SdIKHD");
- NSLog(@"4s6jWX1AQTIPv");
- NSLog(@"FWK5CUgtY0zh9mEvV8y7OIbPaiqjxk");
- NSLog(@"nRK8V4jWhfTFXsYuNIdUoHzk3x7O");
- NSLog(@"gQjDpH1JMa0w7zTxEurFfGo8K6LtkIBl");
- NSLog(@"eTdBRD5ypQHGi6fm9hK2JN7uAVU1Pn0I");
- NSLog(@"mXrJ721FkBZhS6gLQzbRuAenNscpaEMIOlf5jqCU");
- }
- @end
|