Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Blakeasd

macrumors 6502a
Original poster
Dec 29, 2009
643
0
Hello,
I am developing a Mac application with the Chameleon framework, which is a port of UIKit to the Mac, so I am posting this in the IOS programming section.
Anyway, I am trying to add a UITabBar to my application, but I can't get it to work. I do not get any errors or warnings, the problem is the UITabBarItem I created doesn't appear. Here is my code:
Code:
-(void)applicationDidFinishLaunching:(UIApplication *)application{


    window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].applicationFrame];
    window.backgroundColor = [UIColor clearColor];
    window.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
    [window makeKeyAndVisible];
    
    
    tabBar = [[UITabBar alloc] initWithFrame:CGRectMake(0, 0, 1057, 64)];
    [siteItem setImage:[UIImage imageNamed:@"Cloud.png"]];
    [siteItem setEnabled:YES];
    [siteItem setTitle:@"Sites"];
    [siteItem setTag:1];
    [tabItemsArray addObject:siteItem];
    [tabBar setItems:tabItemsArray];
    [window addSubview:tabBar];
    
    
}
What's wrong with my code? I know there will be some differences between Chameleon and UIKit so I apologize.
Please Help
Thanks
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.