您的位置:首页 > 移动开发 > IOS开发

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];
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: