Ask Your Question
2

When using the UITabBarController in iOS 15, why does the background color of the tabBar appear black?

asked 2023-06-18 14:00:00 +0000

lalupa gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2023-06-18 14:14:01 +0000

ladyg gravatar image

The background color of the tabBar appearing black in iOS 15 is likely because of the new UIBarAppearance feature in iOS 15. In iOS 15, the default UIBarAppearance for tab bars is a black color. To change the background color of the tab bar, you can set the backgroundColor property of the tabBar using the appearance() method of the UITabBar class. For example:

// Set the background color of the tab bar to red
UITabBar.appearance().backgroundColor = UIColor.red
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2023-06-18 14:00:00 +0000

Seen: 14 times

Last updated: Jun 18 '23