Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

lucasgladding

macrumors 6502
Original poster
Feb 16, 2007
319
1
Waterloo, Ontario
Has anyone had problems with UITextFields nested inside UITableViewCells? Specifically, the field does not track touch movements for changing the insertion point. If I move my finger down before dragging left or right, the events are tracked they should be. If moved left or right first, the cursor (and magnifying glass) freezes and disappears only if I touch somewhere else on the screen.

If anyone has any advice for debugging the problem, help would be greatly appreciated.

Thanks in advance
 

lucasgladding

macrumors 6502
Original poster
Feb 16, 2007
319
1
Waterloo, Ontario
In case anyone else experiences the problem, it is caused by the UITableView. The UIScrollView class is somehow interfering with the moved events. The UICatalog example disables scrolling on the UITableView containing the UITextFields. Beside the tableView.scrollEnabled = NO line is the note:

"no scrolling in this case, we don't want to interfere with touch events on edit fields"

I hope this helps at least one other developer. I don't recall seeing mention of this issue in any release notes and didn't notice the comment until my 5th or 6th time through the UICatalog example.
 

sdarlington

macrumors newbie
Sep 4, 2008
4
0
UK
Unfortunately this didn't work on later versions of the SDK (though the problem still persists, even in Apple's sample code). The solution I found is to set the table's editable property to YES. Took me a couple of weeks to track this down! See here for more details.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.