grez grez - 1 year ago 157
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