2013-08-20 60 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

問題是內存問題。 –

回答