Adding a TabBar
-(void)AddTabBar
{
tabBarController=[[UITabBarController alloc] init];
UIViewController *ViewController = [[UIViewController alloc] init];
UINavigationController *PlaceOrderController = [[UINavigationController alloc] initWithRootViewController:PlaceOrderView];
PlaceOrderController.navigationBar.tintColor = [UIColor redColor];//[UIColor colorWithRed:29.123 green:16.234 blue:2.9 alpha:1.0];
PlaceOrderController.tabBarItem.title = @"";
PlaceOrderController.tabBarItem.image = [UIImage imageNamed:@"tab_place_order.png"];
[PlaceOrderView release];
[tabBarController setViewControllers:[NSArray arrayWithObjects:PlaceOrderController, nil] animated:NO];
tabBarController.delegate=self;
tabBarController.selectedIndex=0;
[PlaceOrderController release];
[window addSubview:tabBarController.view];
}
{
tabBarController=[[UITabBarController alloc] init];
UIViewController *ViewController = [[UIViewController alloc] init];
UINavigationController *PlaceOrderController = [[UINavigationController alloc] initWithRootViewController:PlaceOrderView];
PlaceOrderController.navigationBar.tintColor = [UIColor redColor];//[UIColor colorWithRed:29.123 green:16.234 blue:2.9 alpha:1.0];
PlaceOrderController.tabBarItem.title = @"";
PlaceOrderController.tabBarItem.image = [UIImage imageNamed:@"tab_place_order.png"];
[PlaceOrderView release];
[tabBarController setViewControllers:[NSArray arrayWithObjects:PlaceOrderController, nil] animated:NO];
tabBarController.delegate=self;
tabBarController.selectedIndex=0;
[PlaceOrderController release];
[window addSubview:tabBarController.view];
}
Comments
Post a Comment