前端之家收集整理的这篇文章主要介绍了
swift UITableViewCell拷贝,
前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
func tableView(tableView@H_403_3@: UITableView,performAction action@H_403_3@: Selector,forRowAtIndexPath indexPath@H_403_3@: NSIndexPath,withSender sender@H_403_3@: AnyObject?) {
if@H_403_3@ action == Selector("copy:"@H_403_3@) {
if@H_403_3@ let@H_403_3@ cell = tableView.cellForRowAtIndexPath(indexPath) as? JokeViewCell {
UIPasteboard.generalPasteboard().string = cell.contentLabel.text
}
}
}
func tableView(tableView: UITableView,canPerformAction action: Selector,forRowAtIndexPath indexPath: NSIndexPath,withSender sender: AnyObject?)@H_403_3@ ->@H_403_3@ Bool {
return@H_403_3@ action == Selector("copy:"@H_403_3@)
}
func tableView(tableView: UITableView,shouldShowMenuForRowAtIndexPath indexPath: NSIndexPath)@H_403_3@ ->@H_403_3@ Bool {
return@H_403_3@ true@H_403_3@
}