Closed NemanjaLugi closed 6 years ago
Hi @NemanjaLugi , you can use the isSelected
property, or the buttonState
property to set the button in one of it's two available states. The button also changes state based on touch events using the private changeState()
method.
Can you give me example of code, I have some issues with that. I need to change button state from play to pause on ASPVideoPlayer. Thanks
You can't change the button state on ASPVideoPlayer
with the default controls. You can implement your own controls (take a look at ASPVideoPlayerControls
) and add additional methods to update the UI however you want. You can set the player's videoPlayerControls
property to use your own implementation.
Then you could call your methods like this :
let controls = videoPlayer.videoPlayerControls as! CustomControls
controls.updateButtonState()
How can I change the button state on PlayPauseButton?