我正在尝试通过以下代码将子视图添加到UITableViewController
的视图
//In a UITableViewController Implementation file
self.loadingPageView = [[[UIView alloc]initWithFrame:[UIScreen mainScreen].applicationFrame] autorelease];
self.loadingPageView.frame = self.view.bounds;
self.loadingPageView.backgroundColor = [UIColor darkGrayColor];
[self.view addSubview:loadingPageView];
运行后,我得到以下显示
在将UIView
添加为子视图后,有没有办法完全隐藏表格视图?
答案 0 :(得分:1)
我不确定你是否可以在tableViewController的视图中添加内容。 我会将tableViewController.tableView和loadingPageView添加到一个superview。