iOS: fix tableview height cannot fit the screen

This commit is contained in:
pengfei.zhou 2021-09-03 16:10:06 +08:00 committed by osborn
parent b3a6321dcc
commit c2b07e4a20

View File

@ -39,6 +39,14 @@ - (void)viewDidLoad {
}];
[tmp insertObject:@"Dev Kit" atIndex:0];
self.demoFilePaths = tmp;
[Doric registerLibrary:[DemoLibrary new]];
[Doric enablePerformance:YES];
[Doric enableRenderSnapshot:YES];
}
- (void)viewDidAppear:(BOOL)animated {
[super viewDidAppear:animated];
[self.view addSubview:[[UITableView new] also:^(UITableView *it) {
it.width = self.view.width;
it.height = self.view.height;
@ -46,9 +54,6 @@ - (void)viewDidLoad {
it.dataSource = self;
it.delegate = self;
}]];
[Doric registerLibrary:[DemoLibrary new]];
[Doric enablePerformance:YES];
[Doric enableRenderSnapshot:YES];
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {