Following method is accepted if I set UIColor like:
[tabBarController.tabBar setSelectedImageTintColor:[UIColor greenColor]];
However I would like to call it like:
[tabBarController.tabBar setSelectedImageTintColor:colors];
when
- (UIColor *)colors{
UIColor *colorIcon = [UIColor greenColor];
return colorIcon;
}
and program returns an error “undeclared identifier colors”. What am I doing wrong? Thanks
Try this instead: