0

I am using UIToolbar in iPad App,How can I remove the gradient background from it? Below is my Code.

aToolbar.barStyle = UIBarStyleBlackTranslucent;
aToolbar.tintColor = [UIColor blackColor]; toolbar.alpha = 1.0;
jrturton
  • 118,105
  • 32
  • 252
  • 268

1 Answers1

4

You need to set image in UIToolbar so remove Gradient.

My suggestion is please set image and create custom UItoolbar.

For that code is below.

   UIImage *gradientImage44 = [[UIImage imageNamed:@"imageName.png"] 
                                resizableImageWithCapInsets:UIEdgeInsetsMake(0, 0, 0, 0)];
    // Set the background image for *all* UINavigationBars
    [[UIToolbar appearance] setBackgroundImage:gradientImage44 
                                       forBarMetrics:UIBarMetricsDefault];
Nimit Parekh
  • 16,776
  • 8
  • 50
  • 72