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 06-08-2009, 02:30 AM   #1 (permalink)
New Member
 
Join Date: Apr 2009
Posts: 4
Default Hide keyboard when user touches uiview

Hi All,

I have a UIView with multiple text boxes. Now i have used delegates to change the responder from from text field to another. In this case my key board goes off when the user comes to last text field.

but now i want to hide my key board when the user touches UIView(touches any where on screen apart from text boxes). Can some one help me with this.

Thanks
nareshbojja is offline   Reply With Quote
Old 06-08-2009, 02:59 AM   #2 (permalink)
Latest app on AppStore
 
mgales's Avatar
 
Join Date: Jun 2009
Location: Basingstoke, Hampshire. UK
Posts: 119
Default

I've seen other tutorials where a button is placed on the view that covers the entire view area. This is then used with the resignFirstResponder method to remove the keyboard from screen. This option was used when the keyboard was the telephone pad type where there is no Done button to dismiss it.

Hope this helps.
mgales is offline   Reply With Quote
Old 06-08-2009, 03:17 AM   #3 (permalink)
New Member
 
Join Date: Apr 2009
Posts: 4
Default

Quote:
Originally Posted by mgales View Post
I've seen other tutorials where a button is placed on the view that covers the entire view area. This is then used with the resignFirstResponder method to remove the keyboard from screen. This option was used when the keyboard was the telephone pad type where there is no Done button to dismiss it.

Hope this helps.
Hey Thanks for your reply...i also found the same answer in some documentation. But i am using UITableview which contains text fields. how to do it in thi case???
nareshbojja is offline   Reply With Quote
Old 06-08-2009, 03:26 AM   #4 (permalink)
Latest app on AppStore
 
mgales's Avatar
 
Join Date: Jun 2009
Location: Basingstoke, Hampshire. UK
Posts: 119
Default

Quote:
Originally Posted by nareshbojja View Post
Hey Thanks for your reply...i also found the same answer in some documentation. But i am using UITableview which contains text fields. how to do it in thi case???
I'm affraid that I cannot help you any further. I am completely new to the SDK, and am learning as I go, through online video tutorials, etc, and the mountain of books I have got.

I am having issues with TableViews at present too.

Sorry I can't be of more use.
mgales is offline   Reply With Quote
Old 06-22-2009, 07:25 AM   #5 (permalink)
Registered Member
 
Join Date: Feb 2009
Posts: 60
Default

Quote:
Originally Posted by mgales View Post
I'm affraid that I cannot help you any further. I am completely new to the SDK, and am learning as I go, through online video tutorials, etc, and the mountain of books I have got.

I am having issues with TableViews at present too.

Sorry I can't be of more use.
If you want a good example and explanation have a look over here: JC Developer World - Removing Keyboard when Done
__________________
JeromeC is offline   Reply With Quote
Old 06-22-2009, 03:30 PM   #6 (permalink)
Gold Orange
 
orange gold's Avatar
 
Join Date: Sep 2008
Posts: 679
Default

Code:
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
	UITouch *touch = [[event allTouches] anyObject];
        [nameoftextfield resignFirstResponder];
}
orange gold is offline   Reply With Quote
Reply

Bookmarks

Tags
keyboard, uiview

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: 259
24 members and 235 guests
ADY, AragornSG, bookesp, chillyh, dacapo, Dani77, Davey555, Desert Diva, Dominus, glenn_sayers, HemiMG, JasonR, LEARN2MAKE, M.A.S., marshusensei, mer10, nobre84, Oral B, prchn4christ, Raggou, Rudy, themathminister, theone8one
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,885
Threads: 89,230
Posts: 380,765
Top Poster: BrianSlick (7,129)
Welcome to our newest member, bookesp
Powered by vBadvanced CMPS v3.1.0

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