Ankit Sachan
Ankit Sachan

Reputation: 7840

iphone: show UIImagePicker in UIview

I have a situation here please help me in this, can I show imagepicker in a view insted of presenting them in a modalview

I tried this code but it doesnt work

UIImagePickerController *picker=[[UIImagePickerController alloc] init];
picker.delegate=self;

picker.sourceType=UIImagePickerControllerSourceTypeSavedPhotosAlbum;
//[self presentModalViewController:picker animated:YES];
[imagePickerView addSubview:picker.view];

Please shed some light on this Thanx in advance

Upvotes: 0

Views: 415

Answers (1)

Kal
Kal

Reputation: 24910

The UIImagePickerController needs to be shown as modal, I think.. so I would uncomment that line.

http://developer.apple.com/library/ios/#documentation/uikit/reference/UIImagePickerController_Class/UIImagePickerController/UIImagePickerController.html

Upvotes: 2

Related Questions