# HG changeset patch # User koda # Date 1339625406 -7200 # Node ID 75197d981acb5b6d14519b887b4098c7c10b00b3 # Parent ed8bd253408cee3ffc7f207d9f0ad3a91f9b480c ios: explain why setting a style disables schemes and/or weapons sometimes diff -r ed8bd253408c -r 75197d981acb project_files/HedgewarsMobile/Classes/SchemeWeaponConfigViewController.m --- a/project_files/HedgewarsMobile/Classes/SchemeWeaponConfigViewController.m Thu Jun 14 00:03:01 2012 +0200 +++ b/project_files/HedgewarsMobile/Classes/SchemeWeaponConfigViewController.m Thu Jun 14 00:10:06 2012 +0200 @@ -222,11 +222,11 @@ return cell; } --(CGFloat) tableView:(UITableView *)aTableView heightForHeaderInSection:(NSInteger)section { +-(CGFloat) tableView:(UITableView *)aTableView heightForHeaderInSection:(NSInteger) section { return IS_IPAD() ? 0 : 50; } --(UIView *)tableView:(UITableView *)aTableView viewForHeaderInSection:(NSInteger)section { +-(UIView *)tableView:(UITableView *)aTableView viewForHeaderInSection:(NSInteger) section { if (IS_IPAD()) return nil; UIView *theView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, 30)]; @@ -238,6 +238,32 @@ return [theView autorelease]; } +-(CGFloat) tableView:(UITableView *)aTableView heightForFooterInSection:(NSInteger) section { + return 40; +} + +-(UIView *)tableView:(UITableView *)aTableView viewForFooterInSection:(NSInteger) section { + NSInteger height = 40; + UIView *footer = [[UIView alloc] initWithFrame:CGRectMake(0, 0, aTableView.frame.size.width, height)]; + footer.backgroundColor = [UIColor clearColor]; + footer.autoresizingMask = UIViewAutoresizingFlexibleWidth; + + UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, aTableView.frame.size.width*80/100, height)]; + label.center = CGPointMake(aTableView.frame.size.width/2, height/2); + label.textAlignment = UITextAlignmentCenter; + label.font = [UIFont italicSystemFontOfSize:12]; + label.textColor = [UIColor whiteColor]; + label.numberOfLines = 2; + label.backgroundColor = [UIColor clearColor]; + label.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin; + + label.text = NSLocalizedString(@"Setting a Style might force a particular Scheme or Weapon configuration.",@""); + + [footer addSubview:label]; + [label release]; + return [footer autorelease]; +} + #pragma mark - #pragma mark Table view delegate -(void) tableView:(UITableView *)aTableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {