ios - How to add MPMoviePlayerController on current view with animation -



ios - How to add MPMoviePlayerController on current view with animation -

i using mpmovieplayercontroller play video within ipad application. using below code snippet add together film player view:

self.player =[[mpmovieplayercontroller alloc] initwithcontenturl: urlvideo]; [self.player preparetoplay]; [self.player setmoviesourcetype:mpmoviesourcetypestreaming]; [self.player.view setbounds:cgrectmake(0, 0, 512, 374)]; if (uideviceorientationislandscape([uiapplication sharedapplication].statusbarorientation)) { nslog(@"landscape.."); [self.player.view setcenter:cgpointmake(512, 374)]; } else{ nslog(@"portrait."); [self.player.view setcenter:cgpointmake(384, 502)]; } self.player.controlstyle=mpmoviecontrolstyleembedded; [self.player setscalingmode:mpmoviescalingmodeaspectfit]; self.player.shouldautoplay=yes; [self.viewcontroller.view addsubview: self.player.view]; self.btnclosenormalmode= [uibutton buttonwithtype:uibuttontypecustom]; [self.btnclosenormalmode setimage:[uiimage imagenamed:@"close_button_icon.png"] forstate:uicontrolstatenormal]; [self.btnclosenormalmode setframe:cgrectmake(470, 5, 32, 32)]; [self.btnclosenormalmode addtarget:self action:@selector(onsmallclosebtntap) forcontrolevents:uicontroleventtouchupinside]; [self.player.view addsubview:self.btnclosenormalmode];

but understandable above code, adding on view abruptly. 1 black view appears on view not user friendly. want add together film player view animation create smooth. can create film player view come animation how modal appears or suitable uiview animation. have no thought regarding animation. please help me on !!! thanks.

ios ios7 mpmovieplayercontroller

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -