summaryrefslogtreecommitdiff
path: root/MobileCydia.mm
diff options
context:
space:
mode:
authorGrant Paul <chpwn@chpwn.com>2011-02-09 16:56:55 -0800
committerGrant Paul <chpwn@chpwn.com>2011-02-09 16:56:55 -0800
commit389911105142af7865ef60a5abc0d869bca8d1ca (patch)
treefa528e320ec1c3a9db33fa25fb50eaea9e1fa2b7 /MobileCydia.mm
parentbfb45dcbb4f1be1b8d4e10cc28a746be75d4a76c (diff)
Fix rotation support in keyboard resizing.
Diffstat (limited to 'MobileCydia.mm')
-rw-r--r--MobileCydia.mm5
1 files changed, 4 insertions, 1 deletions
diff --git a/MobileCydia.mm b/MobileCydia.mm
index 0df74e6..17b1742 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];