[英]How hide bottom toolbar
I have a problem showing the album a toolbar with the following buttons, previous and the new one appears in the bottom view. 我在向相册显示工具栏时遇到了一个问题,该工具栏具有以下按钮,上一个按钮和新按钮显示在底部视图中。 How can you hide this toolbar? 如何隐藏此工具栏?
Thanks in advance. 提前致谢。
UIImagePickerController *controller = [[UIImagePickerController alloc] init];
controller.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
controller.allowsEditing = YES;
controller.mediaTypes = [UIImagePickerController availableMediaTypesForSourceType: UIImagePickerControllerSourceTypePhotoLibrary];
controller.delegate = self;
[self.navigationController presentViewController: controller animated: YES completion: nil];
If you want to hide the toolbar you can use the following code . 如果要隐藏工具栏,则可以使用以下代码。 Here the toolBarName is the name of your toolbar. 在这里,toolBarName是工具栏的名称。
toolBarName.hidden=YES;
Include this in the viewWillAppear function: 包括在viewWillAppear函数中:
self.navigationController?.isToolbarHidden = true
However, this is a Swift solution. 但是,这是一个Swift解决方案。
Use this code.Hope it helps.. 使用此代码。希望对您有所帮助。
UIImagePickerController *imagePickerController = [[UIImagePickerController alloc] init] ;
if([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypePhotoLibrary])
{
imagePickerController.delegate = self;
imagePickerController.allowsEditing = FALSE;
[imagePickerController setSourceType:UIImagePickerControllerSourceTypePhotoLibrary];
[self presentViewController:imagePickerController animated:YES completion:nil];
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.