project_files/HedgewarsMobile/Classes/TeamConfigViewController.m
changeset 4538 4c2dc9d75742
parent 4504 8906b2409d97
child 4811 3edc0cdcfe03
equal deleted inserted replaced
4537:f95f7218531a 4538:4c2dc9d75742
   220     [theLabel release];
   220     [theLabel release];
   221     return theView;
   221     return theView;
   222 }
   222 }
   223 
   223 
   224 -(CGFloat) tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section {
   224 -(CGFloat) tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section {
   225     return 20;
   225     return IS_IPAD() ? 40 : 20;
   226 }
   226 }
   227 
   227 
   228 -(UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger) section {
   228 -(UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger) section {
   229     UIView *footer = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.tableView.frame.size.width, 20)];
   229     NSInteger height = IS_IPAD() ? 40 : 20;
       
   230     UIView *footer = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.tableView.frame.size.width, height)];
   230     footer.backgroundColor = [UIColor clearColor];
   231     footer.backgroundColor = [UIColor clearColor];
   231 
   232 
   232     UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, self.tableView.frame.size.width*80/100, 20)];
   233     UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, self.tableView.frame.size.width*80/100, height)];
   233     label.center = CGPointMake(self.tableView.frame.size.width/2, 20/2);
   234     label.center = CGPointMake(self.tableView.frame.size.width/2, height/2);
   234     label.textAlignment = UITextAlignmentCenter;
   235     label.textAlignment = UITextAlignmentCenter;
   235     label.font = [UIFont italicSystemFontOfSize:12];
   236     label.font = [UIFont italicSystemFontOfSize:12];
   236     label.textColor = [UIColor whiteColor];
   237     label.textColor = [UIColor whiteColor];
   237     label.numberOfLines = 1;
   238     label.numberOfLines = 2;
   238     if (section == 0)
   239     if (section == 0)
   239         label.text = NSLocalizedString(@"Tap to add hogs or change color, touch and hold to remove team.",@"");
   240         label.text = NSLocalizedString(@"Tap to add hogs or change color, touch and hold to remove a team.",@"");
   240     else
   241     else
   241         label.text = NSLocalizedString(@"The robot badge indicates an AI-controlled team.",@"");
   242         label.text = NSLocalizedString(@"The robot badge indicates an AI-controlled team.",@"");
   242 
   243 
   243     label.backgroundColor = [UIColor clearColor];
   244     label.backgroundColor = [UIColor clearColor];
   244     [footer addSubview:label];
   245     [footer addSubview:label];