iosobjective-cquickbloxq-municate

How to customised or else use my own nib for tool bar in ChatViewController using Quickblox?


I want to use a custom tool bar for my chat view controller instead of existing tool bar available in sample-chat-IOS app.

And I don't want to disturb exiting QMToolbarContentView.nib and QMToolbarContentView.h and QMToolbarContentView.m files. Below Image 1 is the existing one. and Image 2 is what I want.

Existing Tool bar

So which is the best to load my own tool bar nib. Is it possible or I should modify the existing one ?

And I found one method but don't know weather this will work ?

    @interface QMInputToolbar : UIToolbar

/**
 *  Loads the content view for the toolbar.
 *
 *  @discussion Override this method to provide a custom content view for the toolbar.
 *
 *  @return An initialized `QMToolbarContentView` if successful, otherwise `nil`.
 */
    - (QMToolbarContentView *)loadToolbarContentView;

My Requirement

I modified actual toolbar to my custom view as shown in the below image..Modified Toolbar

But how to add the another view below it ? (The view in green colour with 3 Labels)


Solution

  • There is a property in QMChatViewController.h file representing toolbar

    The easiest way for you will be to modify the existing xib file and class interface to your like. In order to do it install QMChatViewController as development pod or fork from our QMChatViewController repository.