project_files/HedgewarsMobile/Classes/SchemeWeaponConfigViewController.m
changeset 6864 6fdd23cdeaeb
parent 6832 fae8fd118da9
child 6908 896ed2afcfb8
equal deleted inserted replaced
6863:4d1ce4b4f7c6 6864:6fdd23cdeaeb
    96 #pragma mark -
    96 #pragma mark -
    97 #pragma mark View lifecycle
    97 #pragma mark View lifecycle
    98 -(void) viewDidLoad {
    98 -(void) viewDidLoad {
    99     self.sectionsHidden = NO;
    99     self.sectionsHidden = NO;
   100 
   100 
   101     NSInteger verticalOffset = IS_IPAD() ? 45 : 0;
   101     NSInteger topOffset = IS_IPAD() ? 45 : 0;
       
   102     NSInteger bottomOffset = IS_IPAD() ? 3 : 0;
   102     UITableView *aTableView = [[UITableView alloc] initWithFrame:CGRectMake(0,
   103     UITableView *aTableView = [[UITableView alloc] initWithFrame:CGRectMake(0,
   103                                                                             verticalOffset,
   104                                                                             topOffset,
   104                                                                             self.view.frame.size.width,
   105                                                                             self.view.frame.size.width,
   105                                                                             self.view.frame.size.height - verticalOffset)
   106                                                                             self.view.frame.size.height - topOffset - bottomOffset)
   106                                                            style:UITableViewStyleGrouped];
   107                                                            style:UITableViewStyleGrouped];
   107     aTableView.delegate = self;
   108     aTableView.delegate = self;
   108     aTableView.dataSource = self;
   109     aTableView.dataSource = self;
   109     if (IS_IPAD()) {
   110     if (IS_IPAD()) {
   110         [aTableView setBackgroundColorForAnyTable:[UIColor clearColor]];
   111         [aTableView setBackgroundColorForAnyTable:[UIColor clearColor]];