Navigation Bar の高さを設定するために、cocoa touch class ファイルを追加してコードを記述したのですが、Cannot assign to property: 'frame' is a method というエラーをを起こしてしまいました。
プロパティに割り当てることはできません: 'フレーム'はメソッドです という意味らしいのですが、ここからどうすればいいかわかりません、教えて下さい!
self.frame = CGRect(0,0, UIScreen.main.bounds.size.width, 80)
と変更してみましたが、新たなエラーが出てしまいました。
エラー:Argument labels '(_:, _:, _:, _:)' do not match any available overloads
<ViewController.swift>
import UIKit
class ViewController: UIViewController {
//ここに関連づけをした。
@IBOutlet weak var testNavigationBar: UINavigationBar!
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
}