プログラミングを勉強し始めて1ヶ月立たない者です。
今、アプリを使っているのですが、
その中で日付を表示させ用としている時に、
Cannot convert value of type 'UILabel!' to expected argument type 'String'
のエラーが出てしまいました。
どう解決していいのか分かりません。
以下コードです。
import UIKit class ViewController: UIViewController ,UITableViewDelegate { @IBOutlet weak var Date: UILabel! @IBOutlet weak var MonthlyMoney: UILabel! @IBOutlet weak var List: UITableView! @IBAction func addList(_ sender: Any) { } @IBOutlet weak var balance: UILabel! @IBAction func goSetting(_ sender: Any) { } @IBOutlet weak var goCalendar: UIButton! override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view, typically from a nib. func getNow() -> Date { _ = Date let formatter :DateFormatter = DateFormatter() formatter.dateFormat = "yyyyMMdd" return formatter.date(from: Date)! as Date } →エラー発生 super.didReceiveMemoryWarning() // Dispose of any resources that can be recreated. } }
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。