Common views
The following are views that are commonly used in view controllers across the UIKit for iOS.
SBUAlertView
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.
Note: Learn more about the class in the API reference page.
SBUActionSheet
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.
Note: Learn more about the class in the API reference page.
SBUEmptyView
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.
| Type | StringSet | IconSet |
|---|---|---|
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 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
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.
Note: Learn more about the class in the API reference page.
SBUCoverImageView
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.