I want my iOS app to pass to a URL the text the user types. The relevant code is pasted below. WHen I run the app, the text does not get assigned any value. It stays as null.
You should get some basics of iOS programming first.
Why are you creating a totally new custom cell that is irrelevant to your UITableView
? When you create it that way, it's a totally new UITableViewCell
.
You should connect it to it first, get its NSIndexPath
and then operate with it and do what you want.
BTW, if you want to see the text of UITextfield you should NSLog
myTextField.text
And you could easily write viewWithTag:sender.tag
, no need to create an extra ivar here
I assume that you have created that view using the interface builder, probably all you need is to connect that textfield as an IBOutlet and access the value.
IBOutlet is the key word here, search for it and you will find really fast the way to do it.
Check this link.