开发者

UIImagePicker camera not loading (white screen)

开发者 https://www.devze.com 2022-12-11 11:12 出处:网络
I have troubles using UIImagePicker to take pictures based on the \"Taking Pictures with the Camera\" chapter from the iPhone programming guide.

I have troubles using UIImagePicker to take pictures based on the "Taking Pictures with the Camera" chapter from the iPhone programming guide.

Whatever i try all i get is a grey/white screen.

here is my code :

- (void)viewDidLoad {
    [super viewDidLoad];

    UIImag开发者_如何学GoePickerController *imagePicker = [[UIImagePickerController alloc] init];
    imagePicker.delegate = self;
    imagePicker.sourceType = UIImagePickerControllerSourceTypeCamera;
    imagePicker.allowsEditing = NO;
    [self presentModalViewController:imagePicker animated:YES];
}

I've tried to call the imagePicker from the viewDidLoad, viewWillAppear or awakeFromNib, nothing changes.

My viewController implements UINavigationControllerDelegate and UIImagePickerControllerDelegate.

I'm running this on OS3.1 on a first gen iPhone.

Any help would be greatly appreciated ! Thanks, Vincent.


I would placing that call in viewDidAppear as oposed to viewDidLoad.

0

精彩评论

暂无评论...
验证码 换一张
取 消