您的位置:首页 > 产品设计 > UI/UE

给UITableView增加拷贝

2015-12-10 21:15 411 查看
func tableView(tableView: UITableView, performAction action: Selector, forRowAtIndexPath indexPath: NSIndexPath, withSender sender: AnyObject?) {
if action == Selector("copy:") {
if indexPath.row < Data.sharedManager.goodArticle.contentlist.count {
UIPasteboard.generalPasteboard().string = Data.sharedManager.goodArticle.contentlist[indexPath.row].url
}
}
}

func tableView(tableView: UITableView, canPerformAction action: Selector, forRowAtIndexPath indexPath: NSIndexPath, withSender sender: AnyObject?) -> Bool {
return action == Selector("copy:")
}

func tableView(tableView: UITableView, shouldShowMenuForRowAtIndexPath indexPath: NSIndexPath) -> Bool {
return true
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: