(008)UIBarButtonItem工具栏按钮
- (void)viewDidLoad { [super viewDidLoad]; self.navigationController.navigationBar.tintColor = [UIColor redColor];//改变导航条颜色 ////////////////////工具条按钮/////////////////////// UIBarButtonItem *button1 = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemRefresh target:self action:nil]; UIBarButtonItem *space = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace target:self action:nil]; UIBarButtonItem *button2 = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemUndo target:self action:nil]; NSArray *toolButtons = [NSArray arrayWithObjects:button1,space,button2, nil]; [self.navigationController setToolbarHidden:NO animated:YES]; [self setToolbarItems:toolButtons animated:YES]; } ........ ........ ........ -(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { Class class = NSClassFromString([items objectAtIndex:indexPath.row]); id viewController = [[class alloc] init]; if(viewController) { self.navigationController.hidesBottomBarWhenPushed = YES; [self.navigationController pushViewController:viewController animated:YES]; } }
***万事万物都有裂痕,那是光照进来的地方***

浙公网安备 33010602011771号