I have a UITabBar
with 4 UITabBarItems
and each item have an image and a selectedimage
.
Normally I want to have that :
But on first launch, the app displays all selected images :
Then, if I kill the app, I have the good state (first image). Why ?
EDIT :
I found the problem. There were this lines in the code and they make a conflict :
for item in tabBarController.tabBar.items! {
item.image = item.selectedImage?.imageWithColor(tintColor: UIColor(hex: "#777777")).withRenderingMode(.alwaysOriginal)
}
I just deleted them and it worked.