博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
IOS7开发~新UI学起(二)
阅读量:4599 次
发布时间:2019-06-09

本文共 1841 字,大约阅读时间需要 6 分钟。

1、UINavigationBar:

 

 

 

 

 

    NSDictionary* attrs = @{

NSForegroundColorAttributeName: [UIColorblackColor],

                            NSFontAttributeName: [UIFontfontWithName:@"AmericanTypewriter"size:0.0],

                            };

    [[UINavigationBar appearancesetTitleTextAttributes:attrs];

    [[UINavigationBar appearancesetTintColor:[UIColorredColor]];

    

    UINavigationBar *navBar = [[UINavigationBaralloc]init];

    navBar.frame = CGRectMake(0,50,32044);

    

    [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];

 

 

转载于:https://www.cnblogs.com/yingkong1987/p/3343924.html

你可能感兴趣的文章
pythonchallenge闯关 第13题
查看>>
linux上很方便的上传下载文件工具rz和sz使用介绍
查看>>
React之特点及常见用法
查看>>
【WEB前端经验之谈】时间一年半,或沉淀、或从零开始。
查看>>
优云软件助阵GOPS·2017全球运维大会北京站
查看>>
linux 装mysql的方法和步骤
查看>>
poj3667(线段树区间合并&区间查询)
查看>>
51nod1241(连续上升子序列)
查看>>
SqlSerch 查找不到数据
查看>>
集合相关概念
查看>>
Memcache 统计分析!
查看>>
(Python第四天)字符串
查看>>
个人介绍
查看>>
使用python动态特性时,让pycharm自动补全
查看>>
MySQL数据库免安装版配置
查看>>
你必知必会的SQL面试题
查看>>
html5 Canvas绘制时钟以及绘制运动的圆
查看>>
Unity3D热更新之LuaFramework篇[05]--Lua脚本调用c#以及如何在Lua中使用Dotween
查看>>
JavaScript空判断
查看>>
洛谷 P1439 【模板】最长公共子序列(DP,LIS?)
查看>>