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界面重大变革的背后,开发者们需要知道的又有哪些呢.同去年一样,我会先简单 ...
随机推荐
- php 实现打印预览的功能
<inputid="btnPrint" type="button" value="打印"onclick="javascrip ...
- atoi 和 itoa
转自:http://www.cnblogs.com/cobbliu/archive/2012/08/25/2656176.html atoi 和 itoa是面试笔试经常要考到的题目,下面两份代码是用C ...
- AESDK关于AEFX_CLR_STRUCT的用处
主要是在初始化UI值的时候遇到问题,一直报错 但确实没有用到ui_width,ui_height...,仔细检查例子工程发现,少了一个AEFX_CLR_STRUCT宏 AEFX_CLR_STRUCT其 ...
- DB2的sql函数
转自:http://blog.chinaunix.net/uid-21162795-id-3587646.html 一.字符转换函数 1.ASCII() 返回字符表达式最左端字符的ASCII 码值.在 ...
- linux中使用lftp上传下载文件
lftp是linux中一款ftp服务器相比windows中的ftp显得要复杂不少了,下面我来总结一下lftp文件上传,文件下载,及文件查找等等相关命令吧. lftp连接的几种方法,最常用的是lftp ...
- python-wechatAutoReword
python-微信自动回复功能,基于itchat 2017.9.6 实现群@自动回复 #! /usr/bin/env python3.5.2 # coding="utf-8" im ...
- locatin
//location对象 //初始url:http://www.wrox.com/WileyCDA: //将URL修改为:http://www.wrox.com/WileyCDA/#section1 ...
- SecureCRT配置自动保存日志(实用)
点“选项”---“全局选项”--“全局选项”--“默认会话”--“编辑默认设置”--“日志文件” 在“日志文件”中输入相应的参数就能达到这一效果. 比如你的日志文件放在的D:/SecureCRT/lo ...
- FreeRTOS 调试方法(printf---打印任务执行情况)
以下转载自安富莱电子: http://forum.armfly.com/forum.php 本章节为大家介绍 FreeRTOS 的调试方法,这里的调试方法主要是教会大家如何获取任务的执行情况,通过获取 ...
- jquery文件导入问题
开发前台web,导入jquery文件的时候最好用 <script type="text/javascript" src="path"></sc ...