From 86455a79e001f309d5680d063086428296e8bd8c Mon Sep 17 00:00:00 2001 From: renanvs Date: Tue, 4 Mar 2014 16:02:24 -0300 Subject: [PATCH] refatorando #3 --- .../PaleoTabBarController.m | 26 ++----------------- .../PaleoFoodTableView/PaleoFoodTableView.m | 4 --- .../PaleoProject/PaleoDefines/PaleoDefines.h | 1 + 3 files changed, 3 insertions(+), 28 deletions(-) diff --git a/PaleoProject/PaleoProject/Custom/CustomController/PeleoTabBarController/PaleoTabBarController.m b/PaleoProject/PaleoProject/Custom/CustomController/PeleoTabBarController/PaleoTabBarController.m index 90062a1..519350e 100644 --- a/PaleoProject/PaleoProject/Custom/CustomController/PeleoTabBarController/PaleoTabBarController.m +++ b/PaleoProject/PaleoProject/Custom/CustomController/PeleoTabBarController/PaleoTabBarController.m @@ -74,6 +74,8 @@ -(void)tabBarController:(UITabBarController *)tabBarController didSelectViewCont PaleoNavigationController *navCont = (PaleoNavigationController*)viewController; if (navCont == favoritesPaleoNavigationController) { [[NSNotificationCenter defaultCenter] postNotificationName:TabBarFavoriteSelected object:nil]; + }else if (navCont == categoriesPaleoNavigationController){ + [[NSNotificationCenter defaultCenter] postNotificationName:TabBarFoodSelected object:nil]; } [[NSNotificationCenter defaultCenter] postNotificationName:TabBarSelected object:nil]; } @@ -88,28 +90,4 @@ -(void)addIcons{ [tabItem setTitle:[itemLabel objectAtIndex:[itens indexOfObject:tabItem]]]; } } - -//-(NSUInteger)supportedInterfaceOrientations{ -// UIViewController *vc = [self selectedViewController]; -// -// if (vc == searchPaleoNavigationController) { -// return UIInterfaceOrientationMaskPortraitUpsideDown; -// } -// return UIInterfaceOrientationMaskAll; -//} -// -//-(BOOL)shouldAutorotate{ -// UIViewController *vc = [self selectedViewController]; -// -// if (vc == searchPaleoNavigationController) { -// return NO; -// } -// -// return YES; -//} -// -//-(UIInterfaceOrientation)preferredInterfaceOrientationForPresentation{ -// return UIInterfaceOrientationPortrait; -//} - @end diff --git a/PaleoProject/PaleoProject/Custom/CutomView/PaleoFoodTableView/PaleoFoodTableView.m b/PaleoProject/PaleoProject/Custom/CutomView/PaleoFoodTableView/PaleoFoodTableView.m index f5c67bd..09af490 100644 --- a/PaleoProject/PaleoProject/Custom/CutomView/PaleoFoodTableView/PaleoFoodTableView.m +++ b/PaleoProject/PaleoProject/Custom/CutomView/PaleoFoodTableView/PaleoFoodTableView.m @@ -156,10 +156,6 @@ -(void)removeItemFromTableViewAtIndex:(NSIndexPath*)index{ }else{ [self deleteRowsAtIndexPaths:indexPathList withRowAnimation:UITableViewRowAnimationLeft]; } - - - - } @end diff --git a/PaleoProject/PaleoProject/PaleoDefines/PaleoDefines.h b/PaleoProject/PaleoProject/PaleoDefines/PaleoDefines.h index c0b6f13..e22babf 100644 --- a/PaleoProject/PaleoProject/PaleoDefines/PaleoDefines.h +++ b/PaleoProject/PaleoProject/PaleoDefines/PaleoDefines.h @@ -26,6 +26,7 @@ //Nome das Notifications #define TabBarFavoriteSelected @"TabBarFavoriteSelected" #define TabBarSelected @"TabBarSelected" +#define TabBarFoodSelected @"TabBarFoodSelected" //Titulo do BaseBar #define BaseNameSettings @"Ajustes"