某幾個項目不能選擇時,
只需將該項目setEnable:NO,
這樣就行了。
[[self.tabBarController.tabBar.items objectAtIndex:3] setEnabled:NO];
[[self.tabBarController.tabBar.items objectAtIndex:3] setEnabled:NO];
//關閉編輯功能 self.tabBarController.customizableViewControllers = nil; //變更標題 self.tabBarController.moreNavigationController.navigationBar.topItem.title = @"自訂"; //改變顏色 self.tabBarController.moreNavigationController.navigationBar.tintColor = [UIColor blackColor];
//建立掃描畫面 ZXingWidgetController *widController = [[ZXingWidgetController alloc] initWithDelegate:self showCancel:YES OneDMode:NO]; [widController.overlayView setDisplayedMessage:@"請將條碼圖示置於框線內"]; //Barcode Reader QRCodeReader* qrcodeReader = [[QRCodeReader alloc] init]; NSSet *readers = [[NSSet alloc ] initWithObjects:qrcodeReader,nil]; [qrcodeReader release]; widController.readers = readers; [readers release]; //掃瞄完成時,聲音提示 NSBundle *mainBundle = [NSBundle mainBundle]; widController.soundToPlay =[NSURL fileURLWithPath:[mainBundle pathForResource:@"beep-beep" ofType:@"aiff"] isDirectory:NO]; //將描畫面加入主畫面 [self presentModalViewController:widController animated:YES]; [widController release];