0

I was wondering how to make the UIToolbar look transparent like the photos app where it allows the photo below it to be seen. I have my UIToolbar placed in IB. In IB, I set both the tintColor and backgroundColor to ClearColor.

In code, I also do:

_webViewToolbar.translucent = YES;
_webViewToolbar.alpha = 0.5;

Unfortunately, it only looks like this:

enter image description here

Any thoughts? Thanks!

Crystal
  • 28,460
  • 62
  • 219
  • 393

1 Answers1

0

check the following line of code

 _toolbar.barStyle = UIBarStyleBlackTranslucent;//Deprecated

EDIT

  _toolbar.barStyle = UIBarStyleBlack;
  _toolbar.translucent = YES;

check the UIInterface.h Class in UIKit.Framework

You will find the follwing

// for UINavigationBar and UIToolBar

 typedef enum {
 UIBarStyleDefault          = 0,
 UIBarStyleBlack            = 1,

 UIBarStyleBlackOpaque      = 1, // Deprecated. Use UIBarStyleBlack
 UIBarStyleBlackTranslucent = 2, // Deprecated. Use UIBarStyleBlack and set the translucent property to YES
 } UIBarStyle;

Regards, neil.

NIKHIL
  • 2,719
  • 1
  • 26
  • 50