I have been making an app in Swift but I keep getting an error in my TableViewController class. I could not find any way to fix this and kept getting this error :
To avoid this Error, must have to make sure one importing thing while declaration of Object :
var isActive: Bool?
? is the important to add, so now you can check nil values whenever you are, accessing this variable named isActive like below:
if isActive == nilif let _isActive = isActive as Bool?So Optional values must be declared with the ?.