- Fix for autorotation of table view of StatsPageVC ios-revival
authorantonc27 <antonc27@mail.ru>
Fri, 16 Oct 2015 02:54:03 +0200
branchios-revival
changeset 11217 6e5fd5ea5acb
parent 11216 cd9a6fd65c82
child 11218 d8135421833c
- Fix for autorotation of table view of StatsPageVC - Adjustment for header's height
project_files/HedgewarsMobile/Classes/StatsPageViewController.m
--- a/project_files/HedgewarsMobile/Classes/StatsPageViewController.m	Thu Oct 15 23:27:56 2015 +0200
+++ b/project_files/HedgewarsMobile/Classes/StatsPageViewController.m	Fri Oct 16 02:54:03 2015 +0200
@@ -29,6 +29,7 @@
 
 -(void) viewDidLoad {
     UITableView *aTableView = [[UITableView alloc] initWithFrame:self.view.frame style:UITableViewStyleGrouped];
+    aTableView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
     [aTableView setBackgroundColorForAnyTable:[UIColor clearColor]];
 
     NSString *imgName = (IS_IPAD()) ? @"mediumBackground~ipad.png" : @"smallerBackground~iphone.png";
@@ -118,7 +119,7 @@
 }
 
 -(CGFloat) tableView:(UITableView *)aTableView heightForHeaderInSection:(NSInteger)section {
-    return 160;
+    return (section == 0) ? 160 : 40;
 }
 
 -(UIView *)tableView:(UITableView *)aTableView viewForHeaderInSection:(NSInteger)section {