我在项目中使用了Storyboard。
如果我使用 h.-File
我的代码将:
IImage * backgroundImage = [UIImage imageNamed:@"bg_image.png"];
UIImageView * backgroundView = [[UIImageView alloc] initWithImage:backgroundImage];
self.tableView.backgroundColor = [UIColor clearColor];
self.tableView.backgroundView = backgroundView;
self.tableView.separatorColor = [UIColor colorWithRed:0 green:0 blue:0 alpha:0.2];
有没有办法在Interface Builder中进行这些自定义?
我猜不是。
所以我的第二个问题是,如果我使用代码,我如何保留我在Interface Builder中制作的Static cells
和navigation segues
?只是省略委托方法将是无稽之谈。
我可以将所有东西放在一起吗?静态单元格,导航段和自定义背景?
谢谢!
答案 0 :(得分:0)
- (无效)CREATETABLE {
myTableView = [[UITableView alloc] initWithFrame:CGRectMake(0,132,320,350)样式:UITableViewStylePlain];
myTableView.delegate=self;
myTableView.dataSource=self;
myTableView.backgroundColor=[UIColor clearColor];
myTableView.separatorColor=[UIColor clearColor];
myTableView.tag=2;
[self.view addSubview:myTableView];
[myTableView release];
} 现在只需通过[self createTable]调用此方法;