diff --git a/ios/experimental/LibreOffice/LibreOffice/AppDelegate.m b/ios/experimental/LibreOffice/LibreOffice/AppDelegate.m index 49401651e9f2..11d4642b0176 100644 --- a/ios/experimental/LibreOffice/LibreOffice/AppDelegate.m +++ b/ios/experimental/LibreOffice/LibreOffice/AppDelegate.m @@ -51,9 +51,6 @@ static BOOL keyboardShows; vc.view = self.view; theView = self.view; - // This is baaad - theView->applicationFrame = applicationFrame; - self.view->textView = [[UITextView alloc] initWithFrame: r]; self.view->textView.autocapitalizationType = UITextAutocapitalizationTypeNone; self.view->textView.alpha = 0; @@ -71,9 +68,9 @@ static BOOL keyboardShows; NSLog(@"statusBarOrientation: %ld", (long) [[UIApplication sharedApplication] statusBarOrientation]); if (UIInterfaceOrientationIsLandscape([[UIApplication sharedApplication] statusBarOrientation])) - touch_lo_set_view_size(applicationFrame.size.height, applicationFrame.size.width); + touch_lo_set_view_size(r.size.height, r.size.width); else - touch_lo_set_view_size(applicationFrame.size.width, applicationFrame.size.height); + touch_lo_set_view_size(r.size.width, r.size.height); [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillShow:) name:UIKeyboardWillShowNotification object:nil]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardDidHide:) name:UIKeyboardDidHideNotification object:nil]; diff --git a/ios/experimental/LibreOffice/LibreOffice/View.h b/ios/experimental/LibreOffice/LibreOffice/View.h index 61c816923bc8..aecc606425be 100644 --- a/ios/experimental/LibreOffice/LibreOffice/View.h +++ b/ios/experimental/LibreOffice/LibreOffice/View.h @@ -15,7 +15,6 @@ { @public UITextView* textView; - CGRect applicationFrame; } - (void)drawRect:(CGRect)rect; - (void)tapGesture:(UITapGestureRecognizer *)gestureRecognizer; diff --git a/ios/experimental/LibreOffice/LibreOffice/View.m b/ios/experimental/LibreOffice/LibreOffice/View.m index f4fec1df4e35..48ec11a48a28 100644 --- a/ios/experimental/LibreOffice/LibreOffice/View.m +++ b/ios/experimental/LibreOffice/LibreOffice/View.m @@ -128,13 +128,7 @@ switch ([[UIApplication sharedApplication] statusBarOrientation]) { case UIInterfaceOrientationPortrait: - // No idea why I need to do this ugly subtraction of - // applicationFrame.origin.y here. The handling of View frame - // and applicationFrame has been a bit of a mystery to me. - // Anyway, unless a Right Way to do this is figured out, - // corresponding hacks are needed for the other orientations, - // too, obiously. - CGContextTranslateCTM(context, 0, self.frame.size.height - applicationFrame.origin.y); + CGContextTranslateCTM(context, 0, self.frame.size.height); CGContextScaleCTM(context, 1, -1); break; case UIInterfaceOrientationLandscapeLeft: