IOS7开发~新UI学起(二)
本文转载至 http://blog.csdn.net/lizhongfu2013/article/details/9133281
1、UINavigationBar:
NSDictionary* attrs = @{NSForegroundColorAttributeName: [UIColorblackColor],
NSFontAttributeName: [UIFontfontWithName:@"AmericanTypewriter"size:0.0],
};
[[UINavigationBar appearance] setTitleTextAttributes:attrs];
[[UINavigationBar appearance] setTintColor:[UIColorredColor]];
UINavigationBar *navBar = [[UINavigationBaralloc]init];
navBar.frame = CGRectMake(0,50,320, 44);
[navBar pushNavigationItem:[[UINavigationItemalloc]initWithTitle:@"Test"]animated:YES];
[navBar pushNavigationItem:[[UINavigationItemalloc]initWithTitle:@"Test"]animated:YES];
[navBar pushNavigationItem:[[UINavigationItemalloc]initWithTitle:@"Test"]animated:YES];
[navBar pushNavigationItem:[[UINavigationItemalloc]initWithTitle:@"Test"]animated:YES];
[navBar setBarStyle:UIBarStyleDefault];
[navBar setBackgroundImage:[UIImageimageNamed:@"bg.png"]forBarMetrics:UIBarMetricsDefault];
[self.view addSubview:navBar];
2、UIProgressView:
{
progress = [[UIProgressViewalloc]initWithFrame:CGRectMake(10,100,300,10)];
[progresssetProgressImage:[UIImageimageNamed:@"bg.png"]];
[progresssetProgressViewStyle:UIProgressViewStyleBar];
[progresssetTrackImage:[UIImageimageNamed:@"sss.png"]];
[self.viewaddSubview:progress];
[NSTimer scheduledTimerWithTimeInterval:1.0target:selfselector:@selector(run)userInfo:nilrepeats:YES];
}
-(void) run
{
progress.progress +=0.1;
[progresssetProgress:progress.progressanimated:YES];
}
2、UISearchbar:
UISearchBar *searchBar = [[UISearchBaralloc]initWithFrame:CGRectMake(0,20,320,44)];
[searchBar setBarStyle:UIBarStyleDefault];
[searchBar setBarTintColor:[UIColorredColor]];
[searchBar setBackgroundImage:[UIImageimageNamed:@"bg.png"]
forBarPosition:UIBarPositionAny
barMetrics:UIBarMetricsDefault];
searchBar.showsCancelButton =YES;
[self.view addSubview:searchBar];
IOS7开发~新UI学起(二)的更多相关文章
- IOS7开发~新UI学起(一)
本文转载至:http://blog.csdn.net/lizhongfu2013/article/details/9124893 IOS7在UI方面发生了很大改变,所以感觉有必要重新审视的学习一下(新 ...
- IOS7开发~新UI学起(三)
1.UITextView: A ) IOS7新增加的 UITextViewDelegate 方法: - (BOOL)textView:(UITextView *)textView shoul ...
- iOS开发~UI布局(二)storyboard中autolayout和size class的使用详解
一.概要:前一篇初步的描述了size class的概念,那么实际中如何使用呢,下面两个问题是我们一定会遇到的: 1.Xcode6中增加了size class,在storyboard中如何使用? 2.a ...
- iOS8开发~UI布局(二)storyboard中autolayout和size class的使用具体解释
一.概要:前一篇初步的描写叙述了size class的概念,那么实际中怎样使用呢,以下两个问题是我们一定会遇到的: 1.Xcode6中添加了size class,在storyboard中怎样使用? 2 ...
- IOS7开发~新UI学起(四)
本文转载至 http://blog.csdn.net/lizhongfu2013/article/details/9166193 1.UITableView: UITableViewDelegate ...
- IOS7学习之路一(新UI之自定义UITableViewCell)
ios7 新升级之后界面有了很大的变化,xcode模拟器去掉了手机边框和home键,如果想回到主页面,可以按住shift+comment+r键.废话少说先展示一下新UI下UItableView设置为G ...
- UGUI的优点新UI系统二 直观、易于使用
UGUI的优点新UI系统二 直观.易于使用 对于UI控件,开发者可以直接使用鼠标在Scene视图里编辑它们的大小.位置和旋转角度,而无需编写任何代码,以Button为例,如图1-3.图1-4和图1 ...
- NX二次开发-Block UI C++界面关于 在Block UI中UF_initialize();和UF_terminate();的使用
关于 在Block UI中UF_initialize();和UF_terminate();的使用 用Block UI作NX二次开发的时候,不需要在使用UFUN函数的时候加UF_initialize() ...
- 开发者所需要知道的iOS7 SDK新特性
iOS 7 春风又绿加州岸,物是人非又一年.WWDC 2013 keynote落下帷幕,新的iOS开发旅程也由此开启.在iOS7界面重大变革的背后,开发者们需要知道的又有哪些呢.同去年一样,我会先简单 ...
随机推荐
- OAuth2.0官方文档中文翻译
http://page.renren.com/699032478/note/708597990 (一)背景知识 OAuth 2.0很可能是下一代的“用户验证和授权”标准,目前在国内还没有很靠谱的技术资 ...
- Linux命令-文件处理命令:touch
touch chengshi.list 在当前目录中创建chengshi.list文件 touch /root/chengshi.list 在root目录下面创建chengshi.list文件 tou ...
- 类型转换运算符、*运算符重载、->运算符重载、operator new 和 operator delete
一.类型转换运算符 必须是成员函数,不能是友元函数 没有参数 不能指定返回类型 函数原型:operator 类型名(); C++ Code 1 2 3 4 5 6 7 8 9 10 11 12 1 ...
- Hive 中的变量
Hive的变量前面有一个命名空间,包括三个hiveconf,system,env,还有一个hivevar hiveconf的命名空间指的是hive-site.xml下面的配置变量值. system的命 ...
- unity, ugui button 禁止重复点击
如上图,button名称为btn_sim,当点击button后,开始播放zoomToTarget动画.为了防止在动画播放过程中再次点击button导致动画被打断,希望当首次点击button后butto ...
- Android 使用PLDroidPlayer播放网络视频 依据视频角度自己主动旋转
近期由于项目需求 .须要播放网络视频 .于是乎 研究了一番 ,说说我遇到的那些坑 如今市面上有几个比較主流好用的第三方框架 Vitamio ( 体积比較大,有商业化风险 github:https:// ...
- CXAnimation.h动画类
/**************************************************************************** 使用一个CCAnimation对象可以CCS ...
- MongoDB Replica Set搭建集群
MongoDB做集群,版本3.2官网推荐的集群方式Replica Set 准备服务器3台 两个standard节点(这两个节点直接可以互切primary secondary). 一个arbiter节点 ...
- hadoop三大组件的简单图解
如有不对,欢迎大家指正
- Odoo ParseError:"decoder jpeg not available" while parsing....
The reason causing this problem is the plugin PIL install error to solve this problem,try this: 1. c ...