Hi-
I am wondering how I can make a tab bar appear transparent to the user.
I have created a tab bar from scratch and use the Appearance APIS in my app delegate to create a custom look. I know I have to set the alpha of the tab bar to less than one (or at least I think!) which I did. Do I also need to have the tab bar image I am using be transparent?
Any guidance would be appreciated.
I am wondering how I can make a tab bar appear transparent to the user.
I have created a tab bar from scratch and use the Appearance APIS in my app delegate to create a custom look. I know I have to set the alpha of the tab bar to less than one (or at least I think!) which I did. Do I also need to have the tab bar image I am using be transparent?
Any guidance would be appreciated.
Code:
- (void)customizeAppearance
{
// Create resizable images
UIImage *gradientImage44 = [[UIImage imageNamed:@"nav_bar"]
resizableImageWithCapInsets:UIEdgeInsetsMake(0, 0, 0, 0)];
UIImage *tabBackground = [[UIImage imageNamed:@"tab_bar"] resizableImageWithCapInsets:UIEdgeInsetsMake(0, 0, 0, 0)];
[[UITabBar appearance] setBackgroundImage:tabBackground];
[[UITabBar appearance] setSelectionIndicatorImage:
[UIImage imageNamed:@"empty_selection"]];
[[UINavigationBar appearance] setBackgroundImage:gradientImage44
forBarMetrics:UIBarMetricsDefault];
[[UITabBar appearance] setAlpha:0.5];
}