Appearance 的简单使用小知识点

来源:互联网 发布:电脑c语言编程软件 编辑:程序博客网 时间:2024/06/11 09:22

//push 之后隐藏文字(全局方法)

    [[UIBarButtonItem appearancesetBackButtonTitlePositionAdjustment:UIOffsetMake(0, -60forBarMetrics:UIBarMetricsDefault];

    //主题(title)的颜色为白色

    [[UINavigationBar appearancesetTitleTextAttributes:@{NSForegroundColorAttributeName:[UIColor whiteColor]}];

    //返回的箭头为白色

    [[UINavigationBar appearancesetTintColor:[UIColor whiteColor]];


注意:以上方法在必须在appdelegate的

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions; 方法里执行;

0 0
原创粉丝点击