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 Oct 27, 2011, 03:10 PM   #1
loon3y
macrumors 6502
 
Join Date: Oct 2011
Hiding Keyboard In ScrollView

how can u hide the keyboard when ur in scrollview by touching the background?


i have textfields but i want the user to be able to hide the keyboard while touching the background, I've already implemented the hide on return key but i know customers are going to complain.
__________________
AppleLife
13" MacBook Pro 2.4 GHz 8 GB Ram 250 GB HD, iPhone 4/S 64 GB, iPhone 3GS 16 GB, iPad 3 16 GB Wi-Fi, iPad 2 16 GB Wi-Fi, Apple TV 3
loon3y is offline   0 Reply With Quote
Old Oct 27, 2011, 03:14 PM   #2
ArtOfWarfare
macrumors 68040
 
ArtOfWarfare's Avatar
 
Join Date: Nov 2007
Send a message via Skype™ to ArtOfWarfare
When the background receives a touch, send resignFirstResponder to whichever textfield is the one that the user is currently typing in.
__________________
Battery Status - On the Mac App Store
The only app that'll estimate when your wireless devices will need their batteries changed.
Like it on Facebook!
ArtOfWarfare is offline   0 Reply With Quote
Old Oct 27, 2011, 03:23 PM   #3
loon3y
Thread Starter
macrumors 6502
 
Join Date: Oct 2011
Quote:
Originally Posted by ArtOfWarfare View Post
When the background receives a touch, send resignFirstResponder to whichever textfield is the one that the user is currently typing in.
would it be something like this?

Code:
- (IBAction)backgroundTouch:(id)sender {
    [displayText resignFirstResponder];
}
__________________
AppleLife
13" MacBook Pro 2.4 GHz 8 GB Ram 250 GB HD, iPhone 4/S 64 GB, iPhone 3GS 16 GB, iPad 3 16 GB Wi-Fi, iPad 2 16 GB Wi-Fi, Apple TV 3
loon3y is offline   0 Reply With Quote
Old Oct 27, 2011, 03:34 PM   #4
loon3y
Thread Starter
macrumors 6502
 
Join Date: Oct 2011
Quote:
Originally Posted by loon3y View Post
would it be something like this?

Code:
- (IBAction)backgroundTouch:(id)sender {
    [displayText resignFirstResponder];
}


this code didn't work for scroll view, it works for regular view.
__________________
AppleLife
13" MacBook Pro 2.4 GHz 8 GB Ram 250 GB HD, iPhone 4/S 64 GB, iPhone 3GS 16 GB, iPad 3 16 GB Wi-Fi, iPad 2 16 GB Wi-Fi, Apple TV 3
loon3y 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

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

Forum Jump

Similar Threads
thread Thread Starter Forum Replies Last Post
Hide the keyboard in Messages app ru4real iOS 5 and earlier 4 Oct 12, 2011 07:09 PM
Cydia Tweak to hide keyboard in Messages Mr_Brightside_@ Jailbreaks and iOS Hacks 5 Jun 28, 2011 02:31 PM
iOS 5: scroll up to hide keyboard in Messages? Really, Apple? Edit: sorry, everyone. PBF iPhone 28 Jun 25, 2011 02:18 PM
Hiding keyboard in iPad with UITextView , can do this in iphone not iPad. int3rc3pt0r iPhone/iPad Programming 2 Oct 31, 2010 03:23 PM
centred image scalled in scrollview ghanalupo iPhone/iPad Programming 0 Sep 17, 2009 08:11 AM


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

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

Mobile Version | Fixed | Fluid | Fluid HD
Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

Privacy / DMCA contact / Affiliate and FTC Disclosure
Copyright 2002-2013, MacRumors.com, LLC