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.
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
Post a Comment