首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 移动开发 > 移动开发 >

怎么为Grouped UITableView增加一个好看的背景颜色

2012-07-23 
怎样为Grouped UITableView增加一个好看的背景颜色UIView *backgroundView [[UIView alloc] initWithFra

怎样为Grouped UITableView增加一个好看的背景颜色
UIView *backgroundView = [[UIView alloc] initWithFrame: window.frame]; 
backgroundView.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"TableViewBackground.png"]]; 
[window addSubview:backgroundView]; 
[backgroundView release]; 
 
yourTableViewController = [[ATableViewController alloc] initWithStyle:UITableViewStyleGrouped]; 
yourTableViewController.view.backgroundColor = [UIColor clearColor]; 
[window addSubview:yourTableViewController.view]; 
 
[window makeKeyAndVisible]; 

热点排行