Get rid of some crack
Change-Id: I9806eb87e8d679c3b37de9cf7b87e26c3d4b5387
This commit is contained in:
parent
c755095112
commit
f0fb30e7d0
@ -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];
|
||||
|
@ -15,7 +15,6 @@
|
||||
{
|
||||
@public
|
||||
UITextView* textView;
|
||||
CGRect applicationFrame;
|
||||
}
|
||||
- (void)drawRect:(CGRect)rect;
|
||||
- (void)tapGesture:(UITapGestureRecognizer *)gestureRecognizer;
|
||||
|
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user