Monday, 3 September 2012

For the setting the color to the tab bar in iPhone

For the setting the color to the tab bar in iPhone
 // customize the tab bar background
    CGRect frame = CGRectMake(0, 0, 320, 49);
    UIView *viewBackround = [[UIView alloc] initWithFrame:frame];
    UIImage *imgBackground = [UIImage imageNamed:@"tabBg.png"];
    UIColor *colorPattern = [[UIColor alloc] initWithPatternImage:imgBackground];
    viewBackround.backgroundColor = colorPattern;
    [colorPattern release];
    [[self.tabBarController tabBar] insertSubview:viewBackround atIndex:1];
    [viewBackround release];

No comments:

Post a Comment