Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SWIFT

how to check object is nil in swift

if let variableName = abc { // If casting, use, eg, if let var = abc as? NSString
    // variableName will be abc, unwrapped
} else {
    // abc is nil
}
 
PREVIOUS NEXT
Tagged: #check #object #nil #swift
ADD COMMENT
Topic
Name
8+9 =