Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Button State #18

Closed
NemanjaLugi opened this issue Dec 11, 2017 · 3 comments
Closed

Button State #18

NemanjaLugi opened this issue Dec 11, 2017 · 3 comments

Comments

@NemanjaLugi
Copy link

How can I change the button state on PlayPauseButton?

@andreipitis
Copy link
Owner

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.

@NemanjaLugi
Copy link
Author

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

@andreipitis
Copy link
Owner

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()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants