//导航栏视图设置 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 是设置总背景图的更多相关文章

  1. 导航栏和里面的View设置的是同一颜色值,实际运行又不一样.

    导航栏和里面的View设置的是同一颜色值,实际运行又不一样.如何保证两者的颜色一致呢?  答案就是:( navigationBar.translucent = NO; )   去除 导航条的分割线(黑 ...

  2. 关于uni-app导航栏中 中间大图标的设置

    在uni-app的开发过程中,想要将位于中间的图标设置更大,通过一般的更改导航栏图标大小方式实现不了.经过查看官方文档可以发现,我们可以通过midbutton来设置中间tabbar的样式. 但前提是, ...

  3. Swift - 修改导航栏的样式(文字颜色,背景颜色,背景图片)

    默认情况,导航栏UINavigationController的样式如下,如果想要使用代码修改样式也是比较简单的. 1,修改导航栏背景色 1 2 3 //修改导航栏背景色 self.navigation ...

  4. iOS - 设置导航栏之标题栏居中、标题栏的背景颜色

    本章实现效果: Untitled.gif 前言: 项目中很多需求是要求自定义标题栏居中的,本人最近就遇到这中需求,如果用系统自带的titleView设置的话,不会居中,经过尝试,发现titleview ...

  5. flutter 主页面底部导航栏实现以及主题风格设置

    import 'package:flutter/material.dart'; import 'package:flutter_app/bottom_navigation_widget.dart'; ...

  6. Swift 导航栏设置

    let width = UIScreen.mainScreen().bounds.size.width let height = UIScreen.mainScreen().bounds.size.h ...

  7. iOS不得姐项目--appearance的妙用,再一次设置导航栏返回按钮,导航栏左右按钮的封装(巧用分类)

    一.UI_APPEARANCE_SELECTOR 彩票项目中appearance的用法一直没有搞明白,这次通过第二个项目中老师的讲解,更深一层次的了解到了很多关于appearance的作用以及使用方法 ...

  8. iOS 设置导航栏之二(设置导航栏的颜色、文字的颜色、左边按钮的文字及颜色)

                      #import <UIKit/UIKit.h> @interface AppDelegate : UIResponder <UIApplicati ...

  9. wordpress设置导航栏

    设置导航栏,首先你要设置你的导航分类.登陆后台---文章---分类目录,首先在这里输入你要写入导航的标题. 设置好后点击---外观---菜单这个地方就可以具体的设置导航的排序和下拉等二级

随机推荐

  1. set使用

    package com.cz.test.util.collection; import java.util.ArrayList;import java.util.Collection;import j ...

  2. poj1113Wall(凸包)

    链接 顺便整理出来一份自己看着比较顺眼的模板 #include <iostream> #include<cstdio> #include<cstring> #inc ...

  3. UIButton的状态

    normal(普通状态) 默认情况(Default) 对应的枚举常量:UIControlStateNormal highlighted(高亮状态)按钮被按下去的时候(手指还未松开)对应的枚举常量:UI ...

  4. B树索引

    在SQL Server中,索引是一种增强式的存在,这意味着,即使没有索引,SQL Server仍然可以实现应有的功能.但索引可以在大多数情况下大大提升查询性能高.在OLAP中尤其明显,要完全理解索引的 ...

  5. 【服务器环境搭建-Centos】jdk的安装

    1.查看是否已安装openjdk 使用rpm命令查看是否已安装openjdk[root@linuxidc ~]# rpm -qa | grep java tzdata-java-2012c-.el6. ...

  6. haskell rust相关文章

    Combining Rust and Haskell http://tab.snarc.org/posts/haskell/2015-09-29-rust-with-haskell.html

  7. 在linux(CentOS-6.7_x86_64)上安装mysql成功记录

    查看linux服务器的yum源设置: [root@hadoop03 yum.repos.d]# cd /etc/yum.repos.d [root@hadoop03 yum.repos.d]# ll ...

  8. Linux定时任务Crontab详解_定时备份

    文章来源:http://blog.chinaunix.net/uid-7552018-id-182133.html 今天做了个数据库的备份脚本,顺便系统得学习一下Linux下定时执行脚本的设置.Lin ...

  9. 同一个服务器部署多个tomcat

    下面我们把配置的详细过程写在下面,以供参考:(此例以配置三个Tomcat为例) 1. 下载apache-tomcat-7.0.63,下载下来的文件为apache-tomcat-7.0.63.zip. ...

  10. Gevent的长轮询实现方法详解

    长轮询 1.浏览网页时,浏览器会传HTTP 请求到服务器,服务器会根据请求将网页的内容传给浏览器,但是在很多的情况下,使用者会需要看到最新的即时性资讯,例如观看股票市场行情,而在以前只能靠着重新载入网 ...