如何从底部屏幕(阅读器屏幕)的工具栏中删除信息按钮。我尝试过使用覆盖方法,但它不起作用。希望有人能救我。谢谢
-(void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view.
ZBarReaderController *reader = [ZBarReaderController new];
reader.readerDelegate =self;
reader.sourceType =UIImagePickerControllerSourceTypeCamera;
reader.showsCameraControls=YES;
// Define button title color when disabled (Grey)
[btnFindMe setTitleColor:[UIColor grayColor] forState:UIControlStateDisabled];
[self activateScan];
}
-(void) activateScan
{
ZBarReaderViewController *reader = [ZBarReaderViewController new];
reader.readerDelegate = self;
reader.supportedOrientationsMask = ZBarOrientationMaskAll;
[reader.scanner setSymbology: 0
config: ZBAR_CFG_ENABLE
to: 0];
[reader.scanner setSymbology: ZBAR_QRCODE
config: ZBAR_CFG_ENABLE
to: 1];
reader.readerView.zoom = 1;
reader.showsZBarControls=FALSE;
UIView *overlay = [[UIView alloc] initWithFrame:CGRectMake(0.0,0.0,320.0,480.0)];
overlay.backgroundColor = [UIColor clearColor];
UIToolbar *toolbar = [[UIToolbar alloc] initWithFrame:CGRectMake(0.0,510.0,320.0,54.0)];
UIBarButtonItem *cancelButton = [[UIBarButtonItem alloc]
initWithBarButtonSystemItem:UIBarButtonSystemItemCancel
target:self action:@selector(closeScanner)];
toolbar.items = [NSArray arrayWithObjects:cancelButton,nil];
[overlay addSubview:toolbar];
reader.cameraOverlayView = overlay;
[self presentModalViewController: reader animated: YES];
}