project_files/HedgewarsMobile/Classes/FlagsViewController.m
changeset 4478 05029b4d8490
parent 3971 5c82ee165ed5
child 4976 088d40d8aba2
equal deleted inserted replaced
4476:4bf74e158f44 4478:05029b4d8490
    18  * File created on 08/04/2010.
    18  * File created on 08/04/2010.
    19  */
    19  */
    20 
    20 
    21 
    21 
    22 #import "FlagsViewController.h"
    22 #import "FlagsViewController.h"
       
    23 #import <QuartzCore/QuartzCore.h>
    23 #import "CommodityFunctions.h"
    24 #import "CommodityFunctions.h"
    24 
    25 
    25 @implementation FlagsViewController
    26 @implementation FlagsViewController
    26 @synthesize teamDictionary, flagArray, communityArray, lastIndexPath;
    27 @synthesize teamDictionary, flagArray, communityArray, lastIndexPath;
    27 
    28 
    97     }
    98     }
    98     NSString *flagFile = [[NSString alloc] initWithFormat:@"%@/%@", FLAGS_DIRECTORY(), flagName];
    99     NSString *flagFile = [[NSString alloc] initWithFormat:@"%@/%@", FLAGS_DIRECTORY(), flagName];
    99     UIImage *flagSprite = [[UIImage alloc] initWithContentsOfFile:flagFile];
   100     UIImage *flagSprite = [[UIImage alloc] initWithContentsOfFile:flagFile];
   100     [flagFile release];
   101     [flagFile release];
   101     cell.imageView.image = flagSprite;
   102     cell.imageView.image = flagSprite;
       
   103     cell.imageView.layer.borderWidth = 0.3;
   102     [flagSprite release];
   104     [flagSprite release];
   103 
   105 
   104     cell.textLabel.text = [[source objectAtIndex:row] stringByDeletingPathExtension];
   106     cell.textLabel.text = [[source objectAtIndex:row] stringByDeletingPathExtension];
   105     if ([[flagName stringByDeletingPathExtension] isEqualToString:[self.teamDictionary objectForKey:@"flag"]]) {
   107     if ([[flagName stringByDeletingPathExtension] isEqualToString:[self.teamDictionary objectForKey:@"flag"]]) {
   106         cell.accessoryType = UITableViewCellAccessoryCheckmark;
   108         cell.accessoryType = UITableViewCellAccessoryCheckmark;