Skip to main content

Customization

Styles#

MeetingLawyers UI styles can be customized calling MeetingLawyersApp.setStyle() always after configuring the sdk.

Properties#

// Style
/// Primary color, used by default in all elements that can be tinted within the application.
static func setStyle(primaryColor: UIColor)
/// Darker primary color. Null value or not set -> `colorPrimary`
static func setStyle(secondaryColor: UIColor)
/// Color used to tint navigation elements. Null value or not set -> `colorPrimary`
static func setStyle(navigationColor: UIColor)
/// Set navigation bar title view
static func setStyle(navigationTitleView: UIView)
/// Set navigation left bar buttons
static func setStyle(navigationLeftBarButtons: [UIBarButtonItem])
/// Set navigation right bar buttons
static func setStyle(navigationRightBarButtons: [UIBarButtonItem])
/// Set video call color
static func setStyle(videoCallColor: UIColor)
/// Set chat background view on chat view controller
static func setStyle(chatBackgroundView: UIView?)
/// Color used in the divider background (free or trial users). Null value or not set -> `colorPrimary`
static func setStyle(dividerColor: UIColor)
/// Color used inside chat messaging as incomming bubble. Null value or not set -> `#E0E0E0`
static func setStyle(incomingBubbleColor: UIColor)
/// Color used inside chat messaging as incomming bubble. Null value or not set -> `colorPrimary`
static func setStyle(outgoingBubbleColor: UIColor)
/// Set top divider in professional list
static var topDivider: MLDividerType? { get set }
/// Set mid divider in professional list
static var divider: MLDividerType? { get set }

Example:

MeetingLawyersApp.setStyle(primaryColor: .green)

Divider configuration#

Using MLDivider generic builder we can configure a divider view group style and behavior.

Take for instance a DividerContentView which is a custom view we want to inject inside a divider cell. We would configure a style divider like this:

Divider#

import MeetingLawyers
MeetingLawyersApp.divider = MLDivider<DividerContentView>(view: divider)
.add(configuration: { (cell, view) -> Void in
view.button.setTitle("I'm interested", for: .normal)
view.label.text = "Lorem ipsum dolor sit amet, consectetur adipiscing elit."
})
.add(selector: { (speciality, authorized) -> Bool in
NSLog("[LaunchScreenViewController] Inbox item '\(String(describing: speciality))' selected and authorized '\(authorized)'")
return true
})
note

As of SDK version 0.2.7 and earlier, the class previously known as MediQuoDivider has been renamed to MLDivider. This update requires users of these versions to adjust their code to reference the new class name. Note that this change is strictly a renaming; the functionality and interfaces of the class remain unchanged.