导航栏视图设置 tabbleView 是设置总背景图
//导航栏视图设置 tabbleView 是设置总背景图
//默认的时白色半透明(有点灰的感觉), UIBarStyleBlack,UIBarStyleBlackTranslucent ,UIBarStyleBlackOpaque都是黑色半透明,其实它们 有的时不透明有的时透明有的时半透明,但不知为何无效 果
// self.navigationController.navigation Bar.barStyle=UIBarStyleBlackOpaque;
//设置导航条背景颜色,也是半透明玻璃状的颜色效 果
// self.navigationController.navigation Bar.backgroundColor=[UIColor orangeColor];
[self.navigationController.navigationB ar setBackgroundImage:[UIImage imageNamed:@"daoheng"] forBarMetrics:UIBarMetricsDefault ];
//导航栏视图设置
self.titleView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, 64)];
//创建导航视图按钮 [self buttonView];
//导航栏视图设置
self.titleView= [[UIViewalloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, 64)];
//创建导航视图按钮 [self buttonView];
self.navigationItem.titleView = self.titleView;
//tabbleView 是设置总背景图
UIImageView*tableBg = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"cellBG"]];
tableBg.alpha = 0.9; [self.tableView
setBackgroundView:tableBg]; [self.tableView
setBackgroundColor:[UIColor clearColor]];
#pragma mark导航视图按钮实现 - (void)buttonView
{
self.videoBtn = [UIButton
buttonWithType:UIButtonTypeCustom];
[self.videoBtn setTitle:@"视频"
forState:UIControlStateNormal];
self.videoBtn.frame
=CGRectMake(kScreenWidth / 3 * 2 - 30, 10, 70,
30);
self.videoBtn.backgroundColor =
[UIColor grayColor];
[self.videoBtn.layer
setMasksToBounds:YES];
[self.videoBtn.layer
setCornerRadius:15];
[self.videoBtn.layer
setBorderWidth:1.0];
[self.videoBtn.layer
setBorderColor:(__bridge
CGColorRef)([UIColor redColor])];
[self.videoBtn addTarget:self
action:@selector(video)
forControlEvents:UIControlEventTouchUpInsi
de];
[self.titleView
addSubview:self.videoBtn];
self.messageBtn = [UIButton
buttonWithType:UIButtonTypeCustom];
[self.messageBtn setTitle:@"资讯"
forState:UIControlStateNormal];
self.messageBtn.tintColor = [UIColor
purpleColor];
self.messageBtn.frame
=CGRectMake(kScreenWidth / 3 - 30 , 10,
70 ,30); self.messageBtn.backgroundColo
r = [UIColor grayColor];
[self.messageBtn.layer
setMasksToBounds:YES];
[self.messageBtn.layer
setCornerRadius:15];
[self.messageBtn.layer
setBorderWidth:1.0];
[self.messageBtn.layer
setBorderColor:(__bridge
CGColorRef)([UIColor redColor])];
[self.titleView
addSubview:self.messageBtn];
}
#pragma mark 下方视图
- (void)createView
{
self.wishTableV = [[UITableView alloc]
initWithFrame:CGRectMake(0, 250,
kScreenWidth, kScreenHeight - 294)];
self.wishTableV.rowHeight = 100;
self.wishTableV.delegate = self;
self.wishTableV.dataSource = self;
self.wishTableV.backgroundColor =
[UIColor clearColor];
UIImageView *tableBg = [[UIImageView
alloc] initWithImage:[UIImage
imageNamed:@"xuyuan"]];
tableBg.alpha = 0.9;
[self.wishTableV
setBackgroundView:tableBg];
[self.wishTableV
setBackgroundColor:[UIColor clearColor]];
[self.view
addSubview:self.wishTableV];
}
导航栏视图设置 tabbleView 是设置总背景图的更多相关文章
- 导航栏和里面的View设置的是同一颜色值,实际运行又不一样.
导航栏和里面的View设置的是同一颜色值,实际运行又不一样.如何保证两者的颜色一致呢? 答案就是:( navigationBar.translucent = NO; ) 去除 导航条的分割线(黑 ...
- 关于uni-app导航栏中 中间大图标的设置
在uni-app的开发过程中,想要将位于中间的图标设置更大,通过一般的更改导航栏图标大小方式实现不了.经过查看官方文档可以发现,我们可以通过midbutton来设置中间tabbar的样式. 但前提是, ...
- Swift - 修改导航栏的样式(文字颜色,背景颜色,背景图片)
默认情况,导航栏UINavigationController的样式如下,如果想要使用代码修改样式也是比较简单的. 1,修改导航栏背景色 1 2 3 //修改导航栏背景色 self.navigation ...
- iOS - 设置导航栏之标题栏居中、标题栏的背景颜色
本章实现效果: Untitled.gif 前言: 项目中很多需求是要求自定义标题栏居中的,本人最近就遇到这中需求,如果用系统自带的titleView设置的话,不会居中,经过尝试,发现titleview ...
- flutter 主页面底部导航栏实现以及主题风格设置
import 'package:flutter/material.dart'; import 'package:flutter_app/bottom_navigation_widget.dart'; ...
- Swift 导航栏设置
let width = UIScreen.mainScreen().bounds.size.width let height = UIScreen.mainScreen().bounds.size.h ...
- iOS不得姐项目--appearance的妙用,再一次设置导航栏返回按钮,导航栏左右按钮的封装(巧用分类)
一.UI_APPEARANCE_SELECTOR 彩票项目中appearance的用法一直没有搞明白,这次通过第二个项目中老师的讲解,更深一层次的了解到了很多关于appearance的作用以及使用方法 ...
- iOS 设置导航栏之二(设置导航栏的颜色、文字的颜色、左边按钮的文字及颜色)
#import <UIKit/UIKit.h> @interface AppDelegate : UIResponder <UIApplicati ...
- wordpress设置导航栏
设置导航栏,首先你要设置你的导航分类.登陆后台---文章---分类目录,首先在这里输入你要写入导航的标题. 设置好后点击---外观---菜单这个地方就可以具体的设置导航的排序和下拉等二级
随机推荐
- for循坏的穷举与迭代,while、do while循环
for循环的穷举:所有情况走一遍,使用if筛选出符合的情况. 单位发一张150元购物卡,到超市买三种洗化用品,洗发水15元,香皂两元,牙刷5元,刚好花完150元,有多少种买法,每种买法各买几样. 百鸡 ...
- elastic
学习链接 http://rfyiamcool.blog.51cto.com/1030776/1420811?utm_source=tuicool&utm_medium=referral
- XML 解析器
所有现代浏览器都内建了供读取和操作 XML 的 XML 解析器.解析器把 XML 转换为 XML DOM 对象 - 可通过 JavaScript 操作的对象. 解析 XML 文档为DOM对象 方法一: ...
- Javascript设计模式之创建构造函数和方法
构造函数和方法 var Book = function (isbn,title,author) { this.setIsbn(isbn); this.setTitle(title); this.set ...
- JavaWeb网页聊天室(WebSocket即时通讯)
原文:http://baike.xsoftlab.net/view/656.html Git地址 http://git.oschina.net/loopcc/WebSocketChat 概要: Web ...
- 工作流学习——Activiti流程实例、任务管理四步曲 (zhuan)
http://blog.csdn.net/zwk626542417/article/details/46646565 ***************************************** ...
- 矩阵奇异值分解(SVD)及其应用
机器学习中的数学(5)-强大的矩阵奇异值分解(SVD)及其应用(好文) [简化数据]奇异值分解(SVD) <数学之美> 第15章 矩阵运算和文本处理中的两个分类问题
- linux笔记:RPM软件包管理-源码包管理
源码包和rpm包的区别: 源码包安装过程: 编译安装前准备(执行./configure --prefix=路径 来配置软件的安装位置,以及做其他的配置和检查): 编译和安装(直接在目录下执行make和 ...
- EPPLUS之外的选择,EXCEL的操作(NPOI,POI(java))
NPOI 编辑 NPOI 是 POI 项目的 .NET 版本.POI是一个开源的Java读写Excel.WORD等微软OLE2组件文档的项目. 中文名 NPOI 优 势 传统操作Excel遇到的 ...
- UITabBarController加载之后不显示sub view controller
原代码: fileprivate func createSubiewControllers() { let newsVC = NewsViewController() let newsItem = U ...