Search code examples
iosobjective-ciphoneios6ios8

iOS8 - not displaying custom tabbar images


I have a previously existing app(pre iOS8) that uses UITabbar with custom image. The tabbar is visible in iOS7 simulator and device, but it is not displaying in iOS8. What is causing this issue? I'm using image and selectedImage properties of UITabBarItem with UIImageRenderingModeAlwaysOriginal of images. Is the issue with the XCode 6 or iOS simulator(iPhone) or we can't use the custom images(only grayscale images are allowed!?) in tabbar anymore? reference for image property of tabbaritem

  • iOS7:

enter image description here

  • iOS8:

enter image description here


Solution

  • Problem with my approach on initialising the tabbar items(in the method when login completes inside login screen itself). I having the login check logic inside the viewDidLoad of login screen and segueing to home screen if user logged in. But in viewWillAppear of the login I am resetting the tabbarItems.

    In pre iOS 8 login screen is not displaying and I have the initialised tabbar in home screen. But in iOS 8 it displays the Login screen(for a while) even if I am segueing to home screen from viewDidLoad.

    To solve the issue I have moved the tabbar items init code into home screen.enter image description here