这是导航栏的问题,将下边的代码放在  viewWillAppear  方法中就可以实现效果:

- (void)viewWillAppear:(BOOL)animated{

// Called when the view is about to made visible. Default does nothing

[super viewWillAppear:animated];

//去除导航栏下方的横线

[navigationBar setBackgroundImage:[UIImage imageWithColor:[self colorFromHexRGB:@"33cccc"]]

forBarPosition:UIBarPositionAny

barMetrics:UIBarMetricsDefault];

[navigationBar setShadowImage:[UIImage new]];

}

IOS 去掉导航栏(UINavigationBar)下方的横线的更多相关文章

  1. iOS 去掉导航栏最下面线的方法

    导航栏透明,但是字体就不显示了,所以不可行. 下面两种方法是让导航栏下面的线不显示. // 方法1: [[self.navigationController.navigationBar.subview ...

  2. iOS去除导航栏和tabbar的横线

    导航[self.navigationController.navigationBar setBackgroundImage:[UIImage new] forBarMetrics:UIBarMetri ...

  3. iOS去除导航栏和tabbar的1px横线

    1.在自己定义的导航栏中或者设计稿中经常需要去除导航栏的1px横线,主要是颜色太不协调了 去除之前的图片 要去除这1px的横线,首先应该知道它是什么,在Xcode的界面调试中可以看到,它其实是UIIm ...

  4. IOS 改变导航栏返回按钮的标题

    IOS 改变导航栏返回按钮的标题   下午又找到了一个新的方法 这个方法不错 暂时没有发现异常的地方. 新写的App中需要使用UINavigationController对各个页面进行导航,但由于第一 ...

  5. iOS 11 导航栏 item 偏移问题 和 Swift 下 UIButton 设置 title、image 显示问题

    html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,bi ...

  6. ios 自定义导航栏,开启侧滑返回手势

    自定义一个常用ListViewController .h文件 #import <UIKit/UIKit.h> @interface ListViewController : UIViewC ...

  7. iOS 11 使用方法替换(Method Swizzling),去掉导航栏返回按钮的文字

    方法一:设置BarButtonItem的文本样式为透明颜色,代码如下: [[UIBarButtonItem appearance] setTitleTextAttributes:@{NSForegro ...

  8. iOS 自定义导航栏 和状态栏

    一.更改状态栏颜色 (StatusBar) 就是比如导航栏是红色的状态栏是绿色的. 要实现这样的效果其实很简单,就是添加一个背景view. 简单的实现过程如下: 1 // 设置导航颜色 可用 2 [s ...

  9. iOS设置导航栏样式(UINavigationController)

    //设置导航栏baritem和返回baiitem样式 UIBarButtonItem *barItem = [UIBarButtonItem appearance]; //去掉返回按钮上的字 [bar ...

随机推荐

  1. Aspose.Cells设置自动列宽(最佳列宽)及一些方法总结

    /// <summary> /// 设置表页的列宽度自适应 /// </summary> /// <param name="sheet">wor ...

  2. DEV控件Grid显示行号

    DEV控件Grid的显示行号需要通过一个事件来设置,具体设置代码为: private void gridView1_CustomDrawRowIndicator(object sender, DevE ...

  3. ASP.NET实现验证码

    using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.UI ...

  4. 正则表达式30分钟入门:http://deerchao.net/tutorials/regex/regex.htm#mission

    http://deerchao.net/tutorials/regex/regex.htm#mission

  5. HTTP头部详解

    因为之后的HTTP头注入要学习这些所以就看了.觉得很不错,算是学习前的科普. <HTTP头部详解>转载自:http://www.cnblogs.com/lcamry/p/5763040.h ...

  6. opencv高斯背景建模

    #include <iostream> #include <string> #include <opencv2/opencv.hpp> int main(int a ...

  7. u-boot 流程分析

    u-boot 介绍: 对于计算机来说 , 从一开始上机通电是无法直接启动操作系统的 , 这中间需要一个引导过程 , 嵌入式Linux系统同样离不开引导程序 ,  这个启动程序就叫启动加载程序(Boot ...

  8. GR32 TImage32的图层绘制原理

    转载:http://blog.sina.com.cn/s/blog_491aced20100ded4.html TImage32的继承顺序如下:TCustomControl->TCustomPa ...

  9. Tip

    Windows 开栈命令 -Wl,--stack=1000000000 //stack-size B Linux 开栈命令 -ulimit -a -ulimit -s size //stack-siz ...

  10. spring和hibernate整合时无法自动建表

    在使用spring整合hibernate时候代码如下: <property name="dataSource" ref="dataSource" /> ...