美文网首页iOS归纳
iOS tabbar文字与图片间距

iOS tabbar文字与图片间距

作者: Simon_Liang | 来源:发表于2019-01-24 16:46 被阅读0次

    - (void)addOneChildViewController:(UIViewController*)viewController

                            WithTitle:(NSString*)title

                      normalImageName:(NSString*)normalImageName

                    selectedImageName:(NSString*)selectedImageName {

    viewController.tabBarItem.title= title;

    [viewController.tabBarItem setTitleTextAttributes:dict forState:UIControlStateNormal];

    viewController.tabBarItem.titlePositionAdjustment = UIOffsetMake(0, 5);

     viewController.tabBarItem.imageInsets=UIEdgeInsetsMake(-1,0,1,0);

    }

    相关文章

      网友评论

        本文标题:iOS tabbar文字与图片间距

        本文链接:https://www.haomeiwen.com/subject/sskujqtx.html