设置NavigationController的背景图片

RootViewController *rootVC = [[ViewController alloc] init];

NavigationController *navigationVC = [[NavigationController alloc]initWithRootViewController:rootVC];

[navigationVC.navigationBar
setBackgroundImage:[UIImage
imageNamed:@"bj1.jpg"]forBarMetrics:UIBarMetricsDefault];

时间: 2024-08-10 23:26:26

设置NavigationController的背景图片的相关文章

js如何设置div的背景图片

js如何设置div的背景图片:通过js设置div背景图片的方式有多种,这里只介绍一下使用style方式设置,尽管这种方式大家最为熟悉,但是设置背景因为涉及到路径,可能会稍稍造成一点困难,直接给出代码: odiv.style.backgroundImage="url('images/test.jpg')"; 当然也可以使用setAttribute()函数实现,具体可以参阅setAttribute()函数的用法详解一章节. 原文地址是:http://www.softwhy.com/foru

在VC++6.0中给对话框设置背景色或者背景图片

/*********************************************************** *说明: 在VC++6.0中给对话框设置背景色或者背景图片 *备注:测试代码的对话框程序的工程名为:BJ *原理:在OnPaint()中加入代码 ***********************************************************/ // 注意:去掉相应以 /* */ 注释的注释符号后代码生效 void CBJDlg::OnPaint() {

iOS设置UITableView的背景图片,以及不显示多余的空Cell

设置UITableView的背景图片:     UIImageView *imageView=[[UIImageView alloc]initWithImage:[UIImage imageNamed:@"hi.jpg"]];     [self.tableView setBackgroundView:imageView]; 设置UITableView不显示多余的空Cell:     self.tableView.tableFooterView = [[UIView alloc] in

设置按钮的背景图片

设置按钮在不同状态下的背景图片(为了保证高亮状态下的图片正常显示,必须设置按钮的type为custom)

VS 设置背景色和背景图片

VS版本:2013 选择菜单栏上——工具——选项——环境——字体和颜色——自定义(项背景),选择好自己喜欢的颜色即可 设置背景图片 下载vs插件(ClaudiaIDE):https://visualstudiogallery.msdn.microsoft.com/9ba50f8d-f30c-4e33-ab19-bfd9f56eb817 选择菜单栏上的——工具——ClaudiaIDE——General——单一背景,更改图片的路径就可以自己设置喜欢的图片了

Django学习之设置body的背景图片

为了让页面内容更加丰富,应当设置背景颜色或背景图片.在Django中背景图片一般放置在存放静态文件的static目录中,一般有两种方法进行设置: 一.在templates中设置 假设 “pic1.jpg” 的存放路径 “ project/app/static/img/pic1.jpg ” .在templates的body中设置style.如下: <body style="background: #ffffff url({% static "img/pic1.jpg" %

Html-根据不同的分辨率设置不同的背景图片

@media only screen and (min-width: 1024px)     //当分辨率width >= 1024px 时使用1.jpg作为背景图片 { .bg{ background:url(./images/1.jpg) no-repeat; } } @media only screen and (min-width: 400px) and (max-width: 1024px)    //当分辨率400px < width < 1024px 时使用2.jpg作为背

设置tableview的背景图片(被坑过)

[self.tableView setBackgroundView:bgImageView]; 坑死我 弄了好久

js设置随机切换背景图片

<script> var imgs =["http://images.cnblogs.com/cnblogs_com/xiaobo-Linux/1112236/o_2.jpg", "http://images.cnblogs.com/cnblogs_com/xiaobo-Linux/1112236/o_default.png", "http://images.cnblogs.com/cnblogs_com/xiaobo-Linux/111223