My personal rule is always with zero warnings .
Better than sorry.
Is contacta Optional? If so...
You can use optional binding :
if let contactInt = userSFOList[selectRow].contact as? Int {
destination.contact = contactInt
}
Or the Nil-Coalescing statement :
destination.contact = userSFOList[selectedRow].contact.intValue ?? <Your default Int here>
guard, @Kamil.S, :
guard let nameVar = userSFOList[selectedRow].name,
let imageVar = userSFOList[selectedRow].image,
let contactVar = contact as? Int else {
}
destination.nameVar = nameVar
destination.imageOneURL = imageVar
destination.contact = contactVar