ShortCutFormatter
class by extending the CometChatTextFormatter
class.trackingCharacter
to ’!’ in the initializer of the ShortcutFormatter
classgetRegex()
method of ShortcutFormatter
class.getTrackingCharacter()
method to return ’!’ as the shortcut tracking character in ShortcutFormatter
class.search()
method to search for shortcuts based on the entered query.prepareMessageString()
method to convert the base chat message into an attributed string for display in the ShortcutFormatter
class.onTextTapped()
method if needed.ShortcutFormatter
Swift file might look:ShortCutFormatter
in your application.ShortCutFormatter
into your CometChat application involves incorporating it within your project to handle message shortcuts. If you’re utilizing the CometChatConversationsWithMessages component, you can seamlessly integrate the ShortCutFormatter to manage shortcut functionalities within your application.cometChatConversationsWithMessages
. If a navigation controller is already in use, utilize the pushViewController function instead of directly presenting the view controller.