2018-05-23 ios viewcontroller的toolbar展示

//toolbar均分

 UIBarButtonItem*item =  [[UIBarButtonItem alloc]initWithTitle:@"sssss" style:UIBarButtonItemStylePlain target:self action:@selector(aaaaa)];

   UIBarButtonItem*item2 =  [[UIBarButtonItem alloc]initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace target:self action:@selector(aaaaa)];

    self.navigationController.toolbar.translucent = NO;

    self.navigationController.toolbar.tintColor = [UIColor redColor];

//    self.toolbarItems = @[item,item2];

    [selfsetToolbarItems:@[item2,item,item2]animated:YES];

    self.view.backgroundColor = [UIColor yellowColor];

你可能感兴趣的:(2018-05-23 ios viewcontroller的toolbar展示)