Customize Navigation Bar
When TapTalk.io framework is integrated to your app with the UI/combine implementation method, you can customize chat room's navigation bar layout to your preferences.
Customize Chat Room Navigation Bar
You can follow the steps below to customize chat rooms' navigation bar layout in your app.
1. Create your custom navigation bar manager class
Create a new file inside your project folder, and set it as a subclass of TapBaseChatRoomCustomNavigationBarManager.
The .h file will look like this.
TapBaseChatRoomCustomNavigationBarManager is a helper singleton class to make implementing custom navigation bar easier.
2. Implement callbacks from base navigation manager class to update UI
TapBaseChatRoomCustomNavigationBarManager class implements TapUIChatRoomCustomNavigationBarDelegate, TapUIChatRoomDelegate, and TAPCoreChatRoomManagerDelegate to listen to chat room related callbacks from PowerTalk SDK.
The class will then handle and redirect the callbacks to the following functions, which provide the required data that you can make use of for your own custom navbar class to display and update UI elements in the custom navigation bar.
You can override the callbacks from TapUIChatRoomCustomNavigationBarDelegate and TapBaseChatRoomCustomNavigationBarManager in your .m class:
3. Make use of base navigation bar manager properties
TapBaseChatRoomCustomNavigationBarManager also provides some properties that you can make use of to display UI elements in your custom navbar class.
You can call any of these properties provided below to help displaying your custom navbar.
The values of the properties above will also be updated when any related callbacks from PowerTalk SDK is received.
4. Dispatch your custom navigation bar manager
After you finished setting up your custom-made navigation bar, you will need to dispatch your custom navigation bar manager after you have initialized TapTalk. Check the example below:
Last updated
Was this helpful?