Last active
August 29, 2015 14:26
-
-
Save intmainvoid/095af01e0de9b4f66f87 to your computer and use it in GitHub Desktop.
Swift Example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func invisibleButtonTapped(sender: UIButton!) | |
{ | |
var playerIsPlaying:Bool = self.avPlayer.rate > 0 | |
if (playerIsPlaying) { | |
self.avPlayer.pause(); | |
} else { | |
self.avPlayer.play(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment