I'm new in swift.
I have a object of entity example: var person=Person()
person have name, but docent have a lastName. how to check if person.lastName is nil, I have tried but dosen't work . please help
var lastName:String?;
if (person.lastName == nil)
{
//Do something.
}
else
{
//Do something
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.