iPhone:应用程序变为;黑色“;当味精;UIStatusBarStyleBlackTranslucent在此设备上不可用。”;显示

iPhone:应用程序变为;黑色“;当味精;UIStatusBarStyleBlackTranslucent在此设备上不可用。”;显示,iphone,objective-c,xcode,video,Iphone,Objective C,Xcode,Video,在我的应用程序中,我录制并播放视频。大多数时候,视频播放得很好,但有时在播放视频的中间,当我在日志中按下“完成”按钮时,“UistastBasyLeBlack半透明在这个设备上是不可用的。”< /强> MSG显示,但是它是如何生成的,我不知道,当这个MSG使我的应用程序变成“黑色”的时候。我必须从背景中删除它。剩下的时间,我的视频工作得很好,很完美。 在我的info.plist文件中,我更改了必要的状态栏设置,但对结果没有影响 我想说的是,我正在从iPad上调试我的应用程序 而且这种味精并不是每

在我的应用程序中,我录制并播放视频。大多数时候,视频播放得很好,但有时在播放视频的中间,当我在日志中按下“完成”按钮时,“UistastBasyLeBlack半透明在这个设备上是不可用的。”< /强> MSG显示,但是它是如何生成的,我不知道,当这个MSG使我的应用程序变成“黑色”的时候。我必须从背景中删除它。剩下的时间,我的视频工作得很好,很完美。 在我的info.plist文件中,我更改了必要的状态栏设置,但对结果没有影响

我想说的是,我正在从iPad上调试我的应用程序

而且这种味精并不是每次都产生。 我不知道为什么会显示这个消息。 按下“完成”按钮时运行以下代码

- (void)moviePlaybackDidFinish:(NSNotification*)notification
{
    [self stopMovie];
    NSLog(@"Start Timer Again");
   // [btnVideo setTitle:@"Start Recording" forState:UIControlStateNormal];
    [btnVideo setImage:[UIImage imageNamed:@"Record Button-iPad.png"] forState:UIControlStateNormal];
    NSURL *url = [NSURL fileURLWithPath:@"/dev/null"];

    NSDictionary *settings = [NSDictionary dictionaryWithObjectsAndKeys:
                              [NSNumber numberWithFloat: 44100.0],                 AVSampleRateKey,
                              [NSNumber numberWithInt: kAudioFormatAppleLossless], AVFormatIDKey,
                              [NSNumber numberWithInt: 1],                         AVNumberOfChannelsKey,
                              [NSNumber numberWithInt: AVAudioQualityMax],         AVEncoderAudioQualityKey,
                              nil];

    NSError *error;

    if (recorder) {
        recorder = nil;
        [recorder release];
    }
    recorder = [[AVAudioRecorder alloc] initWithURL:url settings:settings error:&error];

    if (recorder) {
        [recorder prepareToRecord];
        recorder.meteringEnabled = YES;
        [recorder record];
    }
    NSString *str = [[NSUserDefaults standardUserDefaults] valueForKey:@"IMAGE_MOVEMENT"];
    NSLog(@"image movement %@",str);
    if(str == @"EASY")
    {
        NSLog(@"inside easy image");
        [self validateTimer];
        levelTimer = [NSTimer scheduledTimerWithTimeInterval:0.03 target:self selector:@selector(levelTimerCallbackEasy:) userInfo:nil repeats: YES];
    }
    else if(str == @"MEDIUM")
    {
        NSLog(@"inside medium image");
        [self validateTimer];
        levelTimerMedium = [NSTimer scheduledTimerWithTimeInterval:0.03 target:self selector:@selector(levelTimerCallbackMedium:) userInfo:nil repeats:YES];
    }
    else if(str == @"HARD")
    {
        NSLog(@"inside hard image");
        [self validateTimer];
        levelTimerHard = [NSTimer scheduledTimerWithTimeInterval:0.03 target: self selector: @selector(levelTimerCallbackHard:) userInfo: nil repeats: YES];
    }
}

- (void)stopMovie
{
        NSLog(@"Stop Movie");


     [[NSNotificationCenter defaultCenter]
     removeObserver:self 
     name:MPMoviePlayerWillExitFullscreenNotification 
     object:moviePlayer];

     // This trick is necessary, otherwise the screen remains black or will
     // flicker when you try to play the next video.
     [moviePlayer pause];
     [moviePlayer stop];
     moviePlayer.initialPlaybackTime = -1.0;

     moviePlayer = nil;


    NSString *recorderFilePath = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0];
    recorderFilePath = [recorderFilePath stringByAppendingPathComponent:@"tempRecording.caf"];

    if ([[NSFileManager defaultManager] fileExistsAtPath:recorderFilePath]) {
        [[NSFileManager defaultManager] removeItemAtPath:recorderFilePath error:nil];
    }

    NSString *movieFilePath = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0];
    movieFilePath = [movieFilePath stringByAppendingPathComponent:@"export.mov"];

    if ([[NSFileManager defaultManager] fileExistsAtPath:movieFilePath]) {
        [[NSFileManager defaultManager] removeItemAtPath:movieFilePath error:nil];
    }

    NSString *videoFilePath = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0];
    videoFilePath = [videoFilePath stringByAppendingPathComponent:@"output.mp4"];

    if ([[NSFileManager defaultManager] fileExistsAtPath:videoFilePath]) {
        [[NSFileManager defaultManager] removeItemAtPath:videoFilePath error:nil];
    }

    NSURL *urls = [NSURL fileURLWithPath:recorderFilePath];
    NSError *err = nil;

    if (voiceRecorder) {
        voiceRecorder = nil;
        [voiceRecorder release];
    }

    voiceRecorder = [[ AVAudioRecorder alloc] initWithURL:urls settings:recordSetting error:&err];
    //[recorder setMeteringEnabled:YES];

    if(!voiceRecorder){
        NSLog(@"recorder: %@ %d %@", [err domain], [err code], [[err userInfo] description]);
        UIAlertView *alert =
        [[UIAlertView alloc] initWithTitle: @"Warning"
                                   message: [err localizedDescription]
                                  delegate: nil
                         cancelButtonTitle:@"OK"
                         otherButtonTitles:nil];
        [alert show];
        [alert release];
        return; 
    }

    //prepare to record
    [voiceRecorder setDelegate:self];
    [voiceRecorder prepareToRecord];
    //voiceRecorder.meteringEnabled = YES;
}
如果有,请提供任何解决方案


thanx。iPad不支持UIStatusBarStyleBlackTransparent,将其更改为正常,您将消除错误。可能是因为他们认为大屏幕实际上并不需要额外的20像素。

它已经处于默认阶段,我没有将其设置为“UIStatusBarStyleBlackTransparent”,但我不知道为什么这个消息会生成know@iPhone嗯,这很奇怪,一定有什么东西在改变它,当我在ipod中运行相同的代码时,会显示消息“wait_fences:failed to receive reply:10004003”,然后应用程序会变为“黑色”,直到我所知的UIStatusBarStyleBlackTranslucent被苹果弃用。所以你需要找到一个替代方案。。。而且你给出的代码与你的问题无关。。。问题出在别的地方。。。