19

Following is the screenshot of the issue:-

Not sure why is uiimageview getting added , and what is _UIBarBackGround ? enter image description here

Any help is appreciated.

Complete Flow screenshot:-

enter image description here

Meet
  • 1,196
  • 12
  • 26

2 Answers2

0

I had the same problem, but with the UITabBar

Change the UIBarStyle to black

public enum UIBarStyle : Int {

    
    case `default` = 0

    case black = 1

    
    @available(iOS, introduced: 2.0, deprecated: 13.0, message: "Use UIBarStyleBlack instead.")
    public static var blackOpaque: UIBarStyle { get }

    @available(iOS, introduced: 2.0, deprecated: 13.0, message: "Use UIBarStyleBlack and set the translucent property to YES instead.")
    case blackTranslucent = 2
}

tabBar.barStyle = .black

0

I had a problem with that UIImageView while adding a new UINavigationController to a project of my co-workers.

Basically, that is a part of a predefined class so I don't consider deleting it to be a good idea. But I made it transparent. To do so I overrode the function viewDidLoad and added this code:

if #available(iOS 13.0, *) {
    let navBarAppearance = UINavigationBarAppearance()
    navBarAppearance.backgroundColor = UIColor.clear
    navigationController?.navigationBar.standardAppearance = navBarAppearance
}

That made the background added in the superclass by my colleagues disappear. Some other elements in UINavigationController wasn't transparent so I overrode also the function viewWillAppear and added there:

let bar = self.navigationController?.navigationBar
bar?.isTranslucent = true
bar?.backgroundColor = .clear
bar?.standardAppearance.backgroundEffect = nil
Dharman
  • 30,962
  • 25
  • 85
  • 135
Dawid H
  • 1
  • 1