ios - Transparent UINavigationBar -


IOA is a newbie and I found this solution to be made in UINAVNBR transparent. Where can I place this code in my project file? [Self.navigationbar SetBackgroundImage: [UIImage new] forBarMetrics: UIBarMetricsDefault]; Self.navigationBar.shadowImage = [UIImage new]; Self.navigationBar.translucent = Yes;

So it has been implemented in my entire project where the navigation controller is being used.

put in your viewDidLoad your rootViewController function of this code:

Objective-C:

  [self.navigationController. Navbarbar setback background image: [UIImage new] forBarMetrics: UIBarMetricsDefault]; Self.navigationController.navigationBar.shadowImage = [UIImage new]; Self.navigationController.navigationBar.translucent = Yes; Self.navigationController.view.backgroundColor = [UIColor clear collar];  

Swift 2.x:

  NavigationBar if = navigationController .navigationbar {navigationBar.setBackgroundImage (UIImage (), forBarMetrics: .DEFAULT)? NavigationBar ShadowImage = UIImage () navigationBar.translucent = true navigationController .view.backgroundColor = .clearColor ()}  

swift 3:?

  if navbar nav =? NavigationController .navigationbar {navigationBar.setBackgroundImage (UIImage (), for: .DEFAULT)? NavigationBar.shadowImage = UIImage () navigationBar.isTranslucent = True navigationController .view .backgroundColor = .clear}  

This works to make sure! .


Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -