SWIFT 3.0 -->
The Ideal way to set your tab bar button images is as follows :
first set the images you want to use for the button :
let homeImage = UIImage(named: "TabHome")
let homeTappedImage = UIImage(named: "TabHomeRed")
then set the button of type UITabButtonItem :
let homeButton = UITabBarItem(title: homeText, image: homeImage, selectedImage: homeTappedImage)
//with this method you set the image when the button is not selected
homeButton.image = homeImage?.withRenderingMode(UIImageRenderingMode.alwaysOriginal)
//with this method you set the image when the button is selected
homeButton.selectedImage = homeTappedImage?.withRenderingMode(.alwaysOriginal)