Closed bakshioye closed 4 years ago
Okay got it. In case anyone needs the answer in future, I'll just put it here
For assigning a value, use one of the initialisers
finalSearchField.inputValue = AnyCodable(stringLiteral: )
and if you want to fetch the value that is for a property that is declared AnyCodable
, use .value
for that property, like :
finalSearchField.inputValue?.value
and then cast it to any value you want like to String
usingas? String
I am trying to assign a
String
value to a property that has a typeAnyCodable
but cannot assign it. Any way I can assign the value to the property?