//导航栏视图设置 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. Linux_服务

    1.服务启动顺序 http://bbs.chinaunix.net/thread-1970916-1-1.html http://bbs.csdn.net/topics/240060477 2.Lin ...

  2. iOS8 获取通知设置状态

    UIUserNotificationSettings *settings = [[UIApplication sharedApplication] currentUserNotificationSet ...

  3. [转载] YouCompleteMe

    原文: http://blog.marchtea.com/archives/161#rd?sukey=fc78a68049a14bb2ba33c15948d34749e1eb616df07efe977 ...

  4. java SE (java Standard Edition)

    14.10.22 学习java SE的Object: -------------------------------------15.11.18----

  5. linux之稀疏文件

    1. Sparse 文件是并不占用磁盘存储空间. 2. rm 某文件后, 文件占用的磁盘空间并不是立即释放, 而是其句柄没有被任意一个进程引用时才回收. 3. ls 的结果是 apparent siz ...

  6. swift语言学习之UITableView分割线左边到头的解决

    此方法兼容ios 7.8.9  // 在tableView创建地方设置 if tableView!.respondsToSelector("setSeparatorInset:") ...

  7. js 高程(三)学习感言(随时更新)

    1.读第二遍了,感觉第一遍白读了. 2.现在还处于初学...

  8. D3.js 其他选择元素方法

    在上一节中,已经讲解了 select 和 selectAll,以及选择集的概念.本节具体讲解这两个函数的用法. 假设在 body 中有三个段落元素: <p>Apple</p> ...

  9. [转]使用git命令上传代码

    http://jiajing.elastos.org/2013/04/15/%E4%BD%BF%E7%94%A8git%E5%91%BD%E4%BB%A4%E4%B8%8A%E4%BC%A0%E4%B ...

  10. Machine Learning for hackers读书笔记(三)分类:垃圾邮件过滤

    #定义函数,打开每一个文件,找到空行,将空行后的文本返回为一个字符串向量,该向量只有一个元素,就是空行之后的所有文本拼接之后的字符串 #很多邮件都包含了非ASCII字符,因此设为latin1就可以读取 ...