I have a UITableView
which have custom cells with UITextField
s in them. My UITableView
is defined on my MainViewController
, while my cells are defined in the CustomCell
class. Each time I press a button, a new cell is created. I am having trouble making my cell's UITextField
resign first responder, since cells are dynamically added and defined in a different class than the main controller. How do I do that? Thanks a lot!
Asked
Active
Viewed 1,235 times
1

Fabio
- 3,015
- 2
- 29
- 49
1 Answers
4
Tell the UITableView to endEditing:
.

matt
- 515,959
- 87
- 875
- 1,141
-
wow, ty very much, I thought I had to tell the specific `UITextField` from the specific `UITableViewCell` to end editing. You, sir, made my night. – Fabio Apr 09 '13 at 02:43
-
1It came from my book! Last sentence of 4th paragraph of this section: http://www.apeth.com/iOSBook/ch23.html#_summoning_and_dismissing_the_keyboard – matt Apr 09 '13 at 03:26
-
Is it possible to have your book sent to Brazil? – Fabio Apr 09 '13 at 12:02
-
It's a URL; all you have to do is click it. Amazing, the technology they've got these days. – matt Apr 09 '13 at 14:22
-
"This is a full free preview of my book, Programming iOS 6, by Matt Neuburg. Please report errors to me. If this free preview has helped you, please consider rewarding my time and effort by buying the actual book! You can find it in published form at http://shop.oreilly.com/product/0636920029717.do. Copyright 2013 Matt Neuburg."I was actually thinking of buying it if the print version could be sent to Brazil... – Fabio Apr 09 '13 at 14:51