mardi 7 juillet 2015

How to test UITextView if it's nil in Swift?

I m trying to operate a uitextview in GCD, but it sometimes is nil.

when i write the following code, build failed.

if myUITextview==nil
{
     ...           
}

the error message is: Binary operator '==' cannot be applied to operands of type 'UITextView' and 'nil'

Any one knows the reason will be appreciated. thanks a lot...

Aucun commentaire:

Enregistrer un commentaire