My application is going to support PIP in AVPlayer after iOS 9 but I still want to keep my app working in iOS 7 and above. I read this post regarding with the availability check. But it seems not working for my case. For example:
My code:
class PlayerViewController: UIViewController, AVPictureInPictureControllerDelegate
This works fine in iOS 9, but how to make it works in iOS 7 and above? I can't do this:
@available(iOS 9.0, *)
class PlayerViewController: UIViewController, AVPictureInPictureControllerDelegate
@available(iOS 7.0, *)
class PlayerViewController: UIViewController
Any suggestion? Thanks.