Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我按照Apple 教程使用表格制作了一个简单的应用程序(如下图所示)。
红色区域高度为 8 点。为什么触摸红色区域没有选择第一行(“买牛奶”)?
是预期的还是错误的?怎么修?
您可以为 UITableView 标题部分的每个单元格返回。你能显示这个方法的实现吗?
-(UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section
它不是 TableView Cell 的区域,这就是它没有检测到它的原因。可以通过给tableview的单元格分配背景色来测试,然后看看tableview的面积是多少