0

ビデオ録画と写真撮影の両方を使用するアプリケーションを開発しているので、OSに応じてボタンを表示したいので、これらのメソッドを実装します。OS3.1用にビルドすると正常に動作しますが、OS3.0用にビルドするとエラーが表示されます。

ここに方法があります

    if ([self videoRecordingAvailable])
    {
        imagePickerController.sourceType =  UIImagePickerControllerSourceTypeCamera;
        imagePickerController.allowsImageEditing = YES;
        imagePickerController.allowsEditing = YES;
        imagePickerController.videoQuality = UIImagePickerControllerQualityTypeHigh;
        imagePickerController.videoMaximumDuration = 60.0f; // Length for video recording in seconds
        imagePickerController.mediaTypes = [NSArray arrayWithObjects:@"public.movie", nil];
        imagePickerController.showsCameraControls=YES;      
        [self.navigationController presentModalViewController:imagePickerController animated:YES];          
    }


- (BOOL) videoRecordingAvailable
{
if (![UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera]) return NO;
return [[UIImagePickerController availableMediaTypesForSourceType:UIImagePickerControllerSourceTypeCamera] containsObject:@"public.movie"];
}

エラーは

error: request for member 'allowsEditing' in something not a structure or union
error: request for member 'videoQuality' in something not a structure or union
error: 'UIImagePickerControllerQualityTypeHigh' undeclared (first use in this function)
 (Each undeclared identifier is reported only once for each function it appears in.)
error: request for member 'videoMaximumDuration' in something not a structure or union
error: request for member 'showsCameraControls' in something not a structure or union

この問題を解決するにはどうすればよいですか?

4

1 に答える 1

1
于 2010-01-16T08:09:25.440 に答える