For that you need to set barTintColor
and tintColor
property of UITaBbar
.
self.tabBarController?.tabBar.barTintColor = .blue //Background Color
self.tabBarController?.tabBar.tintColor = .yellow //Selected Item tint color
Note: If you have image for both state means default and selected, then set both the images for its sets, check this answer to set selected image for tabbar item. Now set the Render mode
of both the image to Original Image
in assets, if you don't know how to set that check this answer .
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.