adding a UITableView programmatically to a UIViewController

前端 未结 5 1323
栀梦
栀梦 2021-02-02 17:37

I\'m loading a UIViewController into one of my Nav controller\'s hierarchies, which will contain some text and some images. At the bottom, I will want to create a expandable and

5条回答
  •  春和景丽
    2021-02-02 18:06

    It's pretty easy, in something like your viewDidLoad method:

    UITableView *tableView = [[UITableView alloc] initWithFrame:self.view.bounds];
    [self.view addSubview:tableView];
    

提交回复
热议问题