本文转载至 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学起(二)的更多相关文章

  1. IOS7开发~新UI学起(一)

    本文转载至:http://blog.csdn.net/lizhongfu2013/article/details/9124893 IOS7在UI方面发生了很大改变,所以感觉有必要重新审视的学习一下(新 ...

  2. IOS7开发~新UI学起(三)

    1.UITextView: A )      IOS7新增加的 UITextViewDelegate 方法: - (BOOL)textView:(UITextView *)textView shoul ...

  3. iOS开发~UI布局(二)storyboard中autolayout和size class的使用详解

    一.概要:前一篇初步的描述了size class的概念,那么实际中如何使用呢,下面两个问题是我们一定会遇到的: 1.Xcode6中增加了size class,在storyboard中如何使用? 2.a ...

  4. iOS8开发~UI布局(二)storyboard中autolayout和size class的使用具体解释

    一.概要:前一篇初步的描写叙述了size class的概念,那么实际中怎样使用呢,以下两个问题是我们一定会遇到的: 1.Xcode6中添加了size class,在storyboard中怎样使用? 2 ...

  5. IOS7开发~新UI学起(四)

    本文转载至 http://blog.csdn.net/lizhongfu2013/article/details/9166193 1.UITableView: UITableViewDelegate ...

  6. IOS7学习之路一(新UI之自定义UITableViewCell)

    ios7 新升级之后界面有了很大的变化,xcode模拟器去掉了手机边框和home键,如果想回到主页面,可以按住shift+comment+r键.废话少说先展示一下新UI下UItableView设置为G ...

  7. UGUI的优点新UI系统二 直观、易于使用

    UGUI的优点新UI系统二 直观.易于使用   对于UI控件,开发者可以直接使用鼠标在Scene视图里编辑它们的大小.位置和旋转角度,而无需编写任何代码,以Button为例,如图1-3.图1-4和图1 ...

  8. NX二次开发-Block UI C++界面关于 在Block UI中UF_initialize();和UF_terminate();的使用

    关于 在Block UI中UF_initialize();和UF_terminate();的使用 用Block UI作NX二次开发的时候,不需要在使用UFUN函数的时候加UF_initialize() ...

  9. 开发者所需要知道的iOS7 SDK新特性

    iOS 7 春风又绿加州岸,物是人非又一年.WWDC 2013 keynote落下帷幕,新的iOS开发旅程也由此开启.在iOS7界面重大变革的背后,开发者们需要知道的又有哪些呢.同去年一样,我会先简单 ...

随机推荐

  1. Redis配置和常用命令

    redis.conf配置文件: 引用 #是否作为守护进程运行 daemonize yes #配置pid的存放路径及文件名,默认为当前路径下 pidfile redis.pid #Redis默认监听端口 ...

  2. Ubuntu14.04单机版kubernetes安装指导

    转:http://dockone.io/article/950 概述本文主要讲述如何在Ubuntu系统上安装kubernetes,网络上也有许多相关的文章,感觉都不是很清晰,这里我将自己的安装实践给大 ...

  3. Visual Studio:error MSB8020

    状况如下: error MSB8020: The builds tools for v120 (Platform Toolset = 'v120') cannot be found. To build ...

  4. 如何使用微信JS-SDK实际分享功能

    http://jingyan.baidu.com/album/d3b74d64c517051f77e609ed.html?picindex=7

  5. 李洪强iOS开发之Block和协议

    李洪强iOS开发之Block和协议 OC语言BLOCK和协议 一.BOLCK (一)简介 BLOCK是什么?苹果推荐的类型,效率高,在运行中保存代码.用来封装和保存代码,有点像函数,BLOCK可以在任 ...

  6. Python 切片那些事

  7. Django接受ajax传过来的数组

    $.ajax({ cache: false, type: "POST", url: "/userdelete/", traditional:true, //加上 ...

  8. 浅析StackTrace

    我们在学习函数调用时,都知道每个函数都拥有自己的栈空间.一个函数被调用时,就创建一个新的栈空间.那么通过函数的嵌套调用最后就形成了一个函数调用堆栈.在c#中,使用StackTrace记录这个堆栈.你可 ...

  9. 幸好会java

    转做android的可能性又往前增加了一分.

  10. No output operations registered, so nothing to execute

    SparkStreaming和KafKa结合报错!报错之前代码如下: object KafkaWordCount{ val updateFunc = (iter:Iterator[(String,Se ...