我使用 IB 创建了一个 UIToolBar。在一个视图中,我调用了相机,并且相机控件被工具栏所掩盖。
我尝试了几种方法来隐藏工具栏 - alpha=0、toolBarHidden、hidesBottomBarWhenPushed,并考虑了如何重新调整相机视图的大小以允许使用相机控件。一切都没有运气。
我相信我必须创建一个自定义工具栏,然后才能使用 hide 方法。
我的相机代码是标准的:
UIImagePickerController *imagePicker = [[UIImagePickerController alloc] init];
imagePicker.sourceType = UIImagePickerControllerSourceTypeCamera;
imagePicker.allowsEditing = NO;
imagePicker.delegate = self;
[self presentModalViewController:imagePicker animated:YES];
这个新手将不胜感激任何代码或最终方向。