From: Grant Paul Date: Thu, 10 Feb 2011 00:56:55 +0000 (-0800) Subject: Fix rotation support in keyboard resizing. X-Git-Tag: v1.1.0%b1~370 X-Git-Url: https://git.saurik.com/cydia.git/commitdiff_plain/389911105142af7865ef60a5abc0d869bca8d1ca?ds=inline Fix rotation support in keyboard resizing. --- 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];