IOS关于设置导航栏的一些总结

    xiaoxiao2026-09-25  7

    [[UIBarButtonItemappearance]setBackButtonTitlePositionAdjustment:UIOffsetMake(0, -60) forBarMetrics:UIBarMetricsDefault];//隐藏导航栏的“back”字样

    NAVIGATIONBARCOLOR self.navigationController.navigationBar.barTintColor=[UIColor colorWithRed:105.0/255 green:125.0/255 blue:141.0/255 alpha:1]//设置导航栏颜色

    [self.navigationController.navigationBar setTitleTextAttributes:@{NSForegroundColorAttributeName:[UIColor whiteColor]}]//设置导航栏字体的颜色和大小

    self.navigationItem.title=@“标题”//设置导航栏显示标题

    self.navigationController.navigationBarHidden=YES;隐藏导航栏

     self.navigationController.navigationBar.tintColor=[UIColor whiteColor];//改变导航条上按钮的颜色如返回按钮

    转载请注明原文地址: https://ju.6miu.com/read-1312311.html
    最新回复(0)