     }
 }
 
-
+//MARK: - 长按复制功能
+extension TopicDetailCommentCell {
+    func longPressHandle(longPress:UILongPressGestureRecognizer) -> Void {
+        if (longPress.state == .Began) {
+            self.becomeFirstResponder()
+            
+            let item = UIMenuItem(title: "复制", action: #selector(TopicDetailCommentCell.copyText))
+            
+            let menuController = UIMenuController.sharedMenuController()
+            menuController.menuItems = [item]
+            menuController.arrowDirection = .Down
+            menuController.setTargetRect(self.frame, inView: self.superview!)
+            menuController.setMenuVisible(true, animated: true);
+        }
+        
+    }
+    override func canPerformAction(action: Selector, withSender sender: AnyObject?) -> Bool {
+        if (action == #selector(TopicDetailCommentCell.copyText)){
+            return true
+        }
+        return super.canPerformAction(action, withSender: sender);
+    }
+    override func canBecomeFirstResponder() -> Bool {
+        return true
+    }
+    
+    func copyText() -> Void {
+        UIPasteboard.generalPasteboard().string = self.itemModel?.textLayout?.text.string
+    }
+}

        
        self.itemModel = model
    }
    
    /**
     点击图片
     */
    func V2CommentAttachmentImageSingleTap(imageView: V2CommentAttachmentImage) {
        let photoBrowser = V2PhotoBrowser(delegate: self)
        photoBrowser.currentPageIndex = imageView.index
        V2Client.sharedInstance.topNavigationController.presentViewController(photoBrowser, animated: true, completion: nil)
    }
    
    //MARK V2PhotoBrowser Delegate
    func numberOfPhotosInPhotoBrowser(photoBrowser: V2PhotoBrowser) -> Int {
        return self.itemModel!.images.count
    }

import UIKit
import YYText

class TopicDetailCommentCell: UITableViewCell{
    /// 头像
    var avatarImageView: UIImageView?
    /// 用户名
