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 ...
随机推荐
- Oracle重建表索引及手工收集统计信息
Oracle重建所有表的索引的sql: SELECT 'alter index ' || INDEX_NAME || ' rebuild online nologging;' FROM USER_IN ...
- Sublime Text 2 入门
SublimeText 2 的介绍视频: http://player.youku.com/player.php/partnerid/XOTcy/sid/XMzU5NzQ5ODgw/v.swf 以下 ...
- WinForm中Component Class、User Control及Custom Control的区别和使用建议
reference: http://blog.csdn.net/redstonehe/article/details/1536549 .NET Framework 为您提供了开发和实现新控件的能力.除 ...
- oracle 条件:1=1或1=0,动态添加条件
看到where语句中有条件:where 1=1 和 1=2或1<>1 用途: 1=1:是为了添加条件时使用and并列其他条件时使用的(动态连接后续条件) 比如: ...
- 【转载】C++针对ini配置文件读写大全
http://blog.csdn.net/hgy413/article/details/6666374# ini文件(Initialization file),这种类型的文件中通常存放的是一个程序的初 ...
- 奇异值分解(We Recommend a Singular Value Decomposition)
奇异值分解(We Recommend a Singular Value Decomposition) 原文作者:David Austin原文链接: http://www.ams.org/samplin ...
- C++ 操作法重载
http://www.weixueyuan.net/view/6382.html http://wuyuans.com/2012/09/cpp-operator-overload/
- 解决asp.net mvc中*.resx资源文件访问报错
个人笔记 问题重现 在asp.net mvc中,使用资源文件会出现一个问题,例如: 紧接着我进入视图界面,输入下面代码: <a href="javascript:void(0);&qu ...
- fedora下缺少autopoint包的解决办法
编译过程中,报错,缺少autopoint包 然而无论是yum install autopoint 还是yum search autopoint都没有理想的答案 执行yum install gettex ...
- WCF 笔记 (2) - 传输泛型 List 对象
WCF 笔记 (2) - 传输泛型 List 对象 本帖介绍怎么在 WCF 中,在 Server-side 和 Client-side 之间,传递默认无法传输的 List<T>.List& ...