2013-08-20 61 views
0

我有一个UIImagePickerController,在源类型的相机。 有时候相机快门不能打开,但我可以拍照。UIImagePickerController相机快门不打开

有时它工作正常吗?

enter image description here

我使用的UIImagePickerController

的子类
- (id)init{ 

    self = [super init]; 
     if (self) { 
    if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera]){ 


        [self setSourceType:UIImagePickerControllerSourceTypeCamera]; 

        self.showsCameraControls =NO; 
        [self setWantsFullScreenLayout:YES]; 
        self.cameraOverlayView = bottomToolBar; 
        self.cameraOverlayView = topToolBar; 

       } 
       else{ 
        [self setSourceType:UIImagePickerControllerSourceTypePhotoLibrary]; 
       } 
     } 
    } 

bottomToolBar和topToolBar是工具栏。

有人可以帮助我。

+0

查阅编辑的源代码。它在init函数中添加了 –

+0

。它是UIImagePickerController的子类 –

+0

问题是内存问题。 –

回答