He guys, I know there are a lot of similar questions but the don't help me, so please give me a advice what is wrong/what I can do to solve this error
Declaration:
Usage of variables with the error:
He guys, I know there are a lot of similar questions but the don't help me, so please give me a advice what is wrong/what I can do to solve this error
Declaration:
Usage of variables with the error:
You try to use property values inside other property values, but properties are initialised before type init
called, so instance is not ready yet, ie dependent properties might not be ready for such operation and compiler prevents such try.
The easiest solution for your case is to make dependent property lazy
, because lazy will be initialised on first call, so instance is ready at that time:
lazy var TableViewDetailValues = [ ... ]
also it is possible to make it calculable:
var TableViewDetailValues: [String] { [ ... ] }