List live events
You can use the LiveEventListViewController
class as the starting point of using the UIKit. You can use this class to build a live event list view where a user can list, create, and enter a live event. When there is no connection between the client app and the Sendbird server, the UIKit will automatically reconnect the two using user information obtained during the UIKit authentication. Once the client app is connected to the Sendbird server, the LiveEventListViewController
will show a list of live events.
List of features
See the table below to see what features are available in LiveEventListViewController
.
Feature | Description |
---|---|
Create live events | Creates a new live event. |
Enter a live event | Allows a user to enter a live event. |
Show a list of live events | Displays a list of live events in the application. |
Initialize
You can start building a live event list view through the LiveEventListViewController
class, which uses LiveEventTableViewCell
to display each live event in the list. Use the following code to list live events in a view.
Note:
LiveEventListViewController
usesLiveEventListQuery
from Sendbird Live SDK to retrieve the list of live events from the server. InitializeLiveEventListViewController
by setting theLiveEventListQueryParams
object. Otherwise, the default values for the query will be used.
Customization
The LiveEventListViewController
class is composed of header and list components. The header component consists of a header title label and a right action button. The list component is an area located below the header where UITableView
shows the live event information using LiveEventTableViewCell
.
UI Components
The following table lists a set of customizable properties and methods of the LiveEventListViewController
class.
Customizable properties | Description |
---|---|
Header title | UILabel that is used to show the title of the view at the top left corner of the list view. |
Header right 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 |
---|---|
setLiveEventListCell | Sets a cell in the live event list view. The cell you set using this function is used as the default cell on the live event list. |
fetchLiveEventQueryParams | Fetches a list of live events. |
onListCellClicked | Invoked when a cell in the live event list is clicked. By default, the user enters the live event on the cell. |
String set
The following table lists the properties of SBUStringSet
that you can customize to modify the live event list view.
Category | Key | String |
---|---|---|
List | headerButton | Create |
List | headerTitle | Live events |
List | emptyDescription | No live events |
List | hostNicknamePlaceholder | Host |