简体   繁体   中英

UITableView pads touch area

I follow Apple tutorial to make a simple app using table (as in the below image).

The red area height is 8 point. Why is touching the red area does not select first row ("Buy milk")?

Is it expected or is it a bug? How to fix?

图片

It is not TableView Cell's area, that is why it is not detecting it. You can test it by assigning a background color to the cell of tableview, and then see what is the area of tableview

You may return for each cell of UITableView header section. You can show the implementation of this method?

-(UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM