1
我有打開照片庫選擇視頻。這裏是我的代碼:選擇視頻時,是否可以更改「UIImagePickerController」的標題?
- (void)selectMediaFrom:(UIImagePickerControllerSourceType)sourceType {
UIImagePickerController *imagePicker = [[UIImagePickerController alloc] init];
imagePicker.sourceType = sourceType;
imagePicker.delegate = self;
//imagePicker.allowsEditing = YES;
if (selectedMediaType == MediaVideos) {
imagePicker.mediaTypes = @[(NSString *)kUTTypeMovie, (NSString *)kUTTypeVideo];
if (sourceType == UIImagePickerControllerSourceTypeCamera) {
imagePicker.cameraCaptureMode = UIImagePickerControllerCameraCaptureModeVideo;
}
}
else if (selectedMediaType == MediaPhotos) {
imagePicker.mediaTypes = @[(NSString *)kUTTypeImage];
if (sourceType == UIImagePickerControllerSourceTypeCamera) {
imagePicker.cameraCaptureMode = UIImagePickerControllerCameraCaptureModePhoto;
}
}
if (IS_IPHONE) {
[self presentViewController:imagePicker animated:TRUE completion:nil];
}
else {
dispatch_async(dispatch_get_main_queue(), ^{
[self setModalPresentationStyle:UIModalPresentationFormSheet];
[self presentViewController:imagePicker animated:TRUE completion:nil];
});
}
}
而且它總是呈現出UIImagePickerController
爲照片標題,見截圖我重視。
但是,我已經打開iPhone默認照片應用程序和檢查,顯示視頻文件夾:請參見下面
那麼,爲什麼它沒有顯示影片標題?我們可以改變它嗎?
在你的兩個截圖文件夾中標題是一樣的:'Videos'!你究竟在問什麼?目標並不清楚你想達到什麼目的! – Lion
我已經明確提到,我想更改屏幕標題。請參閱第一張截圖。 – VRAwesome
如果你只是想改變屏幕的標題,那麼你不應該添加另一個屏幕截圖四捨五入視頻!這令人困惑。你的問題應該像'如何更改imagepickercontroller的標題? '就是這樣! – Lion