4
私は自分のストーリーボードからアクセスできるカスタムUINavigationControllerを持っています。カスタムナビゲーションバーを作成して、ナビゲーションバーの高さをカスタマイズしたいとします。ここで私はこれまで持っているものです:カスタムUINavigationControllerクラスでUINavigationBarを作成する際のエラー
私は誰もが知っている、なぜこのエラーにCannot convert value of type 'UINavigationBar' to expected argument type 'AnyClass?'
を取得しています最後の行で
var navBar = UINavigationBar(frame: CGRect(x: 0.0, y: 0.0, width: UIScreen.main().bounds.width, height: 70.0))
navBar.barTintColor = UIColor(red: 155.0/255.0, green: 155.0/255.0, blue: 155.0/255.0, alpha: 1.0)
super.init(navigationBarClass: navBar, toolbarClass: nil)
?それはバグかもしれない。 私はXcode 8 betaとSwift 3を使用しています。
が魅力のように働いたことありがとうございます! –