[英]accessoryButtonTappedForRowWithIndexPath not working for custom button or label
override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
let key = keyArray[indexPath.section-1]
let label = UILabel(frame: CGRectMake(0, 0, 26, 28))
label.center = CGPointMake(26, 28)
cell.accessoryView = label
}
override func tableView(tableView: UITableView, accessoryButtonTappedForRowWithIndexPath indexPath: NSIndexPath) {
print(indexPath)
}
Why for custom label or custom button not call accessoryButtonTappedForRowWithIndexPath
. 为什么自定义标签或自定义按钮不能调用
accessoryButtonTappedForRowWithIndexPath
。 Or only one way add myButton to cell ? 或者只有一种方法将myButton添加到单元格?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.