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:
What's wrong with my code? I know there will be some differences between Chameleon and UIKit so I apologize.
Please Help
Thanks
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];
}
Please Help
Thanks