Hi @Eric,
Among the functions we provide, those whose access control is of open type are designed for the override.
And in the case of public type, it is designed to be called from the action you created yourself.
Currently, the createChannel(params:)
function can only be called by making a button by itself.
I’ll show you an example of creating a button and calling the createChannel(params:)
function by setting the parameters directly in the action.
-
First, see Customizing the leftBarButton implemented in the
CreateChannelCustomManager
->uiComponentCustom()
function. -
Customizing the right bar button in a similar way.
let createChannelVC = SBUCreateChannelViewController() createChannelVC.rightBarButton = customCreateBarButton()
func customCreateBarButton() -> UIBarButtonItem { let createItem = UIBarButtonItem( title: SBUStringSet.CreateChannel_Create(0), style: .plain, target: self, action: #selector(customCreateAction) ) createItem([.font : SBUFontSet.button2], for: .normal) return createItem }
-
Implement a custom function to invoke the
createChannel(params:)
function.func customCreateAction() { guard selectedUserList.isEmpty == false else { return } let params = SBDGroupChannelParams() // Implement the code you want here self.createChannel(params: ) }
I think this way you can implement what you want
Your inconvenience was a great help to me in implementing UIKit. I will consider this part of the design of the implementation from now on!
Thanks!