Skip to main content

Posts

Showing posts with the label uitabbaritem

'UITabBarItem' may not respond to 'SetAction'

I have a number of tabs in my app. The tabs are working with no issues, but I'm getting some warning messages (in the title above) which I would like to get rid of. My code is as follows: -(void)pressItem1:(id)sender { [self presentModalViewController:settingsViewController animated:YES]; } -(void)pressItem2:(id)sender { [self presentModalViewController:infoViewController animated:YES]; } -(void)pressItem3:(id)sender { [self presentModalViewController:aboutViewController animated:YES]; } -(void)viewDidLoad { self.view.backgroundColor = [[UIColor alloc] initWithPatternImage:[UIImage imageNamed:@"background.png"]]; CGRect frame = CGRectMake(0, 0, 480, 49); UIView *v = [[UIView alloc] initWithFrame:frame]; UIImage *i = [UIImage imageNamed:@"smallMenuBackground.png"]; UIColor *c = [[UIColor alloc] initWithPatternImage:i]; v.backgroundColor = c; [c release]; [mainTabBar insertSubview:v atIndex:0]; [v release];