2016-01-04 3 views
1

Я использую MPMovieplayer, как подтаблицы все работает нормально, но мой вопрос, когда я нажимаю на всем экране видео, то возвращаясь к небольшому видеокадру, то строка состояния перекрывает навигационную панельСтрока состояния перекрывает панель навигации: MPMoviePlayerController

Вот мои код

// Setup player 
MPMoviePlayerController* mp = 
[[MPMoviePlayerController alloc] initWithContentURL:videoURL]; 
mpc = mp; 
mpc.shouldAutoplay = YES; 
[mpc prepareToPlay]; 
mpc.view.frame = CGRectMake(0, 0, 320, 320); 

mpc.backgroundView.backgroundColor = [UIColor redColor]; 
[self.view addSubview:mpc.view]; 

enter image description here

ответ

1

у меня есть решено, делая добавление ключа в файле .plist

'View controller-based status bar appearance' and set to NO. 

затем установите строку состояние, скрытое в NO

0
/* Create a new movie player object. */ 
    MPMoviePlayerController *player = [[MPMoviePlayerController alloc] initWithContentURL:movieURL]; 

    if (player) 
    { 
     /* Save the movie object. */ 
     [self setMoviePlrController:player]; 

     /* Register the current object as an observer for the movie 
     notifications. */ 
     [self installMovieNotificationObservers]; 

     /* Specify the URL that points to the movie file. */ 
     [player setContentURL:movieURL]; 

     /* If you specify the movie type before playing the movie it can result 
     in faster load times. */ 
     [player setMovieSourceType:sourceType]; 
     [player setRepeatMode:MPMovieRepeatModeNone]; 
     player.scalingMode = MPMovieScalingModeAspectFit; 

     // Apply the user movie preference settings to the movie player 
     [self.moviePlrController.view setAutoresizingMask:(UIViewAutoresizingFlexibleHeight|UIViewAutoresizingFlexibleWidth)]; 
     [self.playerView addSubview:[self moviePlrController].view]; 
     CGRect frame = self.playerView.frame; 
     int width = frame.size.width; 
     int height = frame.size.height; 



     [[self moviePlrController].view setFrame:CGRectMake(0, 0, width, height)]; 
    } 
+0

спасибо за ваше повторе, но мой вопрос связан ти строка состояния –

Смежные вопросы