Ios tab Bar 使用方法
http://blog.sina.com.cn/s/blog_63578f140100w56m.html
UITabBar* tabBar = [[UITabBar alloc] initWithFrame:CGRectMake(40,0.0,240,30)];
[mainView addSubview:tabBar];
[tabBar release];
UITabBarItem *tabBarItem1 = [[UITabBarItem alloc] initWithTitle:@"排队人数" image:nil tag:0];
UITabBarItem * tabBarItem2 = [[UITabBarItem alloc] initWithTitle:@"人均" image:nil tag:1];
UITabBarItem * tabBarItem3 = [[UITabBarItem alloc] initWithTitle:@"距离" image:nil tag:2];
UITabBarItem * tabBarItem4 = [[UITabBarItem alloc] initWithTitle:@"好评" image:nil tag:3];
NSArray *tabBarItemArray = [[NSArray alloc] initWithObjects: tabBarItem1, tabBarItem2, tabBarItem3, tabBarItem4,nil];
[tabBar setItems: tabBarItemArray];
[tabBarItemArray release];
好像tabBar.backgroundColor = [UIColor blueColor];设置背景不起作用
alpha可以起作用
Ios tab Bar 使用方法的更多相关文章
- iOS第八课——Navigation Controller和Tab bar Controller
今天我们要学习Navigation Controller和Tab bar Controller. Navigation Controller是iOS编程中比较常用的一种容器,用来管理多个视图控制器. ...
- iOS开发:使用Tab Bar切换视图
iOS开发:使用Tab Bar切换视图 上一篇文章提到了多视图程序中各个视图之间的切换,用的Tool Bar,说白了还是根据触发事件使用代码改变Root View Controller中的Conten ...
- iOS开发中的错误整理,Changing the delegate of a tab bar managed by a tab bar controller is not allowed
iOS [错误:'Changing the delegate of a tab bar managed by a tab bar controller is not allowed.'] 错误:'Ch ...
- IOS学习之基于IOS7的tab bar
转载请注明出处 http://blog.csdn.net/pony_maggie/article/details/28129473 作者:小马 什么是tabbar? 先几张图: 上图中蓝色框 ...
- Tab Bar Controller和Navigation Controller混合使用详细教程
在IPHONE上,NAV和TAB混合使用的案例很多.但很多书籍都没详细介绍这个是怎么使用的.我也找了很久才弄清楚怎么做.现在分享给大家. 1.先建立一个Window-based Application ...
- iOS中的过期方法和新的替代方法
关于iOS中的过期方法和新的替代方法 1.获取某些类的UINavigationBar的统一外观并设置UINavigationbar的背景 注:方法名改了但是基本使用方法不变 + (instancety ...
- uitabbarcontroller中 在设置tab bar item的image属性后不显示问题
开始使用ios中的UITabBarController,在给Tab Bar Item设置自定义图片的时候,遇到了问题 按照如下配置: 出来的结果确是: 实际上test24.png应该是: 纠结了很久, ...
- iOS UISearchController 的使用方法
iOS UISearchController 的使用方法 UISearchController 让用户在 UISearchBar 上输入搜索关键词,展示搜索结果或者进行其他操作.UISearchCon ...
- 学习笔记:Tab Bar 控件使用详解
注意这里是:Tab Bar 不是Tab Bar Controller. Tab bar是继承UIView,所以可以添加到ViewController里.是View就可以add到另一个View上去.Ta ...
随机推荐
- 混乱的url编码||URL编码解码问题
转载自:http://www.ruanyifeng.com/blog/2010/02/url_encoding.html 一.问题的由来. url就是网址,只要上网就一定会用到. 一般来说,URL只能 ...
- oracle将两个结果连接后进行查询,得到两个查询的联合结果
一.需求 用户答题,共3道,必须3题都答完才能提交. 目的:要查询用户答对了几题,答错了几题.(当然此处可以只查答对的题目数,用3减即得答错题的题目数) 二.sql select * ) rightC ...
- phonegap/cordova 启动页面
启动phonegap应用时,因为phonegap还在加载一系列的东西,总会出现一段时间的黑屏.解决方法是设置一个启动页面(闪屏)来过渡,让应用的用户体验更好一些. 先讲ios版本的: 首先,你需要准备 ...
- C && C++ 内存分配示意图
<Unix环境系统高级编程>中的C语言内存分布示意图 1.C内存分布 BSS段: 用来存放程序中未初始化的全局变量.BSS是英文Block Started by Symbol的简称.BSS ...
- Mysql忘记密码修改密码
问题重现(以下讨论范围仅限Windows环境): C:\AppServ\MySQL> mysql -u root -p Enter password: ERROR 1045 (28000): A ...
- 【锋利的JQuery-学习笔记】广告栏
效果图: html: <div id="jnImageroll"> <a href="#nogo" id="JS_imgWrap&q ...
- uva 10626
dp 记忆化搜索 3个1元和1个10元的情况不能少 #include <cstdio> #include <cstdlib> #include <cmath> #i ...
- POJ 2349 Arctic Network(最小生成树,第k大边权,基础)
题目 /*********题意解说——来自discuss——by sixshine**************/ 有卫星电台的城市之间可以任意联络.没有卫星电台的城市只能和距离小于等于D的城市联络.题 ...
- POJ 2568/ZOJ 1965 Decode the Tree
题意:在树中,每次删去节点值最小的叶子结点. 每删去一个点,就给出与这相连的点的值,直到最后只剩下一个根结点,给这N-1个数,重新建立这个树. 思路: 给出的节点号按次序存入到数组a中,将未给出的数存 ...
- spring autoWire注解和@resource注解区别
1.autoWire注解主要是按类型匹配.因为autowire的扫描机制,是按照接口类型来扫描bean的. 而JSR250 @resource注解是通过名称扫描注入的. @autowire注解的扫描方 ...