ios8 - How do I rotate MPMoviePlayer as the movie is playing in iOS 8 with Swift? -
i'd ask , answer own question, in case others find helpful.
the movieplayer begin play nicely expected using
movieplayer.view.frame = self.view.bounds but, when rotated mid-movie, tabbar rotate, not movieplayer. crop portion of movie screen, or wouldn't change fill whole screen expected.

in func viewdidload() add notification service:
nsnotificationcenter.defaultcenter() .addobserver(self, selector: "movieorientationchanged", name: uideviceorientationdidchangenotification, object: nil) and, here's method (movieplayer class variable of type mpmovieplayercontroller) responds notification:
func movieorientationchanged() { movieplayer!.view.frame = self.view.bounds }
Comments
Post a Comment