grez grez - 2 years ago 189
Swift Question

Use MPMoviePlayerController if iOS 7

I have an app which uses the

class and now I wish to support iOS 7. How can I use the
instead if iOS 7 is running?

Answer Source

in swift you can do it like this

if #available(iOS 8, *) {
    let player = AVplayerViewController()
} else {
    //fallback to MVMovie
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download