Hi i need help with making lazy property.
I have this code:
lazy var dateFormat: DateFormatter =
{
let formatter = DateFormatter()
formatter.locale = NSLocale.current
formatter.dateFormat = "dd/MM/YYYY hh:mm"
return formatter
}()
And when using it in Text(date, formatter: self.dateFormat)
I am getting this error Cannot use mutating getter on immutable value: 'self' is immutable
