UItextField get the value it says you cannot unwrap the nil value error iOS swift

Problem:

I had a problem that when i tap the button it will print the textfield text but it shows unwrap the value nil.

Solution:

First thing that you can check the outlet connection for the textfield.

Second if you are using the tableview check the UITableViewDelegate and UITableViewDatasource
are set in your tableView.Then load the data in the textfield then check it it will works.

Comments

Popular posts from this blog

Invalid bundle error while upload the app to the app Store

Saved Image in document directory and save path in coredata not able to fetch the image file iOS swift