yattee/Extensions/AVPlayerViewController+FullScreen.swift

12 lines
370 B
Swift
Raw Normal View History

2023-05-20 20:49:10 +00:00
import AVKit
extension AVPlayerViewController {
func enterFullScreen(animated: Bool) {
perform(NSSelectorFromString("enterFullScreenAnimated:completionHandler:"), with: animated, with: nil)
}
func exitFullScreen(animated: Bool) {
perform(NSSelectorFromString("exitFullScreenAnimated:completionHandler:"), with: animated, with: nil)
}
}