0

私はすでに iPhone 用に作成したアプリの iPad バージョンを作成しています。つまり、このコードが機能することはわかっています。静的値の代わりに self.bounds を使用しているため、サイズはドキュメントに準拠しています。

問題は、ビデオを開くと、すべてが正常に表示されるということです。ただし、コントロールバーで何も押すことができません。

Googleでもここでも、この問題を抱えている人は見つかりません...

誰でも問題が何であるかについて何か考えがありましたか?

トム

コード:

    mediaController = [[MPMoviePlayerController alloc] initWithContentURL:movieUrl];

    NSLog(@"%@", [[NSNotificationCenter defaultCenter] observationInfo]);



    [[NSNotificationCenter defaultCenter] addObserver:self
                                             selector:@selector(moviePlayBackIsReady:)
                                                 name:MPMediaPlaybackIsPreparedToPlayDidChangeNotification
                                               object:mediaController];

    CGRect rect = self.view.bounds;
    //mView = [[UIView alloc] initWithFrame:CGRectMake(rect.origin.x, rect.origin.y, rect.size.width, rect.size.height - 30)];
    //mView.backgroundColor = [UIColor clearColor];
    [mediaController.view setFrame:rect];

    [self.view addSubview:mediaController.view];
    //[self.view addSubview:mView];
    hud = [[MBProgressHUD alloc] initWithView:self.view];
    hud.labelText = @"Loading video...";
    [self.view addSubview:hud];
    [hud show:YES];
    [mediaController prepareToPlay];
    mediaController.shouldAutoplay = NO;
    mediaController.controlStyle = MPMovieControlStyleDefault;

    UITapGestureRecognizer *tapRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(handleTap)];
    tapRecognizer.delegate = self;
    //[self.view addGestureRecognizer:tapRecognizer];
    [mediaController.view addGestureRecognizer:tapRecognizer];
4

0 に答える 0