How to move title of UITabBarItem?

后端 未结 5 2112
长发绾君心
长发绾君心 2021-02-13 04:08

Can somebody tell me please how can I move title of UITabBarItem for example 2px to top?

5条回答
  •  伪装坚强ぢ
    2021-02-13 04:46

    Solution:

    UITabBarItem *item = [tabBar.items objectAtIndex:0]; 
    item.titlePositionAdjustment = UIOffsetMake(0, -5.0);
    

提交回复
热议问题