Created
March 10, 2015 21:57
-
-
Save mattyohe/4f685131b0674e4354c4 to your computer and use it in GitHub Desktop.
uncompiled swift code (probably has errors!)
This file contains hidden or 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
class PlayerView : UIView { | |
var player: AVPlayer { | |
get{ | |
var layer = self.layer as AVPlayerLayer | |
return layer.player | |
} | |
set { | |
var layer: AVPlayerLayer = self.layer as AVPlayerLayer | |
layer.player = newValue | |
} | |
} | |
override class func layerClass() -> AnyClass { | |
return AVPlayerLayer.self | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment