Advertise Books Events Forum News Social Networking Support Us

sdkIQ for iPhone
($4.99)

Shape Up
($0.99)

Your First iPhone App
($1.99)

iVidCam Free
(free)

Kid Art
($0.99)

iPUBQUIZ
(£1.19)

ArtStudio
($3.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 07-10-2009, 10:51 AM   #1 (permalink)
Registered Member
 
Join Date: Jun 2009
Posts: 121
Default need help with keyboard covering the textfield when i press the textField

ive seen a few tutorials on how to move the view up when the keyboard shows up on the view but im still not getting it , my problem is that i need to have the text fields scroll upward when i choose the textField, right now im using a standard UIView but im not too sure if thats the correct view to use when trying to complete something like this , so ne help would be greatly apprecieated
Esko2300 is offline   Reply With Quote
Old 07-10-2009, 12:01 PM   #2 (permalink)
Registered Member
 
Join Date: Mar 2009
Location: San Francisco, CA
Posts: 152
Default

I feel like we have answered this question for you a million times.

Just use a standard scroll function to scroll your view up when the keyboard is shown. As I have already told you, you will need to register for keyboard events so you know when it is shown, and if it is shown you can then either scroll the view or you can modify the view's frame size. I feel like you should do a little research yourself this question is very common and you have already asked it.

So, again. Go here and look at how they do it and modify it for your needs.

UITableView and keyboard scrolling problem - Stack Overflow

If you are looking for someone to hand you code that will work perfectly for your own implementation you are crazy.
JCooperman is offline   Reply With Quote
Old 07-10-2009, 12:12 PM   #3 (permalink)
Registered Member
 
Join Date: Jun 2009
Posts: 121
Default

Well i did figure put the problem with a little research so sorry for the inconvienence about asking the same question over and over , but i have a few more problems i encountered

heres the code i used to move the frame,
Code:
self.view.frame = CGRectMake(self.view.frame.origin.x, self.view.frame.origin.y - 210, self.view.frame.size.width, self.view.frame.size.height);
that took care of moving the textfields into the view

now to make the textfield at the top of the screen i removed the navigation bar at the top of the screen with
Code:
//i used this method to remove the bar[self.navigationController.navigationBar removeFromSuperview];
Code:
//and this method to remove the bar	
[self.navigationController.navigationBar setHidden:YES];
but when the textField moves to where the navigation bar was , the textfield is still covered like the navigation bar is still there, so is there like a navigationBarTransparent funciton or something like that


also how would i write out in code to check if someone tapped a textField?
Esko2300 is offline   Reply With Quote
Old 07-10-2009, 01:46 PM   #4 (permalink)
/.
 
Join Date: Jun 2009
Location: Los Angeles, CA
Posts: 111
Default

Quote:
Originally Posted by Esko2300 View Post
also how would i write out in code to check if someone tapped a textField?
Look up UITextField Delegates. The one you want is
Code:
- (void)textFieldDidBeginEditing:(UITextField *)textField;
__________________
Harkonian
harkonian is online now   Reply With Quote
Reply

Bookmarks

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


Enter the iPhone App Challenge!  Win $500!
» Advertisements
» Stats
Members: 24,248
Threads: 39,028
Posts: 171,170
Top Poster: smasher (2,571)
Welcome to our newest member, mitch2702
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 10:57 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0