Here is the code where I'm getting the error:
for (key, value) in info {
let fieldValue: AnyObject? = value
if (!fieldValue || fieldValue?.length == 0) { // this line gives the error
informationComplete = false;
}
}
This is what XCode suggests I use which causes another error:
for (key, value) in info {
let fieldValue: AnyObject? = value
if ((!fieldValue || fieldValue?.length == 0) != nil) { //bool not convertible to string
informationComplete = false;
}
}
Help is appreciated.
Thanks for your time