- Small fix for debug view frame ios-revival
authorantonc27 <antonc27@mail.ru>
Sat, 15 Aug 2015 01:44:21 +0200
branchios-revival
changeset 11124 f4e3bf03cc35
parent 11123 bd58a851eb8d
child 11125 432601e160b4
- Small fix for debug view frame Note: Still need to handle autorotation here
project_files/HedgewarsMobile/Classes/MainMenuViewController.m
--- a/project_files/HedgewarsMobile/Classes/MainMenuViewController.m	Sat Aug 15 01:40:06 2015 +0200
+++ b/project_files/HedgewarsMobile/Classes/MainMenuViewController.m	Sat Aug 15 01:44:21 2015 +0200
@@ -127,7 +127,7 @@
                 debugStr = [[NSString alloc] initWithContentsOfFile:DEBUG_FILE()];
             else
                 debugStr = [[NSString alloc] initWithString:@"Here be log"];
-            UITextView *scroll = [[UITextView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.height, self.view.frame.size.width)];
+            UITextView *scroll = [[UITextView alloc] initWithFrame:self.view.frame];
             scroll.text = debugStr;
             [debugStr release];
             scroll.editable = NO;
@@ -136,7 +136,7 @@
             UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
             [btn addTarget:scroll action:@selector(removeFromSuperview) forControlEvents:UIControlEventTouchUpInside];
             [btn addTarget:btn action:@selector(removeFromSuperview) forControlEvents:UIControlEventTouchUpInside];
-            btn.frame = CGRectMake(self.view.frame.size.height-58, -6, 64, 64);
+            btn.frame = CGRectMake(self.view.frame.size.width-58, -6, 64, 64);
             btn.backgroundColor = [UIColor blackColor];
             btn.titleLabel.textColor = [UIColor whiteColor];
             btn.titleLabel.textAlignment = UITextAlignmentCenter;