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 09-14-2009, 04:36 AM   #1 (permalink)
Registered Member
 
Join Date: Sep 2009
Location: Los Angeles
Posts: 12
Default OS3.1 double keyboard problem

I am having a problem that just showed up with OS 3.1.
If I click in a UITextField and have the keyboard come up, then rotate my phone to Landscape, the keyboard switches to landscape version of keyboard, which is good. But then if I rotate back to Portrait, I get two keyboards, one above the other!

I tried compiling in 3.0 and this problem doesn't happen in that version. Is anybody else getting this problem or know what might be causing it?

Thanks.
Harris.
harris is offline   Reply With Quote
Old 10-21-2009, 02:53 PM   #2 (permalink)
Registered Member
 
Join Date: Jun 2009
Posts: 3
Send a message via MSN to Alger Cheng
Default

I have the same problem, who can help us?

Thanks

Alger
Alger Cheng is offline   Reply With Quote
Old 01-22-2010, 10:49 AM   #3 (permalink)
Registered Member
 
Join Date: Nov 2008
Posts: 791
Default

Anyone figured a solution to this?
I was having problems of UITableViewCells not drawing themselves correctly when rotating, solved it by sending a reloadData message, but this problem arose instead.
nobre84 is offline   Reply With Quote
Old 02-19-2010, 03:22 AM   #4 (permalink)
Registered Member
 
Join Date: Jan 2009
Location: California
Posts: 198
Default

Let me bump this up. I'm stuck with this too, so if any of you figured it out, please post here.
__________________
Check out my apps:

Contacts Journal

Contacts Journal Lite

Contacts Journal - iPad Edition

Contact Notes

Also visit my Tumblr blog about iPhone development.
zulfishah is offline   Reply With Quote
Old 02-20-2010, 01:30 AM   #5 (permalink)
Registered Member
 
Join Date: Jan 2009
Location: California
Posts: 198
Default

After spending a whole day on this, I finally figured it out. I needed to send resignFirstResponder to the textfields that were keeping the keyboard out, but it ONLY works if you do it before you call the resignFirstResponder inside shouldAutorotateToInterfaceOrientation, and call [self.tableView reloadData] inside didRotateFromInterfaceOrientation

Don't call either of these in willAnimateRotationToInterfaceOrientation. Don't know why exactly, but that's the way it is. I found this out after much trial-and-error. Hope it helps someone in the future.
__________________
Check out my apps:

Contacts Journal

Contacts Journal Lite

Contacts Journal - iPad Edition

Contact Notes

Also visit my Tumblr blog about iPhone development.
zulfishah is offline   Reply With Quote
Old 09-11-2010, 02:26 PM   #6 (permalink)
Registered Member
 
Join Date: Sep 2010
Posts: 1
Default Excellent tip

Quote:
Originally Posted by zulfishah View Post
After spending a whole day on this, I finally figured it out. I needed to send resignFirstResponder to the textfields that were keeping the keyboard out, but it ONLY works if you do it before you call the resignFirstResponder inside shouldAutorotateToInterfaceOrientation, and call [self.tableView reloadData] inside didRotateFromInterfaceOrientation

Don't call either of these in willAnimateRotationToInterfaceOrientation. Don't know why exactly, but that's the way it is. I found this out after much trial-and-error. Hope it helps someone in the future.
This is an excellent tip. It appears that there is a bug in 3.1.x that is causing this problem. iOS 4.0 appears to do the right thing.

If I had something to add is the following. If you resign the first responder and then become the first responder again, there is a visible transition as the keyboard disappears and reappears after the rotation.

To avoid this issue, I created a hidden textField.
Then did the following:

Code:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
 	[hiddenTextField becomeFirstResponder];
	return YES;
}

- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation {
	[self.tableView reloadData];
	[textViewBeingEdited becomeFirstResponder];
}
schuler1 is offline   Reply With Quote
Old 08-15-2011, 08:19 PM   #7 (permalink)
Registered Member
 
Join Date: Oct 2009
Posts: 1
Default Thank you!

Quote:
Originally Posted by zulfishah View Post
After spending a whole day on this, I finally figured it out. I needed to send resignFirstResponder to the textfields that were keeping the keyboard out, but it ONLY works if you do it before you call the resignFirstResponder inside shouldAutorotateToInterfaceOrientation, and call [self.tableView reloadData] inside didRotateFromInterfaceOrientation

Don't call either of these in willAnimateRotationToInterfaceOrientation. Don't know why exactly, but that's the way it is. I found this out after much trial-and-error. Hope it helps someone in the future.
My app (DVPRemote) supports iOS devices that run iOS Version 3.1.3 and higher. I was pulling out my hair trying to get code that works fine on a iOS 4.x that provides support for a landscape keyboard to work on iOS 3.1.3. I had multiple keyboards stacked on top of each other, stretched keyboards, partial keyboards, etc. Nothing seemed to work until I saw your post. By simply moving the resignFirstResponder to the shouldAutorotateToInterfaceOrientation rather than in the didRotate notification method where I previously had it, everything works now. Thank you!
pirey4 is offline   Reply With Quote
Reply

Bookmarks

Tags
3.1, double, keyboard, os 3.1

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: 330
22 members and 308 guests
@sandris, ADY, BrianSlick, dacapo, Dani77, Dattee, dre, HDshot, HemiMG, JasonR, MarkC, mer10, nibeck, prchn4christ, ryandb2, spiderguy84, themathminister, timle8n1, tomtom100, viniciusdamone, vogueestylee, vvenkatachallam
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,883
Threads: 89,229
Posts: 380,763
Top Poster: BrianSlick (7,129)
Welcome to our newest member, vvenkatachallam
Powered by vBadvanced CMPS v3.1.0

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