导航栏视图设置 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设置导航栏
设置导航栏,首先你要设置你的导航分类.登陆后台---文章---分类目录,首先在这里输入你要写入导航的标题. 设置好后点击---外观---菜单这个地方就可以具体的设置导航的排序和下拉等二级
随机推荐
- [转载] EXPLAIN执行计划中要重点关注哪些要素
原文: https://mp.weixin.qq.com/s?__biz=MjM5NzAzMTY4NQ==&mid=400738936&idx=1&sn=2910b4119b9 ...
- 【服务器防护】WEB防护 - WEBSHELL攻击探测【转载】
原文:http://www.2cto.com/Article/201511/451757.html 1. 什么是webshell? 基于b/s架构的软件部署在Internet上,那么安全性是必 ...
- 【官方方法】xcode7免证书真机调试
[官方方法]xcode7免证书真机调试 步骤比较简单,我就简单总结一下. 1. 进入xcode,菜单栏选择xcode –> preferences (快捷键 command + ,)在Accou ...
- RT-thread学习笔记(一)
我的基础:能在现有C程序下做些修改,不会移植,不会写驱动,很难从头到尾自己写程序. RT-thread基础:之前看了一点rtthread_manual.zh.pdf(即RT-thread使用手册),发 ...
- Docker 使用指南 (二)—— 搭建本地仓库
版权声明:本文由田飞雨原创文章,转载请注明出处: 文章原文链接:https://www.qcloud.com/community/article/94 来源:腾云阁 https://www.qclou ...
- 能源项目xml文件标签释义--<mvc:annotation-driven>
<mvc:annotation-driven />的可选配置 <mvc:annotation-driven message-codes-resolver ="bean re ...
- 字符串(string)转json
第一种方式: 使用js函数eval(); testJson=eval(testJson);是错误的转换方式. 正确的转换方式需要加(): testJson = eval("(" + ...
- 队列中使用Database Driver
队列允许你将一个耗时的任务进行延迟处理. 首先要在.evn文件中配置 QUEUE_DRIVER=database 要使用 database 这个队列驱动的话,则需要创建一个数据表来记住任务,使用命令: ...
- python 练习 22
Python程序语言指定任何非0和非空(null)值为true,0 或者 null为false. Python 编程中 if 语句用于控制程序的执行,基本形式为: if 判断条件: 执行语句…… el ...
- js中tagName和nodeName
DOM里常见的三种节点类型(总共有12种,如docment):元素节点,属性节点以及文本节点,例如<h2 class="title">head</h2>,其 ...