我正在使用UIImagePickerController來記錄,編輯並保存視頻到文件。關閉UIImagePickerController時,狀態欄閃爍紅色並消失。我想避免這種情況。我一直注意到iOS8.1,iOS8,iOS7.1等下降頻率。Redbar在解僱時注意到UIImagePickerController
- (void) cameraClicked{
self.recordState=KRERecordStateRecording;
UIImagePickerController *pickerController = [[UIImagePickerController alloc] init];
pickerController.delegate = self;
pickerController.sourceType = UIImagePickerControllerSourceTypeCamera;
if(self.mediaType==MediaTypePhoto){
pickerController.mediaTypes = [[NSArray alloc] initWithObjects: (NSString *) kUTTypeImage, nil];
}else if(self.mediaType==MediaTypeVideo){
pickerController.mediaTypes = [[NSArray alloc] initWithObjects: (NSString *) kUTTypeMovie, nil];
pickerController.allowsEditing = YES;
pickerController.videoMaximumDuration=30.0f;
}
[self presentViewController:pickerController animated:YES completion:nil];
}
- (void)imagePickerController:(UIImagePickerController *)picker
didFinishPickingImage:(UIImage *)image
editingInfo:(NSDictionary *)editingInfo{
}
- (void)imagePickerController:(UIImagePickerController *)picker
didFinishPickingMediaWithInfo:(NSDictionary *)info{
[picker dismissViewControllerAnimated:YES completion:nil];
NSString *mediaType = [info objectForKey: UIImagePickerControllerMediaType];
if (CFStringCompare ((CFStringRef) mediaType, kUTTypeImage, 0)
== kCFCompareEqualTo) {
self.selectedMedia = [[NSArray alloc] initWithObjects:[info objectForKey:UIImagePickerControllerOriginalImage], nil];
[self saveMedia];
}else if(CFStringCompare ((CFStringRef) mediaType, kUTTypeMovie, 0)
== kCFCompareEqualTo){
videoURL= [info objectForKey:UIImagePickerControllerMediaURL];
[self saveMedia];
}
}
- (void)imagePickerControllerDidCancel:(UIImagePickerController *)picker{
[picker dismissViewControllerAnimated:YES completion:nil];
}
在appdelegate中看到什麼是窗口顏色 – 2014-10-30 11:11:38
白色。這似乎是因爲音頻會話而發生的。當錄音未正常停止時,它曾經出現在我身上。 – 2014-10-30 11:29:05
你有沒有解決這個問題的方法@EdAbe – Leena 2014-12-29 07:50:35