project_files/HedgewarsMobile/Classes/SchemeWeaponConfigViewController.m
changeset 3670 4c673e57f0d7
parent 3662 a44406f4369b
child 3697 d5b30d6373fc
equal deleted inserted replaced
3668:3f7a95234d8a 3670:4c673e57f0d7
    28     self.selectedWeapon = @"";
    28     self.selectedWeapon = @"";
    29     
    29     
    30     if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
    30     if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
    31         [self.tableView setBackgroundView:nil]; 
    31         [self.tableView setBackgroundView:nil]; 
    32         self.view.backgroundColor = [UIColor clearColor];
    32         self.view.backgroundColor = [UIColor clearColor];
       
    33         self.tableView.separatorColor = [UIColor colorWithRed:(CGFloat)0xFE/255 green:(CGFloat)0xCB/255 blue:0 alpha:1];
    33     }
    34     }
    34     self.tableView.separatorColor = [UIColor colorWithRed:(CGFloat)0xFE/255 green:(CGFloat)0xCB/255 blue:0 alpha:1];
       
    35     self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
    35     self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
    36 }
    36 }
    37 
    37 
    38 -(void) viewWillAppear:(BOOL) animated {
    38 -(void) viewWillAppear:(BOOL) animated {
    39     [super viewWillAppear:animated];
    39     [super viewWillAppear:animated];
    52 
    52 
    53     [self.tableView reloadData];
    53     [self.tableView reloadData];
    54 }
    54 }
    55 
    55 
    56 
    56 
    57 
       
    58 #pragma mark -
    57 #pragma mark -
    59 #pragma mark Table view data source
    58 #pragma mark Table view data source
    60 -(NSInteger) numberOfSectionsInTableView:(UITableView *)tableView {
    59 -(NSInteger) numberOfSectionsInTableView:(UITableView *)tableView {
    61     return 2;
    60     return 2;
    62 }
    61 }
    63 
       
    64 
    62 
    65 -(NSInteger) tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    63 -(NSInteger) tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    66     if (section == 0) 
    64     if (section == 0) 
    67         return [self.listOfSchemes count];
    65         return [self.listOfSchemes count];
    68     else
    66     else
    69         return [self.listOfWeapons count];
    67         return [self.listOfWeapons count];
    70 }
    68 }
    71 
       
    72 
    69 
    73 // Customize the appearance of table view cells.
    70 // Customize the appearance of table view cells.
    74 -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    71 -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    75     static NSString *CellIdentifier = @"Cell";
    72     static NSString *CellIdentifier = @"Cell";
    76     NSInteger row = [indexPath row];
    73     NSInteger row = [indexPath row];