0

I am write this code but the warning is show "insertSubview" may not respond

- (void)viewDidLoad {

    [super viewDidLoad]; 

    CGRect frame = CGRectMake(0, 0, 480, 49);

    UIView *v = [[UIView alloc] initWithFrame:frame];

    UIImage *i = [UIImage imageNamed:@"GO-21-TabBarColorx49.png"];

    UIColor *c = [[UIColor alloc] initWithPatternImage:i];

    v.backgroundColor = c;

    [c release];

    [[self tabBar] addSubview:v];

    [v release];

}
Abhishek
  • 293
  • 1
  • 6
  • 25

1 Answers1

1

Did you try

[[self tabBar] insertSubview:v atIndex:0];

Instead of addSubview:

Source: Changing Tint / Background color of UITabBar

Community
  • 1
  • 1
smdvlpr
  • 1,077
  • 9
  • 22