I know that I can customize the text UIBarButtonItemthrough
setTitleTextAttributes:forState:
There is also a way to customize the icons UITabBarwith
setSelectedImageTintColor:
Is there a way to adjust the hue color UIBarButtonSystemItem(like the color of the trash can icon) just to have a consistent UX? I could not find anything.
If this is not possible, how can I continue? Should I keep the color version of the icon? Where can I find him? What would be the easiest way to change it?
EDIT
To clarify, this is not the background color UIBarButtonItemthat I ask, but the outline color of the icon.
EDIT
Setting the hue color UIBarButtonItemgives the background color of the button set.
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
self.window.backgroundColor = [UIColor whiteColor];
[self.window makeKeyAndVisible];
[[UINavigationBar appearance] setTintColor:[UIColor greenColor]];
UIBarButtonItem* trashButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemTrash target:nil action:nil];
trashButton.tintColor = [UIColor blackColor];
UIViewController* viewController = [[UIViewController alloc] init];
UINavigationController* navController = [[UINavigationController alloc] initWithRootViewController:viewController];
[viewController.navigationItem setRightBarButtonItem:trashButton];
self.window.rootViewController = navController;
return YES;
}
gives this one .
EDIT 2
, tintColor UIBarButtonItem, style UIBarButtonItemStylePlain. ( . [UIColor blackColor]). , UIBarButtonItem UINavigationBar, style UIBarButtonItemStyleBordered. tintColor .
UIBarButtonItem , .