swift
1import UIKit 2 3class ViewController: UIViewController { 4 var navigationBar: UINavigationBar! 5 6 let barColors = UIColor.redColor() 7 8 override func viewDidLoad() { 9 super.viewDidLoad() 10 // Do any additional setup after loading the view, typically from a nib. 11 12 //ここの行でエラー exc_bad_instructionが発生します 13 self.navigationBar.barTintColor = self.barColors 14 } 15 16 override func didReceiveMemoryWarning() { 17 super.didReceiveMemoryWarning() 18 // Dispose of any resources that can be recreated. 19 } 20 21 22} 23
navigationBar変数は、どのように初期化していますか?
回答1件
あなたの回答
tips
プレビュー