How to add a Search Bar in GroupChannelListView #19
lookdeceline
announced in
0. Channel list
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Question
How to insert a Search Bar on top of channel list in a
GroupChannelListView
?At the end of this guide, you will be able to achieve the below.
searchBar.mp4
Answer
SendbirdSwiftUI works on top of SendbirdUIKit. By adding a workaround to SendbirdUIKit, you can add a Search Bar in
GroupChannelListView
.GroupChannelListView
.UIView
that wraps aUISearchBar
.SBUGroupChannelListModule.List
to add the customUISearchBar
wrapper view created in step 2.3-1. Also make it conform to
UISearchBarDelegate
to react to any events triggered by theUISearchBar
.SBUGroupChannelListModule.List
to pass on search bar related events toSBUGroupChannelListViewController
.SBUGroupChannelListViewController
.6-1. Also make it conform to the protocol created in step 4.
SendbirdUIKit
to use your subclasses under the hood ofSendbirdSwiftUI
.7-1. Note: This configuration must run before a SendbirdSwiftUI View is shown.
Beta Was this translation helpful? Give feedback.
All reactions