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, 12:36 AM   #5 (permalink)
jonc
Registered Member
 
Join Date: Apr 2008
Location: Colorado
Posts: 313
Send a message via AIM to jonc
Default Re: Keyboard hides text field - how do I fix this?

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.
jonc is offline   Reply With Quote
 

» Advertisements
» Stats
Members: 158,779
Threads: 89,203
Posts: 380,597
Top Poster: BrianSlick (7,129)
Welcome to our newest member, savvycom
Powered by vBadvanced CMPS v3.1.0

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