最近做了一个评论列表,评论下有回复,所以就尝试使用一下tableview 嵌套tableview 。
当一切就绪,内层tableview显示了,但没有回复没有展示。
Simulator Screen Shot - iPhone 8 - 2020-07-18 at 19.21.43.png
debug一看内层tableview的一些代理方法没有执行。
已执行的方法
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
不执行的方法
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
仔细检查了一下,和平时的用法一样,该设置的都设置了,各种百度,各大神解说是tableview的宽高设置的太小了也不会执行。
来一个不计算的随便写一个高100,果不其然展示了。
Simulator Screen Shot - iPhone 8 - 2020-07-18 at 19.28.11.png
记录到此结束













网友评论