-(void)loadView
{
UIView *contentView = [[UIView alloc] initWithFrame:[UIScreen mainScreen].applicationFrame];
self.view = contentView;
[contentView release];
UITableView *tableView = [ [ UITableView alloc] initWithFrame:self.view.frame style:UITableViewStyleGrouped ];
self.tableView = tableView;
[tableView release];
self.title = _(P_FIREWALL);
self.tableView.delegate = self;
self.tableView.dataSource = self;
}
CGRect appFrame = [[UIScreen mainScreen] applicationFrame];
appFrame = CGRectMake(0.0f, 0.0f, CGRectGetMaxX(appFrame), CGRectGetMaxY(appFrame));
本文介绍了一个iOS应用初始化过程中的关键步骤,包括加载视图、设置UITableView,并对其delegate和dataSource进行配置。通过具体代码展示了如何创建并布局UITableView,以及如何设置应用的标题。
2256





