Pre-built create poll Scren
Overview: How to use existing create polls screen.
We have to use a class DyteCreatePollsViewController, which is used to create polls for the participant.
When user press the create poll button, use below code
@objc func createPollClick(button: DyteButton) {
let controller = DyteCreatePollsViewController(dyteMobileClient: dyteMobileClient) { [weak self] result in
guard let self = self else {return}
self.controller?.view.removeFromSuperview()
self.controller = nil
}
controller.view.backgroundColor = self.view.backgroundColor
self.view.addSubview(controller.view)
self.creatPollController = controller
}