开发者

UIImagePicker camera not loading (white screen)

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜