chat-channel-list-vc-properties
content
public var content: ChatChannelListController
controller
The ChatChannelListController
instance that provides channels data.
public var controller: ChatChannelListController!
loadingIndicator
open private(set) lazy var loadingIndicator: UIActivityIndicatorView
router
A router object responsible for handling navigation actions of this view controller.
open lazy var router: ChatChannelListRouter
collectionViewLayout
The UICollectionViewLayout
that used by ChatChannelListCollectionView
.
open private(set) lazy var collectionViewLayout: UICollectionViewLayout
collectionView
The UICollectionView
instance that displays channel list.
open private(set) lazy var collectionView: UICollectionView =
UICollectionView(frame: .zero, collectionViewLayout: collectionViewLayout)
.withoutAutoresizingMaskConstraints
userAvatarView
The CurrentChatUserAvatarView
instance used for displaying avatar of the current user.
open private(set) lazy var userAvatarView: CurrentChatUserAvatarView = components
.currentUserAvatarView.init()
.withoutAutoresizingMaskConstraints
separatorReuseIdentifier
Reuse identifier of separator
open var separatorReuseIdentifier: String
collectionViewCellReuseIdentifier
Reuse identifier of collectionViewCell
open var collectionViewCellReuseIdentifier: String
Methods
setUp()
override open func setUp()
collectionView(_:willDisplay:forItemAt:)
open func collectionView(
_ collectionView: UICollectionView,
willDisplay cell: UICollectionViewCell,
forItemAt indexPath: IndexPath
)
setUpLayout()
override open func setUpLayout()
setUpAppearance()
override open func setUpAppearance()
collectionView(_:numberOfItemsInSection:)
open func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int
collectionView(_:cellForItemAt:)
open func collectionView(
_ collectionView: UICollectionView,
cellForItemAt indexPath: IndexPath
) -> UICollectionViewCell
collectionView(_:viewForSupplementaryElementOfKind:at:)
open func collectionView(
_ collectionView: UICollectionView,
viewForSupplementaryElementOfKind kind: String,
at indexPath: IndexPath
) -> UICollectionReusableView
collectionView(_:didSelectItemAt:)
open func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath)
didTapOnCurrentUserAvatar(_:)
@objc open func didTapOnCurrentUserAvatar(_ sender: Any)
traitCollectionDidChange(_:)
override open func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?)
loadMoreChannels()
open func loadMoreChannels()
swipeableViewWillShowActionViews(for:)
open func swipeableViewWillShowActionViews(for indexPath: IndexPath)
swipeableViewActionViews(for:)
open func swipeableViewActionViews(for indexPath: IndexPath) -> [UIView]
deleteButtonPressedForCell(at:)
This function is called when delete button is pressed from action items of a cell.
open func deleteButtonPressedForCell(at indexPath: IndexPath)
Parameters
indexPath
: IndexPath of given cell to fetch the content of it.
moreButtonPressedForCell(at:)
This function is called when more button is pressed from action items of a cell.
open func moreButtonPressedForCell(at indexPath: IndexPath)
Parameters
indexPath
: IndexPath of given cell to fetch the content of it.
controllerWillChangeChannels(_:)
open func controllerWillChangeChannels(_ controller: ChatChannelListController)
controller(_:didChangeChannels:)
open func controller(
_ controller: ChatChannelListController,
didChangeChannels changes: [ListChange<ChatChannel>]
)
controller(_:didChangeState:)
open func controller(_ controller: DataController, didChangeState state: DataController.State)