 import UIKit
 import YYText
 
-class TopicDetailCommentCell: UITableViewCell ,V2CommentAttachmentImageTapDelegate , V2PhotoBrowserDelegate{
+class TopicDetailCommentCell: UITableViewCell{
     /// 头像
     var avatarImageView: UIImageView?
     /// 用户名

        self.avatarImageView!.addGestureRecognizer(userNameTap)
        userNameTap = UITapGestureRecognizer(target: self, action: #selector(TopicDetailCommentCell.userNameTap(_:)))
        self.userNameLabel!.addGestureRecognizer(userNameTap)
    }
    func userNameTap(sender:UITapGestureRecognizer) {
        if let _ = self.itemModel , username = itemModel?.userName {

        
        self.itemModel = model
    }
}

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