2017-02-28 8 views
0

Ich habe versucht, zwei Möglichkeiten, UITabbar schwarz zu machen, aber keiner funktioniert. Irgendeine Idee warum?Wie macht man UITabbar schwarz?

tabBarController.tabBar.backgroundColor = [UIColor blackColor]; 
tabBarController.tabBar.tintColor = [UIColor blackColor]; 
+2

Verwenden 'tabBarController.tabBar.barTintColor' – deadbeef

Antwort

0

Dies sollte es tun.

tabBarController.tabBar.barTintColor = [UIColor blackColor]; 
0

tabBarController.tabBar.backgroundColor = UIColor.black

0

Wenn Sie in einer non-coding Weise interessiert sind und Storyboard verwenden.

Wählen Sie Ihre UITabBarController. Als nächstes wählen Sie Ihre UITabBar innerhalb der UITabBarController. Wie gezeigt:

enter image description here

nun auf der rechten Seite, wählen Sie die Attribute Inspektor. Und wählen Sie die gewünschte Farbtonfarbe.

enter image description here

Verwandte Themen