Quote:
Originally Posted by mebarron
----
Thanks very much for your reply.
I do currently have a Button, tied to a BOOL, whose title toggles between "Hide KB" and "Enable KB". Thanks for the HUG heads up.
|
--
I decided the Hide/Enable button is kludgy. I decided to accept
the continuous presence of the KB. The code below needs Orientation
support but I think this is a good start. I hope this helps others trying to
deal with this situation.
Mark
- (void) handleKeyboardWillShow

NSNotification *) note{
NSDictionary *info = [note userInfo];
/*UIKeyboardAnimationCurveUserInfoKey = 0;
UIKeyboardAnimationDurationUserInfoKey = 0.4;
UIKeyboardBoundsUserInfoKey = NSRect: {{0, 0}, {480, 162}};
UIKeyboardCenterBeginUserInfoKey = NSPoint: {240, 559};
UIKeyboardCenterEndUserInfoKey = NSPoint: {240, 239};
*/
NSValue *keyBounds = [info objectForKey:UIKeyboardBoundsUserInfoKey];
CGRect bndKey,tvFrame;
[keyBounds getValue:&bndKey];
/* bndKeys:: NSRect: {{0, 0}, {480, 162}} */ // landscape
tvFrame = pasteIDC_TextView.frame;
tvFrame.size.height -= bndKey.size.height;
[[self pasteIDC_TextView] setFrame:tvFrame];
}