Tab Bar does not appear pg. 156


#1



#import "HypnoAppDelegate.h"
#import "HypnosisViewController.h"
#import "TimeViewController.h"

@implementation HypnoAppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
    // Override point for customization after application launch.
    
    //Now that we aren't using hvc, this line will generate a warning- ignore it

    HypnosisViewController *hvc = [[HypnosisViewController alloc]init];
    
    TimeViewController *tvc = [[TimeViewController alloc]init];
    
   UITabBarController * tabBarController =[[UITabBarController alloc] init];
    
    NSArray * viewControllers = [NSArray arrayWithObjects:hvc,tvc, nil];
    [tabBarController setViewControllers: viewControllers];
    
    
    
 //[[self window]setRootViewController:hvc];
[[self window]setRootViewController:tabBarController];
    //[[self window] setRootViewController:tvc];
    
    self.window.backgroundColor = [UIColor whiteColor];
    [self.window makeKeyAndVisible];
    return YES;
}


@end

I’m getting this warning/error:

2013-02-23 20:50:43.047 HypnoTime2[590:c07] Two-stage rotation animation is deprecated. This application should use the smoother single-stage animation.
2013-02-23 20:50:43.050 HypnoTime2[590:c07] Two-stage rotation animation is deprecated. This application should use the smoother single-stage animation.

The simulator screen has no tab bar. I’m using Xcode 4.5 and Simulator 6.0 . By the way, everything worked fine up until I modify things for the Tab bar. The warning above didn’t exist. I welcome any suggestions concerning this matter Thanks.

At this point, since their are no replies to my question. There is probably a bug in Simulator 6.0 and/or the Xcode IDE. Isn’t it funny, a programmer’s job is not just the fixing of his program but distinguishing his errors from the tools of the trade. Of course, if I find out that my meticulous examining of my code is the problem , I’ll be first to admit it


#2

Have you tried running this on the 6.1 simulator and on your device to see if you get the same results?

Looking at your code - there are no errors - it should be working.


#3

My code does the same thing. it works! When I tap on either side of the bar at the bottom, it switches views. I just can’t see the deliminator between the two buttons.

Any ideas?