How do I make my navigation bar translucent?

Discussion in 'iOS Development' started by ChronicFunk, Jun 15, 2009.

  1. ChronicFunk

    ChronicFunk New Member

    Joined:
    Mar 14, 2009
    Messages:
    289
    Likes Received:
    0
    Device:
    iPhone 4 (Black)
    How do I? An example would be the Photos.app.

    All help is well appreciated!

    Please Register or Log in to view images

  2. Chicken

    Chicken Retired Moderator

    Joined:
    Feb 17, 2008
    Messages:
    2,494
    Likes Received:
    7
    Device:
    iPhone 5S
    Code:
    self.navigationController.navigationBar.barStyle = UIBarStyleBlackTranslucent;
  3. gojohnnyboi

    gojohnnyboi Well-Known Member

    Joined:
    Jan 25, 2008
    Messages:
    3,339
    Likes Received:
    55
    You give very vague, and too dependent code examples here. What I mean is, this will only work if you're setting it from a UIViewController subclass that is managed by a UINavigationController. What would have been better to say was:

    Code:
    yourNavBar.barStyle = ...;
  4. Chicken

    Chicken Retired Moderator

    Joined:
    Feb 17, 2008
    Messages:
    2,494
    Likes Received:
    7
    Device:
    iPhone 5S
  5. ChronicFunk

    ChronicFunk New Member

    Joined:
    Mar 14, 2009
    Messages:
    289
    Likes Received:
    0
    Device:
    iPhone 4 (Black)
    Where do I put this code?
  6. Chicken

    Chicken Retired Moderator

    Joined:
    Feb 17, 2008
    Messages:
    2,494
    Likes Received:
    7
    Device:
    iPhone 5S
    - (void)viewDidLoad if your using UIViewController subclass.

Share This Page