Is that possible to present a UIImagePickerController inside a view, instead of using it modal or inside a popover?
I have tried this, without success…
if ([UIImagePickerController isSourceTypeAvailable:
UIImagePickerControllerSourceTypePhotoLibrary]) {
UIImagePickerController *picker = [[UIImagePickerController alloc] init];
picker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
NSArray *mediaTypesAllowed = [UIImagePickerController availableMediaTypesForSourceType:UIImagePickerControllerSourceTypePhotoLibrary];
[picker setMediaTypes:mediaTypesAllowed];
picker.delegate = self;
[picker.view setFrame:CGRectMake(0,0, 400, 400)]; // just for testing
[picker.view setCenter:CGPointMake(200,200)];
[myView addSubview:picker.view];
[picker.view release];
}
thanks for any help
I strongly doubt it’s possible without going outside the API.
The primary function of the picker view is to safely provide access to a system wide resource. In other words, it has a gatekeeper function that Apple doesn’t want any app to be able to override. To enforce it’s restrictions on access to the photolibrary at least, it has to be modal.
That might loosen up in 4.0 but I kind of doubt it.