这是导航栏的问题,将下边的代码放在  viewWillAppear  方法中就可以实现效果: - (void)viewWillAppear:(BOOL)animated{ // Called when the view is about to made visible. Default does nothing [super viewWillAppear:animated]; //去除导航栏下方的横线 [navigationBar setBackgroundImage:[UIImage imag…
导航栏透明,但是字体就不显示了,所以不可行. 下面两种方法是让导航栏下面的线不显示. // 方法1: [[self.navigationController.navigationBar.subviews objectAtIndex:0] setAlpha:0]; // 方法2: [self.navigationController.navigationBar setBackgroundImage:[[UIImage alloc] init]forBarMetrics:UIBarMetricsDe…
导航[self.navigationController.navigationBar setBackgroundImage:[UIImage new] forBarMetrics:UIBarMetricsDefault]; [self.navigationController.navigationBar setShadowImage:[UIImage new]]; 导航透明设置  [self.navigationController.navigationBar setTranslucent:NO…
1.在自己定义的导航栏中或者设计稿中经常需要去除导航栏的1px横线,主要是颜色太不协调了 去除之前的图片 要去除这1px的横线,首先应该知道它是什么,在Xcode的界面调试中可以看到,它其实是UIImageView来的 找到横线是什么了··· 其实这是navigationBar的shadowImage,所以只要设置它为空即可,但是设置它为空之前应该先设置它的背景也为空,全部代码如下: [self.navigationController.navigationBar setBackgroundIm…
IOS 改变导航栏返回按钮的标题   下午又找到了一个新的方法 这个方法不错 暂时没有发现异常的地方. 新写的App中需要使用UINavigationController对各个页面进行导航,但由于第一级页面的title较长,在进入第二级页面后返回按钮leftButtonItem的title就会变得很长,对NavigationBar空间占用很大,而且不美观,于是使用代码对leftButtonItem的title文本进行修改,无论是设置self.navigationItem.leftBarButto…
html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption…
自定义一个常用ListViewController .h文件 #import <UIKit/UIKit.h> @interface ListViewController : UIViewController -(void)diquButtonClick; @end .m文件 // // ListViewController.m // OuLianWang // // Created by allenariel on 15/6/24. // Copyright (c) 2015年 皇室美家. A…
方法一:设置BarButtonItem的文本样式为透明颜色,代码如下: [[UIBarButtonItem appearance] setTitleTextAttributes:@{NSForegroundColorAttributeName: [UIColor clearColor]} forState:UIControlStateNormal]; [[UIBarButtonItem appearance] setTitleTextAttributes:@{NSForegroundColorA…
一.更改状态栏颜色 (StatusBar) 就是比如导航栏是红色的状态栏是绿色的. 要实现这样的效果其实很简单,就是添加一个背景view. 简单的实现过程如下: 1 // 设置导航颜色 可用 2 [self.navigationController.navigationBar setBarTintColor:[UIColor redColor]]; 3 //创建一个高20的假状态栏 4 UIView *statusBarView = [[UIView alloc] initWithFrame:C…
//设置导航栏baritem和返回baiitem样式 UIBarButtonItem *barItem = [UIBarButtonItem appearance]; //去掉返回按钮上的字 [barItem setBackButtonTitlePositionAdjustment:UIOffsetMake(0, -60) forBarMetrics:UIBarMetricsDefault]; //把按钮设置为白色 barItem.tintColor = [UIColor whiteColor]…