iOS 8 Swift Xcode 6 - Set top nav bar bg color and height

前端 未结 3 1776
借酒劲吻你
借酒劲吻你 2021-02-02 03:20

I have looked everywhere and tested all the code snippets posted on Stack, but nothing works for me as I need it to work.

I simply want to set:

  • Nav bar hei
3条回答
  •  孤街浪徒
    2021-02-02 04:14

    Great answer from Bon Bon!

    In Swift 3 however make sure you replace

    let classNamesToReposition: [String] = ["_UINavigationBarBackground"]
    

    with

    let classNamesToReposition: [ String ] = [ "_UIBarBackground" ]
    

    Otherwise, it wont work.

提交回复
热议问题