IOS7技巧
2013-10-24 17:33
288 查看
IOS7和以前的版本在UI方面做了很大的改动。同样的软件,在新的IOS版本中,UI会随系统有些不同。有时甚至会达到让人无法忍受的地步。
1。以前的UITableView自身设为透明背景,窗口是一张蓝色图片背景,文字设置白色,在新版本中,UITableView获得了一个默认的白色背景,导致很多UI的白字体无法显示:
UIView *tempView = [[UIView alloc] init]; [cell setBackgroundView:tempView]; [cell setBackgroundColor:[UIColor clearColor]];
2。状态栏显示不正常 屏蔽状态栏 :
在iOS7之前,我们可以这样干:[[UIApplication sharedApplication] setStatusBarHidden:YES];但是现在无效了,怎么解?Google了一下,这么干:在app的plist文件中,添加两个BOOL属性:UIStatusBarHidden设置为YES和UIViewControllerBasedStatusBarAppearance设置为NO3.UITableView顶部有一段空白self.tableView=[[UITableView alloc]initWithFrame:CGRectMake(0,50,320,400) style:UITableViewStylePlain];
self.edgesForExtendedLayout = UIRectEdgeNone。
4.圆角 self.table.layer.masksToBounds = YES; self.table.layer.cornerRadius = 6.0; self.table.layer.borderWidth = 1.0; self.table.layer.borderColor = [[UIColor grayColor] CGColor];
1。以前的UITableView自身设为透明背景,窗口是一张蓝色图片背景,文字设置白色,在新版本中,UITableView获得了一个默认的白色背景,导致很多UI的白字体无法显示:
UIView *tempView = [[UIView alloc] init]; [cell setBackgroundView:tempView]; [cell setBackgroundColor:[UIColor clearColor]];
2。状态栏显示不正常 屏蔽状态栏 :
在iOS7之前,我们可以这样干:[[UIApplication sharedApplication] setStatusBarHidden:YES];但是现在无效了,怎么解?Google了一下,这么干:在app的plist文件中,添加两个BOOL属性:UIStatusBarHidden设置为YES和UIViewControllerBasedStatusBarAppearance设置为NO3.UITableView顶部有一段空白self.tableView=[[UITableView alloc]initWithFrame:CGRectMake(0,50,320,400) style:UITableViewStylePlain];
self.edgesForExtendedLayout = UIRectEdgeNone。
4.圆角 self.table.layer.masksToBounds = YES; self.table.layer.cornerRadius = 6.0; self.table.layer.borderWidth = 1.0; self.table.layer.borderColor = [[UIColor grayColor] CGColor];
相关文章推荐
- ios7下tableview的背景色问题
- IOS中图片作为button的背景图拉伸
- iOS 多线程初步研究-NSOperation
- ios 一行中的文字显示多种颜色
- iOS应用的真机调试
- iOS7开发注意事项
- iOS 关于图片处理的一些方法。。。
- iOS 合并使用多个Storyboard
- iOS 博客资源精选
- 如何在iOS 7中设置barTintColor实现类似网易和 Facebook 的 navigationBar 效果
- NSTimer的用法
- 获取IOS设备类型名
- <iOS>other linker flags
- iOS 多线程初步研究-NSURLConnection在子线程中运行
- 如何使用iOS 开发证书 和 Profile 文件
- iOS 语言本地化
- iOS core image
- iOS CrashReport分析
- iOS视图控制对象生命周期
- iOS GameCenter