I'm trying to make a variable with AppStorage, but I got an error : " No exact matches in call to initializer "
@AppStorage("onTick") var onTick : CGFloat = 1
How can I fix it, is there a workaround on this ?
I'm trying to make a variable with AppStorage, but I got an error : " No exact matches in call to initializer "
@AppStorage("onTick") var onTick : CGFloat = 1
How can I fix it, is there a workaround on this ?
As per @AppStorage
definition you can find the following allowed data types.
Bool
Int
String
URL
Double
Data
enum with Int or String
Bool?
Int?
String?
URL?
Double?
Data?
optional enum with Int or String
You should use Double
rather than CGFloat
.