change font of back button on uinavigationcontroller

前端 未结 5 1163
滥情空心
滥情空心 2020-12-25 12:14

I\'m trying to change the font color of the text on my back button in my UINavigationControllerBar

    [[UIBarButtonItem appearance] setTitleColor:[UIColor r         


        
5条回答
  •  一向
    一向 (楼主)
    2020-12-25 12:36

    [[UIBarButtonItem appearance] setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:
                                                         [UIFont fontWithName:kDefaultFont size:16.0f],UITextAttributeFont,
                                                         nil] forState:UIControlStateNormal];
    

提交回复
热议问题