List
@objc(SBUOpenChannelModuleList)
@objcMembers
open class List : SBUBaseChannelModule.List
A module component that represent the list of SBUOpenChannelModule
.
-
The message cell for
SBDAdminMessage
object. Useregister(adminMessageCell:nib:)
to update.Declaration
Swift
public var adminMessageCell: SBUOpenChannelBaseMessageCell?
-
The message cell for
SBDUserMessage
object. Useregister(userMessageCell:nib:)
to update.Declaration
Swift
public var userMessageCell: SBUOpenChannelBaseMessageCell?
-
The message cell for
SBDFileMessage
object. Useregister(fileMessageCell:nib:)
to update.Declaration
Swift
public var fileMessageCell: SBUOpenChannelBaseMessageCell?
-
The message cell for some unknown message which is not a type of
SBDAdminMessage
|SBDUserMessage
|SBDFileMessage
. Useregister(unknownMessageCell:nib:)
to update.Declaration
Swift
public var unknownMessageCell: SBUOpenChannelBaseMessageCell?
-
The custom message cell for some
SBDBaseMessage
. Useregister(customMessageCell:nib:)
to update.Declaration
Swift
public var customMessageCell: SBUOpenChannelBaseMessageCell?
-
The object that acts as the delegate of the list component. The delegate must adopt the
SBUOpenChannelModuleListDelegate
.Declaration
Swift
public weak var delegate: SBUOpenChannelModuleListDelegate? { get set }
-
The object that acts as the data source of the list component. The data source must adopt the
SBUOpenChannelModuleListDataSource
.Declaration
Swift
public weak var dataSource: SBUOpenChannelModuleListDataSource? { get set }
-
The current open channel object casted from
baseChannel
Declaration
Swift
public var channel: SBDOpenChannel? { get }
-
The boolean value that indicates overlaying state of the list component. The value is returned by
openChannelModuleIsOverlaid(_:)
Declaration
Swift
public var isOverlaid: Bool { get }
-
Configures component with parameters.
Declaration
Swift
open func configure( delegate: SBUOpenChannelModuleListDelegate, dataSource: SBUOpenChannelModuleListDataSource, theme: SBUChannelTheme )
Parameters
delegate
SBUOpenChannelModuleListDelegate
type listener.dataSource
The data source that is type of
SBUOpenChannelModuleListDataSource
theme
SBUChannelTheme
object -
Declaration
Swift
open override func setupViews()
-
Declaration
Swift
open override func setupLayouts()
-
Updates layouts of the views in the list component.
Declaration
Swift
open func updateLayouts()
-
Updates styles of the views in the list component with the
theme
.Declaration
Swift
open override func updateStyles(theme: SBUChannelTheme? = nil, componentTheme: SBUComponentTheme = SBUTheme.componentTheme)
Parameters
theme
The object that is used as the theme of the list component. The theme must adopt the
SBUChannelTheme
class. The default value isnil
to use the stored value.componentTheme
The object that is used as the theme of some UI component in the list component such as
scrollBottomView
. The theme must adopt theSBUComponentTheme
class. The default value isSBUTheme.componentTheme
-
Declaration
Swift
open override func setScrollBottomView(hidden: Bool)
-
Declaration
Swift
open override func scrollViewDidScroll(_ scrollView: UIScrollView)
-
Registers a custom cell as a admin message cell based on
SBUOpenChannelBaseMessageCell
.Declaration
Swift
open func register(adminMessageCell: SBUOpenChannelBaseMessageCell, nib: UINib? = nil)
Parameters
adminMessageCell
Customized admin message cell
nib
nib information. If the value is nil, the nib file is not used.
-
Registers a custom cell as a user message cell based on
SBUOpenChannelBaseMessageCell
.Declaration
Swift
open func register(userMessageCell: SBUOpenChannelBaseMessageCell, nib: UINib? = nil)
Parameters
userMessageCell
Customized user message cell
nib
nib information. If the value is nil, the nib file is not used.
-
Registers a custom cell as a file message cell based on
SBUOpenChannelBaseMessageCell
.Declaration
Swift
open func register(fileMessageCell: SBUOpenChannelBaseMessageCell, nib: UINib? = nil)
Parameters
fileMessageCell
Customized file message cell
nib
nib information. If the value is nil, the nib file is not used.
-
Registers a custom cell as a unknown message cell based on
SBUOpenChannelBaseMessageCell
.Declaration
Swift
open func register(unknownMessageCell: SBUOpenChannelBaseMessageCell, nib: UINib? = nil)
Parameters
unknownMessageCell
Customized unknown message cell
nib
nib information. If the value is nil, the nib file is not used.
-
Registers a custom cell as a additional message cell based on
SBUOpenChannelBaseMessageCell
.Declaration
Swift
open func register(customMessageCell: SBUOpenChannelBaseMessageCell, nib: UINib? = nil)
Parameters
customMessageCell
Customized message cell
nib
nib information. If the value is nil, the nib file is not used.
-
Calculates the point at which to draw the menu.
Declaration
Swift
public func calculatorMenuPoint(indexPath: IndexPath) -> CGPoint
Parameters
indexPath
The index path of the selected message cell
Return Value
CGPoint
value
-
Sets gestures in message cell.
Declaration
Swift
open func setMessageCellGestures(_ cell: SBUOpenChannelBaseMessageCell, message: SBDBaseMessage, indexPath: IndexPath)
Parameters
cell
The message cell
message
message object
indexPath
Cell’s indexPath
-
Undocumented
Declaration
Swift
open override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell
-
Configures cell with message for a particular row.
Declaration
Swift
open func configureCell(_ messageCell: SBUOpenChannelBaseMessageCell, message: SBDBaseMessage, forRowAt indexPath: IndexPath)
Parameters
messageCell
SBUOpenChannelBaseMessageCell
object.message
The message for
messageCell
.indexPath
An index path representing the
messageCell
-
Register the message cell to the table view.
Declaration
Swift
public func register(messageCell: SBUOpenChannelBaseMessageCell, nib: UINib? = nil)
-
Generates identifier of message cell.
Declaration
Swift
open func generateCellIdentifier(by message: SBDBaseMessage) -> String
Parameters
message
Message object
Return Value
The identifier of message cell.
-
Gets the position of the message to be grouped for open channel.
Only successful messages can be grouped.
Declaration
Swift
public func getMessageGroupingPosition(currentIndex: Int) -> MessageGroupPosition
Parameters
currentIndex
Index of current message in the message list
Return Value
Position of a message when grouped