Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Jan 16, 2009, 11:50 AM   #1
mcnuggets
macrumors newbie
 
Join Date: Jan 2009
Keyboard is hiding UITextField

If I place a text field and click on it... sometimes the keyboard that appears hides the textfield if the UITextField is a little bit on the bottom. Is there a way to fix this?
mcnuggets is offline   0 Reply With Quote
Old Jan 16, 2009, 11:52 AM   #2
detz
macrumors 65816
 
Join Date: Jun 2007
Scroll the view up so it's visible or make sure the textfield is also high enough to not get hidden.
detz is offline   0 Reply With Quote
Old Jan 16, 2009, 12:15 PM   #3
mcnuggets
Thread Starter
macrumors newbie
 
Join Date: Jan 2009
Quote:
Originally Posted by detz View Post
Scroll the view up so it's visible or make sure the textfield is also high enough to not get hidden.
Well moving the textfield higher would be a simple fix. But what if your entire view is filled with textfields (like 8 fields). So basically if I click on the last field... i want the view to automatically scroll up so that my keyboard will not hide the textview.
mcnuggets is offline   0 Reply With Quote
Old Jan 16, 2009, 12:29 PM   #4
detz
macrumors 65816
 
Join Date: Jun 2007
Yeah, add all the textfields to a UIScrollView and if the textfield is far enough down when the user selects it scroll the view up so it's visible and back down they they're done.
detz is offline   0 Reply With Quote
Old Jan 16, 2009, 12:47 PM   #5
dejo
Moderator
 
dejo's Avatar
 
Join Date: Sep 2004
Location: The Centennial State
I think your answer lies here: Sliding UITextFields around to avoid the keyboard
dejo is offline   0 Reply With Quote
Old Jan 16, 2009, 12:47 PM   #6
jeremy.king
macrumors 603
 
jeremy.king's Avatar
 
Join Date: Jul 2002
Location: Fox Lake, IL
http://developer.apple.com/iphone/li...07072-CH20-SW7
jeremy.king is offline   0 Reply With Quote
Old Jan 16, 2009, 01:04 PM   #7
mcnuggets
Thread Starter
macrumors newbie
 
Join Date: Jan 2009
Quote:
Originally Posted by detz View Post
Yeah, add all the textfields to a UIScrollView and if the textfield is far enough down when the user selects it scroll the view up so it's visible and back down they they're done.
I created a test app and made the view into a UIScrollView. In that view I added one UIViewText all the way at the bottom to see if I can scroll up. It's still not working. When I click on the Text field... the keyboard is hidding the field. Do i have to hold a keyboard key when I'm scrolling (ex: like the pinch feature on Iphone simulator)?

By the way thanks for answering my questions. If it's not to much to ask, can you create a test app and attach the code?
mcnuggets is offline   0 Reply With Quote
Old Jan 16, 2009, 01:10 PM   #8
mcnuggets
Thread Starter
macrumors newbie
 
Join Date: Jan 2009
Quote:
Originally Posted by dejo View Post
Quote:
Originally Posted by kingjr3 View Post
Thank you dejo and kingjr3. I got the chills when I saw your replies. It's exactly what i was looking for. Let me check these out. Again thanks. This forum is awesome I tell you.
mcnuggets is offline   0 Reply With Quote
Old Jan 16, 2009, 01:10 PM   #9
jeremy.king
macrumors 603
 
jeremy.king's Avatar
 
Join Date: Jul 2002
Location: Fox Lake, IL
no problem - I highly recommend you read the IAPG in its entirety. Lots of good info for future reference
jeremy.king is offline   0 Reply With Quote
Old Jan 16, 2009, 01:57 PM   #10
mcnuggets
Thread Starter
macrumors newbie
 
Join Date: Jan 2009
Quote:
Originally Posted by dejo View Post
I wish he provided the source code for this ... but it's good no doubt. I'm trying it now.
mcnuggets is offline   0 Reply With Quote
Old Jan 16, 2009, 02:00 PM   #11
dejo
Moderator
 
dejo's Avatar
 
Join Date: Sep 2004
Location: The Centennial State
Quote:
Originally Posted by mcnuggets View Post
I wish he provided the source code for this ... but it's good no doubt. I'm trying it now.
The key is to incorporate the concepts into your own code. Think of it as a "educational" tutorial rather than a "paint-by-numbers" tutorial.
dejo is offline   0 Reply With Quote
Old Apr 25, 2009, 02:26 PM   #12
sebgaag
macrumors newbie
 
Join Date: Apr 2009
I'm lazy too

Quote:
Originally Posted by mcnuggets View Post
I wish he provided the source code for this ... but it's good no doubt. I'm trying it now.
Hi, I had the exact same issue and this link helped me out. As you I always enjoy when the source code is attached, I'm too lazy and chances are I won't figure it out by myself

Anyways this time it worked out fine for me so here's my source code based on: http://cocoawithlove.com/2008/10/sli...-to-avoid.html

Hope it will help someone else
sebgaag is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
hiding Tech198 iPad Apps 0 Apr 26, 2013 02:13 AM
Resolved: Add content form a UITextfield to an NSMutableArray everytime a button is clicked fstigre iPhone/iPad Programming 13 Nov 17, 2012 09:07 AM
Need help with a UITextField method *help* iJustinCabral iPhone/iPad Programming 11 Aug 21, 2012 07:19 PM
UITextField Disappearing luke3 iPhone/iPad Programming 0 Jul 5, 2012 02:50 PM
Hiding/dismissing keyboard. ubelai iOS 5 and earlier 2 Jun 5, 2012 07:55 AM

Forum Jump

All times are GMT -5. The time now is 04:27 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC