Chat / iOS
Chat iOS v4
Chat iOS
Chat
iOS
Home
/
Chat
/
iOS
/
Message
This is the new Docs for Chat SDK v4 for iOS. To see the previous Docs, click here.

Update a poll option

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

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

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