project_files/HedgewarsMobile/Classes/TeamConfigViewController.m
branchqmlfrontend
changeset 11448 42a9dd7b724c
parent 11327 a0163b8302c5
child 11549 893722a2a1f9
equal deleted inserted replaced
11447:2572afe532af 11448:42a9dd7b724c
   192     [theLabel release];
   192     [theLabel release];
   193     return [theView autorelease];
   193     return [theView autorelease];
   194 }
   194 }
   195 
   195 
   196 -(CGFloat) tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section {
   196 -(CGFloat) tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section {
   197     return IS_IPAD() ? 40 : 20;
   197     return IS_IPAD() ? 40 : 30;
   198 }
   198 }
   199 
   199 
   200 -(UIView *)tableView:(UITableView *)aTableView viewForFooterInSection:(NSInteger) section {
   200 -(UIView *)tableView:(UITableView *)aTableView viewForFooterInSection:(NSInteger) section {
   201     NSInteger height = IS_IPAD() ? 40 : 20;
   201     NSInteger height = IS_IPAD() ? 40 : 30;
   202     UIView *footer = [[UIView alloc] initWithFrame:CGRectMake(0, 0, aTableView.frame.size.width, height)];
   202     UIView *footer = [[UIView alloc] initWithFrame:CGRectMake(0, 0, aTableView.frame.size.width, height)];
   203     footer.backgroundColor = [UIColor clearColor];
   203     footer.backgroundColor = [UIColor clearColor];
   204     footer.autoresizingMask = UIViewAutoresizingFlexibleWidth;
   204     footer.autoresizingMask = UIViewAutoresizingFlexibleWidth;
   205 
   205 
   206     UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, aTableView.frame.size.width*80/100, height)];
   206     UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, aTableView.frame.size.width*90/100, height)];
   207     label.center = CGPointMake(aTableView.frame.size.width/2, height/2);
   207     label.center = CGPointMake(aTableView.frame.size.width/2, height/2);
   208     label.textAlignment = UITextAlignmentCenter;
   208     label.textAlignment = UITextAlignmentCenter;
   209     label.font = [UIFont italicSystemFontOfSize:12];
   209     label.font = [UIFont italicSystemFontOfSize:12];
   210     label.textColor = [UIColor whiteColor];
   210     label.textColor = [UIColor whiteColor];
   211     label.numberOfLines = 2;
   211     label.numberOfLines = 2;
   212     label.backgroundColor = [UIColor clearColor];
   212     label.backgroundColor = [UIColor clearColor];
   213     label.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin;
   213     label.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin | UIViewAutoresizingFlexibleWidth;
   214 
   214 
   215     if (section == 0)
   215     if (section == 0)
   216         label.text = NSLocalizedString(@"Tap to add hogs or change color, touch and hold to remove a team.",@"");
   216         label.text = NSLocalizedString(@"Tap to add hogs or change color, touch and hold to remove a team.",@"");
   217     else
   217     else
   218         label.text = NSLocalizedString(@"The robot badge indicates an AI-controlled team.",@"");
   218         label.text = NSLocalizedString(@"The robot badge indicates an AI-controlled team.",@"");