UIImageView附加到_UIBarBackground

MSh*_*hah 8 objective-c uinavigationbar uinavigationcontroller ios

以下是该问题的截图: -

不知道为什么uiimageview会被添加,是_UIBarBackGround什么? 在此输入图像描述

任何帮助表示赞赏.

完整流程截图: -

在此输入图像描述

小智 1

我遇到了同样的问题,但是使用 UITabBar

将 UIBarStyle 更改为黑色

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
}

Run Code Online (Sandbox Code Playgroud)

tabBar.barStyle = .black