iPhone X tabbar title problem

Discussion in 'iOS Programming' started by erdinc27, Jan 19, 2018.

  1. erdinc27 macrumors regular

    Joined:
    Jul 20, 2011
    #1
    Hey guys, in an application I have UITabbarController with 5 tabs. In none of the 4.7 inhes or 5.5 inches devices tab title can be seen. All tabs look only with image. But in iPhone X title is displayed beside tab image. I dont want such a case. I want in all devices only image can be displayed. I checked tabs in storyboard "title" property is empty text but still it is displayed in iPhone X simulator.
    p.s Use Safe Area Layout Guides is ticked in storyboard.
    What can be reason for that?
     
  2. SonViking macrumors newbie

    SonViking

    Joined:
    Jan 25, 2018
    #2
    Simply change tab bar title color to clear color.

    Code:
        [[UITabBarItem appearance] setTitleTextAttributes:@{NSForegroundColorAttributeName: [UIColor clearColor]}
                                                 forState:UIControlStateNormal];
        [[UITabBarItem appearance] setTitleTextAttributes:@{NSForegroundColorAttributeName: [UIColor clearColor]}
                                                 forState:UIControlStateHighlighted];
     

Share This Page