FAQ Database Discussion Community


TabBarController instance Swift 2.0

ios,tabbarcontroller,swift2
I am trying to Compile my app again now that Swift 2 is out and the thing is I am having an error with TabBarController instances. I am declaring the instances in vars in order to use methods from anothers ViewControllers. Here it's my code: let barViewControllers = self.tabBarController?.viewControllers let...

iOS8 Swift TabBarController Change Icon Color

swift,colors,ios8,icons,tabbarcontroller
Good day, everyone. I'm trying to change the color of the icons in my TabBarController. I've successfully changed the textcolor (just below the icons), but cant figure out how I change the icon color. I've changed the icon-text-color like this: UITabBarItem.appearance().setTitleTextAttributes([NSForegroundColorAttributeName: UIColor.orangeColor()], forState:.Selected) UITabBarItem.appearance().setTitleTextAttributes([NSForegroundColorAttributeName: UIColor.whiteColor()], forState:.Normal) I've put this into...