zoukankan      html  css  js  c++  java
  • 导航栏相关知识

    一、从坐标(0,0)从导航栏下面算起

    self.edgesForExtendedLayout=UIRectEdgeBottom;

    二、导航栏是否半透明

    self.navigationController.navigationBar.translucent = NO;

    三、导航栏隐藏

    - (void)viewWillAppear:(BOOL)animated {
        [super viewWillAppear:animated];
        
        [self.navigationController setNavigationBarHidden:YES animated:animated];
    }
    
    - (void)viewWillDisappear:(BOOL)animated {
        [super viewWillDisappear:animated];
        
        [self.navigationController setNavigationBarHidden:NO animated:animated];
    }

    四、导航栏背景颜色的设置

    // 将导航栏背景变为紫色
    self.navigationController.navigationBar.barTintColor = [UIColor purpleColor];
    //  将状态栏和导航栏字体全变为白色
    self.navigationController.navigationBar.barStyle = UIBarStyleBlack;
    

      

    五、设置导航栏的title字体大小、颜色

        [self.navigationBar setTitleTextAttributes:@{
                                                     NSForegroundColorAttributeName : GMainBgColor_323232,
                                                     NSFontAttributeName : GTextFont_16
                                                      }];
    

      

    六、导航栏(包括状态栏)设置背景图片

     UIImage *backGroundImage = [UIImage imageNamed:@"home_nav_bg"];
     backGroundImage = [backGroundImage resizableImageWithCapInsets:UIEdgeInsetsZero resizingMode:UIImageResizingModeStretch]; // 这一句解决导航栏平铺问题,尤其在渐变色背景图片时
     [self.navigationController.navigationBar setBackgroundImage:backGroundImage forBarPosition:UIBarPositionAny barMetrics:UIBarMetricsDefault];
     [self.navigationController.navigationBar setShadowImage:[UIImage new]];

     

     

    此文章为个人笔记,方便自己以及有需要的朋友查看,转载请注明出处!
  • 相关阅读:
    [8,9]wsdl2h,soapcpp2 工具的使用
    [7].Gsoap快速入门
    [10].gSOAP Service 一些操作规范和格式
    [16]SOAP/XML在UDP上的实现
    [26].符号约定,gsoap 版本之间的差异性,以及通用性相关介绍
    [19].Gsoap 高级功能
    [14,15,16]MIME,DIME和MTOM附件
    [12,13].gSOAP 错误和标头处理
    Demo学习: Basic jQuery
    Demo学习: CalendarPanel
  • 原文地址:https://www.cnblogs.com/shpyoucan/p/7146384.html
Copyright © 2011-2022 走看看