Chat UIKit iOS UIKit v3
Chat UIKit iOS UIKit
Chat UIKit
iOS UIKit
Version 3

Common views

Copy link

The following are views that are commonly used in view controllers across the UIKit for iOS.

SBUAlertView

Copy link

SBUAlertView is an alert view provided by Sendbird UIKit and is displayed using a keyWindow. You have the option to either show or dismiss the alert view and you can also create buttons and set tap events through SBUAlertButtonItem.

let confirmButton = SBUAlertButtonItem(title: {TEXT}) { _ in }
let cancelButton = SBUAlertButtonItem(title: {TEXT}) { _ in }

SBUAlertView.show(title: {ALERT_TITLE},
    confirmButtonItem: confirmButton,
    cancelButtonItem: cancelButton)

SBUAlertView.dismiss()

Note: Learn more about the class in the API reference page.

SBUActionSheet

Copy link

SBUActionSheet is an action sheet that is provided by Sendbird UIKit. It displays the view using a keyWindow. You have the option to either show or dismiss the alert view and you can also create buttons and set tap events through SBUActionSheetItem.

SBUActionSheet.show(
    items: [
        SBUActionSheetItem(title: {TITLE}, image: {IMAGE}),
        SBUActionSheetItem(title: {TITLE}, image: {IMAGE}),
    ],
    cancelItem: SBUActionSheetItem(title: {ITEM_TITLE}, image: {ITEM_IMAGE})
)

SBUActionSheet.dismiss()

Note: Learn more about the class in the API reference page.

SBUEmptyView

Copy link

SBUEmptyView is an empty view that is provided by Sendbird UIKit. It's used to show an empty table view composed of a set string and icon. There are multiple empty view types in UIKit with corresponding SBUStringSet and SBUIconSet properties that are used to compose the view. For the error type empty view, there is a retry button which, when tapped, sends the didSelectRetry event delegate to the view controller.

Refer to the table below to see the corresponding string and icon for each empty view type. You can customize these strings and icons through SBUStringSet and SBUIconSet.

TypeStringSetIconSet

none

empty string

empty icon

noChannels

Empty_No_Channels

iconChat

noMessages

Empty_No_Messages

iconMessage

noMembers

Empty_No_Users

iconMembers

noMutedMembers

Empty_No_Muted_Members

iconMute

noMutedParticipants

Empty_No_Muted_Participants

iconMute

noBannedUsers

Empty_No_Banned_Users

iconBan

noSearchResults

Empty_Search_Result

iconSearch

error

Empty_Wrong

iconError, iconRefresh

Note: Learn more about the class in the API reference page.

SBUNavigationTitleView

Copy link

SBUNavigationTitleView is a title view in the NavigationBar. It's built with a UILabel that uses the titleFont and titleColor properties of the SBUComponentTheme. You can customize the font and the color by changing the theme.

Note: Learn more about the class in the API reference page.

SBULoading

Copy link

SBULoading is an activity indicator, specifically a loading indicator, that is provided by Sendbird UIKit. It displays the view using a keyWindow and uses the loadingBackgroundColor and loadingPopupBackgroundColor properties of SBUComponentTheme. The class also uses the color values of loadingSpinnerColor of the SBUComponentTheme and the iconSpinner property of the SBUIconSet class to display the view. You have the option to either show or dismiss the view and check if the view is displaying through the isShowing property.

SBULoading.start()
SBULoading.stop()
let isShowing = SBULoading.isShowing

Note: Learn more about the class in the API reference page.

SBUCoverImageView

Copy link

SBUCoverImageView is used to create a view of a channel's cover image. It provides various setter methods and allows you to upload either an image file or an image URL. You can set a placeholder image as the default cover image and allow only certain image types to be used as the cover image. By using a list of User objects, you can also use a cover image based on the channel members' profile images.

Note: Learn more about the class in the API reference page.

On this page