0
我有一個使用故事板在Xcode 4.2.1中構建的TabBar應用程序。問題是UITableView沒有反映我在IB中做出的更改。例如:當我使用IB對背景顏色,滾動條可見性,分隔符顏色進行更改時,UITableView沒有可見的效果。UITableView PARAM不從IB繼承
但是,如果我以編程方式設置這些參數,它們工作得很好。我錯過了什麼?一些代碼如下:
- (void)viewDidLoad
{
[super viewDidLoad];
// get a pointer to our delegate. This is where the data will be stored
// which gets passed between the Views (e.g. Favorites)
appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
myTableView = [[UITableView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame] style:UITableViewStylePlain];
myTableView.dataSource = self;
myTableView.delegate = self;
// myTableView.backgroundColor=[UIColor blackColor];
// this will suppress the separator lines between empty rows.
UIView *view = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 1, 1)];
myTableView.tableFooterView = view;
self.view = myTableView;
}