How to set background image for UINavigationBar on different iOS Devices

前端 未结 4 1458
再見小時候
再見小時候 2021-01-24 19:37

I want to set full image on UINavigationBar, for this I have:

@2x image (640 x 128)
@3x image (960 x 192)

Below Screenshot is the

4条回答
  •  孤城傲影
    2021-01-24 19:56

    1.self.navigationController.navigationBar.setBackgroundImage(image, forBarMetrics: .Default)

    2.The height of navigation bar is changed from 44 points (88 pixels) to 64 points (128 pixels).

提交回复
热议问题