【发布时间】:2013-08-22 19:06:07
【问题描述】:
我有一个 UIImagePickerController ,在源类型的相机中。 有时相机快门打不开,但我可以拍照。
有时效果很好?
我使用 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 是工具栏。
任何人都可以帮助我。
【问题讨论】:
-
现在编辑源代码。
-
它添加在初始化函数中。它是 UIImagePickerController 的子类
-
问题是内存问题。
标签: ios6 camera uiimagepickercontroller xcode4.6