ios - Checking if text fields are empty cause error in Swift 2 -


i trying check if textbox has no value.

when this:

if(useremail?.isempty || userpassword?.isempty || userpasswordrepeat?.isempty)   

i following error enter image description here

i tried adding "?" before ".isempty" error won't go away enter image description here

any ideas?

try this....

if txtemail.text?.isempty == true || txtpassword.text?.isempty == true || txtrepassword.text?.isempty == true{         print("true") } 

Comments

Popular posts from this blog

html - Difficulties with background-image property -

visual studio code - What does the isShellCommand property actually do and how should you use it? -

ios - Segue not passing data between ViewControllers -