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

View Single Post
Old 07-02-2008, 08:16 AM   #6 (permalink)
pendraggon87
New Member
 
Join Date: Jul 2008
Posts: 31
Default Re: Keyboard hides text field - how do I fix this?

Quote:
Originally Posted by jonc
I am assuming this is in the controller of the view with the text field and that it isn't a table view.

Code:
self.view.frame = CGRectMake(self.view.frame.origin.x, self.view.frame.origin.y - 100, self.view.frame.size.width, self.view.frame.size.height);
Notice where I subtract 100. That would move it 100 pixels up. Find a value that works well for your view. Add that same value back to origin.y when don and your view will move back down. Throw some animation code around it to make it move smoothly. I have found the keyboard pops up and down in about 0.25 seconds if you want the timing to match the keyboard.
Thanks! That helped a lot. I liked how Safari would always focus the text above the keyboard, and that helped.
pendraggon87 is offline   Reply With Quote
 

» Advertisements
» Online Users: 576
21 members and 555 guests
Briger, chaseacton, ckgni, crimsoncat, Dani77, devangvyas, diyora, Domele, Gambit, kvu, learningtocode, nakr, nt.hai, oceanlablight, pavanindira, PhillipJames, roberthayden, smartbot, spiderguy84, StormFactory, suresk
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,778
Threads: 89,203
Posts: 380,596
Top Poster: BrianSlick (7,129)
Welcome to our newest member, roberthayden
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 11:15 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.