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界面重大变革的背后,开发者们需要知道的又有哪些呢.同去年一样,我会先简单 ...
随机推荐
- android中文字中间有超链接的实现方法
1.XML里写: <resources> <string name="ACCOUNT_REGISTER_PROMPT_AGREEMENT">点击注册,表 ...
- Spring Cloud 模块简介
Spring Cloud Netflix对微服务的支持还有: Hystrix: 断路器和资源隔离 Feign: 声明式HTTP REST请求客户端 Ribbon: 与Eureka结合实现软负载均衡 Z ...
- GraphicsMagick 学习笔记
两种最常用的图片处理工具:GraphicsMagick 或 ImageMagick,GM是IM的分支,这两个图片处理工具功能基本相同,各有特色.但他们并不是nodejs的插件,它们都是客户端软件,li ...
- Kernel ridge regression(KRR)
作者:桂. 时间:2017-05-23 15:52:51 链接:http://www.cnblogs.com/xingshansi/p/6895710.html 一.理论描述 Kernel ridg ...
- springmvc mybatis 声明式事务管理回滚失效,(checked回滚)捕捉异常,传输错误信息
一.知识点及问题 后端框架: Spring .Spring mvc .mybatis 业务需求: client先从服务端获取用户大量信息到client,编辑完毕之后统一Post至服务端,对于数据的改动 ...
- Nginx的Rewrite正则表达式,匹配非某单词
Nginx的Rewrite正则表达式,匹配非某单词 由于要rewrite一个地址从 /mag/xx/xxx/ -> /m/xxx 但原先 /mag/xx/more/ 要保留 这就得写一个比较奇特 ...
- socket发送http请求
- Js 省市联动
function cn(){ this.Items = {}; } cn.prototype.add = function(id,iArray){ this.Items[id] = iArray; } ...
- oracle中空值null的判断和转换:NVL的用法
1.NULL空值概念 数据库里有一个很重要的概念:空值即NULL.有时表中,更确切的说是某些字段值,可能会出现空值, 这是因为这个数据不知道是什么值或根本就不存在. 2.NULL空值判断 空值不等同于 ...
- lua工具库penlight--05日期和时间
创建和显示时间 Date类提过了简洁的使用date和time的方法.它依赖于os.date和os.time. Date对象可以通过table创建,如果os.date,同时提过了获取和设置date 成员 ...