From 389911105142af7865ef60a5abc0d869bca8d1ca Mon Sep 17 00:00:00 2001 From: Grant Paul Date: Wed, 9 Feb 2011 16:56:55 -0800 Subject: [PATCH] Fix rotation support in keyboard resizing. --- MobileCydia.mm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/MobileCydia.mm b/MobileCydia.mm index 0df74e68..17b17426 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -5646,7 +5646,10 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { [[[notification userInfo] objectForKey:UIKeyboardAnimationDurationUserInfoKey] getValue:&duration]; CGRect kbframe = CGRectMake(round(center.x - bounds.size.width / 2.0), round(center.y - bounds.size.height / 2.0), bounds.size.width, bounds.size.height); - CGRect viewframe = [[[self view] window] convertRect:[self view].frame fromView:[[self view] superview]]; + UIViewController *base = self; + while ([base parentViewController] != nil) + base = [base parentViewController]; + CGRect viewframe = [[base view] convertRect:[list_ frame] fromView:[list_ superview]]; CGRect intersection = CGRectIntersection(viewframe, kbframe); [self resizeForKeyboardBounds:intersection duration:duration curve:curve]; -- 2.45.2