-
ALKConfiguration.conversationViewCustomCellTextColor
, has been deprecated. Use styleALKMessageStyle.infoMessage
orALKMessageStyle.dateSeparator
. -
ALKConfiguration.conversationViewCustomCellBackgroundColor
, has been deprecated. Use styleALKMessageStyle.infoMessage
orALKMessageStyle.dateSeparator
.
Use below config for changing the style for date cell or channel info messages.
For example to change the style in date separator you can config as below:
ALKMessageStyle.dateSeparator = Style(font: UIFont.systemFont(ofSize: 12), text: UIColor.black, background: .red)
For example to change the style for channel info messages you can config as below:
ALKMessageStyle.infoMessage = Style(font: UIFont.systemFont(ofSize: 12), text: UIColor.black , background: .red)
ALKConfiguration.navigationBarBackgroundColor
, has been deprecated. UseUIAppearance
for navigation bar configuration.ALKConfiguration.navigationBarItemColor
, has been deprecated. UseUIAppearance
for navigation bar configuration.ALKConfiguration.navigationBarTitleColor
, has been deprecated. UseUIAppearance
for navigation bar configuration.
If you are using ALKBaseNavigationViewController
to present the conversation then, you can customize it like this:
// Use `appearance(whenContainedInInstancesOf:)` method to limit the changes to instances of `ALKBaseNavigationViewController`.
let navigationBarProxy = UINavigationBar.appearance(whenContainedInInstancesOf: [ALKBaseNavigationViewController.self])
navigationBarProxy.tintColor = UIColor.blue
navigationBarProxy.barTintColor = UIColor.gray
navigationBarProxy.titleTextAttributes = [NSAttributedString.Key.foregroundColor: UIColor.black] // title color
-
ALKConfiguration.hideContactInChatBar
, has been deprecated. UseALKConfiguration.chatBar.showOptions
to only show some options.config.optionsToShow = .some([.gallery, .location, .camera, .video])
-
ALKConfiguration.hideAllOptionsInChatBar
has been deprecated. UseALKConfiguration.chatBar.showOptions
to hide the all attachment options.configuration.chatBar.optionsToShow = .none
- ConversationList configuration
ALKConfiguration.rightNavBarImageForConversationListView
, has been deprecated. UseALKConfiguration.navigationItemsForConversationList
to add buttons in the navigation bar
// ConversationList
var navigationItemsForConversationList = [ALKNavigationItem]()
// Example for button with text
let buttonOne = ALKNavigationItem(identifier: 1234, text: "FAQ")
// Adding an item in the list
navigationItemsForConversationList.append(buttonOne)
// Example for button with icon
let buttonTwo = ALKNavigationItem(identifier:23456, icon: UIImage(named: "icon_download", in: Bundle(for: ALKConversationListViewController.self), compatibleWith: nil)!)
// Adding an item in the list
navigationItemsForConversationList.append(buttonTwo)
config.navigationItemsForConversationList = navigationItemsForConversationList
// Add an Observer to get the event callback
NotificationCenter.default.addObserver(forName: NSNotification.Name(rawValue: ALKNavigationItem.NSNotificationForConversationListNavigationTap), object: nil, queue: nil, using: { notification in
guard let notificationUserInfo = notification.userInfo else { return }
let identifier = notificationUserInfo["identifier"] as! Int
print("Navigation button click for identifier in ConversationList is : ",identifier)
})
- ConversationView configuration
// ConversationView
var navigationItemsForConversationView = [ALKNavigationItem]()
let buttonOne = ALKNavigationItem(identifier: 1234, text: "FAQ")
// Adding an item in the list
navigationItemsForConversationView.append(buttonOne)
// Example for button with icon
let buttonTwo = ALKNavigationItem(identifier:23456, icon: UIImage(named: "icon_download", in: Bundle(for: ALKConversationListViewController.self), compatibleWith: nil)!)
// Adding an item in the list
navigationItemsForConversationView.append(buttonOne)
config.navigationItemsForConversationView = navigationItemsForConversationView