project_files/HedgewarsMobile/Classes/StatsPageViewController.m
changeset 6711 76e96101a84f
parent 6709 018539298042
child 6832 fae8fd118da9
equal deleted inserted replaced
6709:018539298042 6711:76e96101a84f
    18  * File created on 30/12/2010.
    18  * File created on 30/12/2010.
    19  */
    19  */
    20 
    20 
    21 
    21 
    22 #import "StatsPageViewController.h"
    22 #import "StatsPageViewController.h"
    23 #import <QuartzCore/QuartzCore.h>
       
    24 
    23 
    25 @implementation StatsPageViewController
    24 @implementation StatsPageViewController
    26 @synthesize statsArray;
    25 @synthesize statsArray;
    27 
    26 
    28 -(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation) interfaceOrientation {
    27 -(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation) interfaceOrientation {
   146 -(UIView *)tableView:(UITableView *)aTableView viewForFooterInSection:(NSInteger)section {
   145 -(UIView *)tableView:(UITableView *)aTableView viewForFooterInSection:(NSInteger)section {
   147     if (section == 2) {
   146     if (section == 2) {
   148         UIView *footer = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width * 70 / 100, aTableView.rowHeight)];
   147         UIView *footer = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width * 70 / 100, aTableView.rowHeight)];
   149         footer.autoresizingMask = UIViewAutoresizingFlexibleWidth;
   148         footer.autoresizingMask = UIViewAutoresizingFlexibleWidth;
   150 
   149 
   151         UIButton *button = [[UIButton alloc] initWithFrame:CGRectMake(0, 17, self.view.frame.size.width * 70 / 100, aTableView.rowHeight)];
   150         UIButton *button = [[UIButton alloc] initWithFrame:CGRectMake(0, 17, self.view.frame.size.width * 70 / 100, aTableView.rowHeight)
       
   151                                                   andTitle:NSLocalizedString(@"Done",@"")];
   152         button.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin;
   152         button.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin;
   153         [button setTitle:NSLocalizedString(@"Done",@"") forState:UIControlStateNormal];
       
   154         [button setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
       
   155         [button setTitleColor:[UIColor grayColor] forState:UIControlStateHighlighted];
       
   156 
       
   157         button.titleLabel.font = [UIFont boldSystemFontOfSize:[UIFont labelFontSize]];
       
   158         button.backgroundColor = [UIColor blackColorTransparent];
       
   159         [button.layer setBorderWidth:1];
       
   160         [button.layer setBorderColor:[[UIColor darkYellowColor] CGColor]];
       
   161         [button.layer setCornerRadius:9.0f];
       
   162         [button.layer setMasksToBounds:YES];
       
   163         [button addTarget:self action:@selector(dismissView) forControlEvents:UIControlEventTouchUpInside];
   153         [button addTarget:self action:@selector(dismissView) forControlEvents:UIControlEventTouchUpInside];
   164         [footer addSubview:button];
   154         [footer addSubview:button];
   165         [button release];
   155         [button release];
   166 
   156 
   167         return [footer autorelease];
   157         return [footer autorelease];