I am trying to set the video quality for the UIImagePickerController but I see something really werid now. The effect on the video quality only happen after I reset my application. I try to change the video quality based on some user setting, by some code like this:
if ([preferences boolForKey:kVideoQuality]) {
NSLog(@"High Quality");
self.pickerController.videoQuality = UIImagePickerControllerQualityTypeHigh;
} else {
NSLog(@"Low Quality");
开发者_JAVA技巧 self.pickerController.videoQuality = UIImagePickerControllerQualityTypeMedium;
}
NSLog(@"%d", self.pickerController.videoQuality);
Everything looks good, when I change the setting to High Quality, the "High Quality" is output and vice versa. I also double check by the last NSLog and it aslo output the correct quality. But if I am in the high quality mode and I set to low quality, nothing happens. If I reset the app by quitting it and going back, the video record now is in low quality mode.
Anybody knows what can be possible causes?
You're setting the picker view's videoQuality property. Its delegate methods are sometimes not called when making a selection programatically.
Try calling the delegate methods directly after changing the selection and see if it works.
It turns out to be a bug of the iOS SDK, it is fixed in the iOS 5 now.
What if you destroyed the imagePicker, and created a new one again after setting it?
Not a fix - but a workaround!
the same problem here(Testing device: iPhone 4; OS: iOS 5.0.1):
Never see any difference between the video returned for
UIImagePickerControllerQualityTypeMedium UIImagePickerControllerQualityTypeHigh
even if I quit the App. Spent 1 hour, no findings, I am going to give up on this... Sad.
精彩评论