美文网首页
xcode12 老项目 UITableViewCell 点击事件

xcode12 老项目 UITableViewCell 点击事件

作者: jensen1in | 来源:发表于2021-04-16 15:14 被阅读0次

    通过查看Cell元素、层级元素 发现 UITableCell.ContentView 遮挡导致的

    在老项目中使用了[self   addSubView:  xxx ];导致的, xcode 12 中应该使用 [self.contentView  addSubView : xxx]; 或者 [cell.contentView  addSubview:xxx];可以避免 此类似事件发生

    相关文章

      网友评论

          本文标题:xcode12 老项目 UITableViewCell 点击事件

          本文链接:https://www.haomeiwen.com/subject/ageelltx.html