Hello all, I am developing an application which uses both video recording and photo shoting.So i want to show buttons according to os for this i implement these methods.It's working fine when i build for OS 3.1 but when i build for OS 3.0 it shows errors
here are the methods
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"];
}
the errors are
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
how do i solve this issue?