         tableView.delegate = self
         tableView.dataSource = self
         tableView.registerNib(UINib(nibName: "MentionTableViewCell", bundle: NSBundle(forClass: MentionTableViewCell.self)), forCellReuseIdentifier: MentionCellIdentifier)
+        refreshTableView()
         NSNotificationCenter.defaultCenter().addObserver(self, selector: "textChanged", name: UITextFieldTextDidChangeNotification, object: view)
         NSNotificationCenter.defaultCenter().addObserver(self, selector: "textChanged", name: UITextViewTextDidChangeNotification, object: view)
     }


        // Check for a mention query
        if let query = mentionQuery(fromString: text) {
            delegate?.usersMatchingQuery(query as String) { [weak self] (users) -> Void in
                if let users = users {
                    self?.userNameMatches = users
                    self?.refreshTableView()
                }
            }
        }
        else {
            userNameMatches.removeAll()
            refreshTableView()
        }


    private func refreshTableView() {
        tableView?.reloadData()
        tableView?.hidden = !requestingMentionUsers && userNameMatches.count == 0
    }

    func textChanged() {
