/ SDKs / iOS
SDKs
Chat SDKs iOS v4
Chat SDKs iOS
Chat SDKs
iOS
Version 4

Update a poll option

Copy link

You can update a poll option by specifying the pollID, the pollOptionID, and an updated string for optionText parameters in the updatePollOption() method.

channel.updatePollOption(pollId: poll.pollId, pollOptionId: poll.firstOptionId, optionText: "new Option text") { poll,error in
    
}

PollHandler

Copy link

Through PollHandler, the Sendbird server always notifies whether your poll has been successfully retrieved.

public typealias PollHandler = (_ poll: Poll?, _ error: SBError?) -> Void