Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Mockup & CodeGen, iPhone & iPad
($9.99)

Make your own iPhone apps
and run them live!
(free)

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 09-23-2009, 06:35 PM   #1 (permalink)
Registered Member
 
Join Date: Sep 2009
Posts: 9
Default Text Exiting In a UITableView

I have a problem. I have a UITableView, and for one of the cells I have an editable UITextField. For the other fields I am populating labels using a UIPickerView/UIDateView.

When editing the text field, the keyboard pops-up, and I have a "Done" key that will resignFirstResponder to make it go away. All works fine!

The issue is, should a user not press the "Done" key and simply select another table row, the UIPickerView pops-up behind the keyboard, causing a potentially confusing situation (i.e. the user can't see the picker).

So, my question is how can I call resignFirstResponder on a UITextField that exists as a subview of a table cell? or is there another way to force the end of editing?
Thanks for any suggestions
simon88 is offline   Reply With Quote
Old 09-23-2009, 08:03 PM   #2 (permalink)
Registered Member
 
pjlocko's Avatar
 
Join Date: Jun 2009
Location: SoCal
Posts: 63
Default

there may be a way around what you are doing but I decided to go a slightly differnt route to make it look cleaner and leave less room for problems.

I have an edit button that allows the table to go into edit mode. When a cell is selected i show a subview with a text box and make the text box the first responder so the keyboard is already there waiting for input. I also have a custom button (invisible) that is the size of the view so I can capture a screen click as well as the done button. The user then has to press the done button or screen click to remove the subview and get back to the table view. Once back at the table view, I have a save button to make the permanent change to a sqlite db.

Like I said, there may be a better way - but this way forces the user to do things my way.

Good luck

Paul
pjlocko is offline   Reply With Quote
Old 09-24-2009, 09:40 AM   #3 (permalink)
Registered Member
 
Join Date: Sep 2009
Posts: 9
Default

Ah-ha an invisible button, great idea. That would certainly make the editing more user friendly.
Paul, I appreciate the response
Thanks
Simon
simon88 is offline   Reply With Quote
Reply

Bookmarks

Tags
resignfirstresonder, uitableview, uitextfield

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 262
14 members and 248 guests
2WeeksToGo, AdamL, ADY, BrianSlick, Dani77, Dattee, headkaze, mer10, prchn4christ, smithdale87, timle8n1, Touchmint, vigu360
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,879
Threads: 89,228
Posts: 380,747
Top Poster: BrianSlick (7,129)
Welcome to our newest member, mgon987
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 12:51 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0