Customizing the User Interface
Override a view controller
To override a view controller you need to do the following:
Create a subclass of the class you want to override. For example, if you wanted to override the
BLoginViewController
you would make a subclass:Register your subclass with the Chat SDK. After you have initialized the Chat SDK in your app delegate, add the following:
Now the Chat SDK will load your view controller rather than the standard one.
Overriding using a provider
In some cases, it's necessary for the view controller to be given a parameter when it's created. An example of this is with the chat view controller which needs to be given the thread to load. In this case, rather than registering the view controller directly, we register a provider.
Create a subclass of the class you want to override. For example, if you wanted to override the
BChatViewController
you would make a subclass:Register your provider with the Chat SDK. After you have initialized the Chat SDK in your app delegate, add the following:
Now the Chat SDK will load your view controller rather than the standard one.
Last updated