4
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)
}
为什么自定义标签或自定义按钮不能拨打accessoryButtonTappedForRowWithIndexPath
。或者只有一种方法将myButton添加到单元格?accessoryButtonTappedForRowWithIndexPath不适用于自定义按钮或标签
可以请你分享提及不与自定义按钮的工作一份文件。因为这里说http://stackoverflow.com/questions/12296904/accessorybuttontappedforrowwithindexpath-not-getting-called –
检查更新的答案 – techloverr
感谢您的信息。 :) –