简体   繁体   English

我发现桌面视图无法在iOS 11中滚动

[英]I find a tableview cannot scroll in iOS 11

I found my UITableView can't scroll in iOS 11, so I did some tests in the "cell for row" delegate method: 我发现我的UITableView无法在iOS 11中滚动,所以我在“cell for row”委托方法中做了一些测试:

  • when I set the cell.userInteractionEnabled to NO , scrolling works 当我将cell.userInteractionEnabled设置为NO ,滚动工作
  • When I set the cell.contentView.userInteractionEnabled to NO , it doesn't 当我将cell.contentView.userInteractionEnabled设置为NO ,它不会

My custom view is in cell.contentView , so I don't know how to fix it... 我的自定义视图在cell.contentView ,所以我不知道如何解决它...

I find the solution: 我找到了解决方案:

    self.tableView.delaysContentTouches = YES;

when I change it to YES, tableView can work like before 当我将其更改为YES时,tableView可以像以前一样工作

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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