UITabBar not showing selected item images in ios 7

后端 未结 20 1887
我在风中等你
我在风中等你 2020-11-29 18:36

The icons show fine in ios 6 but not in ios 7. I\'m setting the selected state in the viewController viewDidLoad method. When the user selects a tab bar item the image disap

20条回答
  •  没有蜡笔的小新
    2020-11-29 19:01

    I had the same problem with Xcode 6.0.1 (6A317), seems to be a bug with Interface builder. However, i've managed to solve it by leaving selected image empty in interface builder then at each viewDidLoad in my view controllers i did insert:

    [self.navigationController.tabBarItem setSelectedImage:[UIImage imageNamed:@"imagename-selected"]];

    it works well now, showing my selectedImage and with global tint mask.

提交回复
热议问题