You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I know that a similar issue has been raised #7 but it has highlighted a different problem that I am experiencing. When completing it with the prefix "#" the table appears but is blank.
here are the concerned chunk of code :
class types:
class Chat:MessagesViewController, MessagesDataSource, MessagesLayoutDelegate, MessagesDisplayDelegate,InputBarAccessoryViewDelegate,AutocompleteManagerDataSource, AutocompleteManagerDelegate
autocomplete variable:
open lazy var autocompleteManager: AutocompleteManager = { [unowned self] in
let manager = AutocompleteManager(for: self.messageInputBar.inputTextView)
manager.delegate = self
manager.dataSource = self
return manager
}()
Hello, I know that a similar issue has been raised #7 but it has highlighted a different problem that I am experiencing. When completing it with the prefix "#" the table appears but is blank.

here are the concerned chunk of code :
class types:
class Chat:MessagesViewController, MessagesDataSource, MessagesLayoutDelegate, MessagesDisplayDelegate,InputBarAccessoryViewDelegate,AutocompleteManagerDataSource, AutocompleteManagerDelegate
autocomplete variable:
viewdidload for autocomplete:
Here are the different methods for autocomplete, all of them are called and we can see what is printed except for one which i guess is the issue:
CALLED:
func autocompleteManager(_ manager: AutocompleteManager, shouldRegister prefix: String, at range: NSRange) -> Bool {
return true
}
func autocompleteManager(_ manager: AutocompleteManager, tableView: UITableView, cellForRowAt indexPath: IndexPath, for session: AutocompleteSession) -> UITableViewCell {
guard let cell = tableView.dequeueReusableCell(withIdentifier: AutocompleteCell.reuseIdentifier, for: indexPath) as? AutocompleteCell else {
fatalError("None ")
}
let users = Users
let name = session.completion?.text ?? ""
let user = users.filter { return $0.displayName == name }.first
cell.imageView?.image = UIImage(named: "art.scnassets/imp.png")
cell.textLabel?.attributedText = manager.attributedText(matching: session, fontSize: 15)
return cell
}
The text was updated successfully, but these errors were encountered: