project_files/HedgewarsMobile/Classes/SchemeWeaponConfigViewController.m
changeset 6108 7a8da11a6144
parent 6107 0741c0f0203e
child 6115 485cfecadc9a
equal deleted inserted replaced
6107:0741c0f0203e 6108:7a8da11a6144
    18  * File created on 13/06/2010.
    18  * File created on 13/06/2010.
    19  */
    19  */
    20 
    20 
    21 
    21 
    22 #import "SchemeWeaponConfigViewController.h"
    22 #import "SchemeWeaponConfigViewController.h"
       
    23 #import <QuartzCore/QuartzCore.h>
    23 
    24 
    24 
    25 
    25 #define LABEL_TAG 57423
    26 #define LABEL_TAG 57423
    26 
    27 
    27 @implementation SchemeWeaponConfigViewController
    28 @implementation SchemeWeaponConfigViewController
   105     [super viewDidLoad];
   106     [super viewDidLoad];
   106 
   107 
   107     CGSize screenSize = [[UIScreen mainScreen] bounds].size;
   108     CGSize screenSize = [[UIScreen mainScreen] bounds].size;
   108     self.view.frame = CGRectMake(0, 0, screenSize.height, screenSize.width - 44);
   109     self.view.frame = CGRectMake(0, 0, screenSize.height, screenSize.width - 44);
   109 
   110 
   110     if ([self.tableView respondsToSelector:@selector(setBackgroundView:)]) {
   111     if (IS_IPAD()) {
   111         if (IS_IPAD())
   112         [self.tableView setBackgroundColorForAnyTable:[UIColor darkBlueColorTransparent]];
   112             [self.tableView setBackgroundView:nil];
   113         self.tableView.layer.borderColor = [[UIColor darkYellowColor] CGColor];
   113         else {
   114         self.tableView.layer.borderWidth = 2.7f;
   114             UIImage *backgroundImage = [[UIImage alloc] initWithContentsOfFile:@"background~iphone.png"];
   115         self.tableView.layer.cornerRadius = 8;
   115             UIImageView *background = [[UIImageView alloc] initWithImage:backgroundImage];
   116         self.tableView.contentInset = UIEdgeInsetsMake(5, 0, 5, 0);
   116             [backgroundImage release];
       
   117             [self.tableView setBackgroundView:background];
       
   118             [background release];
       
   119         }
       
   120     } else {
   117     } else {
   121         self.view.backgroundColor = [UIColor blackColor];
   118         UIImage *backgroundImage = [[UIImage alloc] initWithContentsOfFile:@"background~iphone.png"];
   122     }
   119         UIImageView *background = [[UIImageView alloc] initWithImage:backgroundImage];
   123 
   120         [backgroundImage release];
   124     self.tableView.separatorColor = [UIColor darkYellowColor];
   121         [self.tableView setBackgroundView:background];
       
   122         [background release];
       
   123     }
       
   124 
       
   125     self.tableView.indicatorStyle = UIScrollViewIndicatorStyleWhite;
       
   126     self.tableView.separatorColor = [UIColor whiteColor];
   125     self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
   127     self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
   126 }
   128 }
   127 
   129 
   128 #pragma mark -
   130 #pragma mark -
   129 #pragma mark Table view data source
   131 #pragma mark Table view data source