Optional type '@lvalue ' cannot be used as a boolean; test for '!= nil' instead
With optional booleans it's needed to make the check explicit:
if boolean == true {
...
}
Otherwise you can unwrap the optional:
if boolean! {
...
}
Optional type '@lvalue ' cannot be used as a boolean; test for '!= nil' instead
With optional booleans it's needed to make the check explicit:
if boolean == true {
...
}
Otherwise you can unwrap the optional:
if boolean! {
...
}