project_files/HedgewarsMobile/Classes/SchemeWeaponConfigViewController.m
changeset 6831 f848120b3fcc
parent 6829 60b039d88dab
child 6832 fae8fd118da9
equal deleted inserted replaced
6830:d2df090453aa 6831:f848120b3fcc
    98 #pragma mark -
    98 #pragma mark -
    99 #pragma mark View lifecycle
    99 #pragma mark View lifecycle
   100 -(void) viewDidLoad {
   100 -(void) viewDidLoad {
   101     self.sectionsHidden = NO;
   101     self.sectionsHidden = NO;
   102 
   102 
   103     UITableView *aTableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 45, self.view.frame.size.width, self.view.frame.size.height-48)
   103     NSInteger verticalOffset = IS_IPAD() ? 45 : 0;
       
   104     UITableView *aTableView = [[UITableView alloc] initWithFrame:CGRectMake(0,
       
   105                                                                             verticalOffset,
       
   106                                                                             self.view.frame.size.width,
       
   107                                                                             self.view.frame.size.height - verticalOffset)
   104                                                            style:UITableViewStyleGrouped];
   108                                                            style:UITableViewStyleGrouped];
   105     aTableView.delegate = self;
   109     aTableView.delegate = self;
   106     aTableView.dataSource = self;
   110     aTableView.dataSource = self;
   107     if (IS_IPAD()) {
   111     if (IS_IPAD()) {
   108         [aTableView setBackgroundColorForAnyTable:[UIColor clearColor]];
   112         [aTableView setBackgroundColorForAnyTable:[UIColor clearColor]];
   219     cell.detailTextLabel.adjustsFontSizeToFitWidth = YES;
   223     cell.detailTextLabel.adjustsFontSizeToFitWidth = YES;
   220     return cell;
   224     return cell;
   221 }
   225 }
   222 
   226 
   223 -(CGFloat) tableView:(UITableView *)aTableView heightForHeaderInSection:(NSInteger)section {
   227 -(CGFloat) tableView:(UITableView *)aTableView heightForHeaderInSection:(NSInteger)section {
   224     return IS_IPAD() ? 50.0 : 0;
   228     return IS_IPAD() ? 0 : 50;
   225 }
   229 }
   226 
   230 
   227 -(UIView *)tableView:(UITableView *)aTableView viewForHeaderInSection:(NSInteger)section {
   231 -(UIView *)tableView:(UITableView *)aTableView viewForHeaderInSection:(NSInteger)section {
   228     if (IS_IPAD())
   232     if (IS_IPAD())
   229         return nil;
   233         return nil;