Create a live event
You can use the CreateLiveEventViewController
class to build a view for creating a new live event. When creating a live event, you can set a cover image and a title for the event. To set a host, you can add up to ten users who can be a host. The showSelectedUserIdsForHostView
method is called to display a list of users you added.
If you set the starting point of your chat service to be the live event list, you can seamlessly guide your users to the create live event view. Once a new live event is successfully created, the user will be brought back to the live event list view. By default, the user who created the live event becomes the host of the event.
List of features
See the table below to see what features are available in CreateLiveEventViewController
.
Feature | Description |
---|---|
Create a live event | Creates a new live event. |
Configure live event | Allows a user to enter a title and add a cover image for the live event. |
Select users to be host | Allows a user to select other users who can act as hosts. |
Initialize
You can start building a live event creation view through the CreateLiveEventViewController
class, which includes a pre-made user interface that allows the user to specify a cover image, title, and other configurations for a new live event. Use the following code to show a live event creation view.
Customization
You can customize the create live event view by changing views used to configure the title and cover image, and selecting the users to be host for the live event.
UI Components
The following table lists a set of customizable properties and methods of the LiveEventViewController
class.
Customizable properties | Description |
---|---|
Title Label | UILabel that is used to show the title of the view at the top left corner of the list view. |
Right action button | UIButton that is used to perform an action in the list view. The default behavior of the button is to create a new live event. |
Live Event List | UITableView that is used to show the list of live events. |
UI Customization
The following table lists the methods you can use to customize the view controller.
Customizable methods | Description |
---|---|
showAddUserIdsForHostView | Shows the view for selecting users by their IDs to act as the host. (Default: |
setUserIdsForHostListCell | Sets a cell in the list view for selecting users by their IDs to act as the host. (Default: |
String set
The following table lists the properties of SBUStringSet
you can customize to modify the create live event view.
Category | Key | String |
---|---|---|
CreateLiveEvent | addUsersForHostDialogTitle | Add users to be host |
CreateLiveEvent | addUsersForHostHeaderButton | Add |
CreateLiveEvent | addUsersForHostHeaderTitle | Add users to be host |
CreateLiveEvent | coverImageTitle | Cover image (optional) |
CreateLiveEvent | coverImageButton | Upload photo |
CreateLiveEvent | defaultTitle | Live event |
CreateLiveEvent | headerButton | Create |
CreateLiveEvent | headerTitle | New live event |
CreateLiveEvent | listUsersForHostHeaderTitle | Users who can be host |
CreateLiveEvent | removeFromList | Remove from list |
CreateLiveEvent | search | Search |
CreateLiveEvent | title | Title |
CreateLiveEvent | titlePlaceholder) | Add a title |
CreateLiveEvent | usersForHostNickname | (nickname) (You) |
CreateLiveEvent | userIdPlaceholder | Enter user ID |
CreateLiveEvent | userSearchNoMatchDescription | No matches found with "{keyword}" |
CreateLiveEvent | userSearchNoUsersDescription | There are no users. |
CreateLiveEvent | userSearchErrorDescription | Something went wrong. Try again. |
CreateLiveEvent | usersForHost | Users who can be host |