0
votes

i searched before post my question, but i find nothing useful.

before: i'm a c# developer and i'm doing my first iphone app, don't kill me please!

in my app i have a tabbar controller on the bottom (4 buttons) each button, is a navigation controller type, its show a navigation bar on the top and in the middle i have a viewcontroller (normally after i load an uitableview)

the mad person that asked me to do this app wants that in the top of the TabBar to show always an image (for advertisement, fixed as 320x50).

so the app should look in this way

< NavigationBar >

ViewController

< UIImage >

< TabBar >

but now is

< NavigationBar >

ViewController

< TabBar >

1
The easiest way to do this would be through interface builder. Just drag out a UIImageView and set it's frame and position to the size you require.Jamie
You can try adding UIImageView in the window. i.e main screen of the application where you have the tabbar controller.Ajay Sharma

1 Answers

0
votes

at first take tabbarview controller then make view controller then set the UIimage then set the navigation bar for the uiview controller

NSMutableArray *listOfViewControllers = [[NSMutableArray alloc] init];

        dashBoardView = [[DashboardViewController alloc] initWithNibName:@"DashboardViewController" bundle:nil];
        dashBoardView.title = @"dashBoardView";
        UINavigationController *mydashboarController = [[[UINavigationController alloc] initWithRootViewController:dashBoardView] autorelease];
        mydashboarController.navigationBar.barStyle = UIBarStyleBlack;
        [listOfViewControllers addObject:mydashboarController];
        [dashBoardView release];

        ordersView = [[OrdersViewController alloc] initWithNibName:@"OrdersViewController" bundle:nil];
        ordersView.title = @"ordersView";
        UINavigationController *myorderController = [[[UINavigationController alloc] initWithRootViewController:ordersView] autorelease];
        myorderController.navigationBar.barStyle = UIBarStyleBlack;
        [listOfViewControllers addObject:myorderController];
        [ordersView release];

        orderList = [[OrderListViewController alloc] initWithNibName:@"OrderListViewController" bundle:nil];
        orderList.title = @"orderList";
        UINavigationController *myorderListController = [[[UINavigationController alloc] initWithRootViewController:orderList] autorelease];
        myorderListController.navigationBar.barStyle = UIBarStyleBlack;
        [listOfViewControllers addObject:myorderListController];
        [orderList release];


        [self.tabBarController setViewControllers:listOfViewControllers animated:YES];

i think it will help you some way...