Skip to content

Instantly share code, notes, and snippets.

@intmainvoid
Last active August 29, 2015 14:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save intmainvoid/095af01e0de9b4f66f87 to your computer and use it in GitHub Desktop.
Save intmainvoid/095af01e0de9b4f66f87 to your computer and use it in GitHub Desktop.
Swift Example
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