             // 刚刚输入 @
 
             if text.hasSuffix("@") {
-                mentionUsernameRange = Range<String.Index>(start: text.endIndex.advancedBy(-1), end: text.endIndex)
+                mentionUsernameRange = text.endIndex.advancedBy(-1)..<text.endIndex
                 initMentionUserAction?()
                 return
             }

        button.tintColor = UIColor.messageToolBarHighlightColor()
        button.tintAdjustmentMode = .Normal
        button.setTitleColor(UIColor.messageToolBarHighlightColor(), forState: .Normal)
        button.addTarget(self, action: "trySendTextMessage", forControlEvents: UIControlEvents.TouchUpInside)
        return button
    }()


        button.setImage(UIImage(named: "item_more"), forState: .Normal)
        button.tintColor = UIColor.messageToolBarColor()
        button.tintAdjustmentMode = .Normal
        button.addTarget(self, action: #selector(moreMessageTypes), forControlEvents: UIControlEvents.TouchUpInside)
        return button
    }()

