project_files/HedgewarsMobile/Classes/SupportViewController.m
author Wuzzy <almikes@aol.com>
Sat, 09 Apr 2016 23:13:33 +0200
changeset 12014 9937075bbfd5
parent 11549 893722a2a1f9
child 12872 00215a7ec5f5
permissions -rw-r--r--
HedgeEditor: Make all hog and team names translatable and export them properly Uses the new loc_noop from Locale
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3884
d7479079a8a8 various fixes around, plus new 'ask for review' page
koda
parents:
diff changeset
     1
/*
d7479079a8a8 various fixes around, plus new 'ask for review' page
koda
parents:
diff changeset
     2
 * Hedgewars-iOS, a Hedgewars port for iOS devices
6700
e04da46ee43c the most important commit of the year
koda
parents: 6658
diff changeset
     3
 * Copyright (c) 2009-2012 Vittorio Giovara <vittorio.giovara@gmail.com>
3884
d7479079a8a8 various fixes around, plus new 'ask for review' page
koda
parents:
diff changeset
     4
 *
d7479079a8a8 various fixes around, plus new 'ask for review' page
koda
parents:
diff changeset
     5
 * This program is free software; you can redistribute it and/or modify
d7479079a8a8 various fixes around, plus new 'ask for review' page
koda
parents:
diff changeset
     6
 * it under the terms of the GNU General Public License as published by
d7479079a8a8 various fixes around, plus new 'ask for review' page
koda
parents:
diff changeset
     7
 * the Free Software Foundation; version 2 of the License
d7479079a8a8 various fixes around, plus new 'ask for review' page
koda
parents:
diff changeset
     8
 *
d7479079a8a8 various fixes around, plus new 'ask for review' page
koda
parents:
diff changeset
     9
 * This program is distributed in the hope that it will be useful,
d7479079a8a8 various fixes around, plus new 'ask for review' page
koda
parents:
diff changeset
    10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
d7479079a8a8 various fixes around, plus new 'ask for review' page
koda
parents:
diff changeset
    11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
d7479079a8a8 various fixes around, plus new 'ask for review' page
koda
parents:
diff changeset
    12
 * GNU General Public License for more details.
d7479079a8a8 various fixes around, plus new 'ask for review' page
koda
parents:
diff changeset
    13
 *
d7479079a8a8 various fixes around, plus new 'ask for review' page
koda
parents:
diff changeset
    14
 * You should have received a copy of the GNU General Public License
d7479079a8a8 various fixes around, plus new 'ask for review' page
koda
parents:
diff changeset
    15
 * along with this program; if not, write to the Free Software
10108
c68cf030eded update FSF address. note: two sdl include files (by Sam Lantinga) still have the old FSF address in their copyright - but I ain't gonna touch their copyright headers
sheepluva
parents: 8441
diff changeset
    16
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA.
3884
d7479079a8a8 various fixes around, plus new 'ask for review' page
koda
parents:
diff changeset
    17
 */
d7479079a8a8 various fixes around, plus new 'ask for review' page
koda
parents:
diff changeset
    18
3891
f8f0d0ceb19c initial support for savegames
koda
parents: 3884
diff changeset
    19
3884
d7479079a8a8 various fixes around, plus new 'ask for review' page
koda
parents:
diff changeset
    20
#import "SupportViewController.h"
11310
9671c2bfce41 - Support screen refactoring:
antonc27 <antonc27@mail.ru>
parents: 11229
diff changeset
    21
#import "Appirater.h"
3884
d7479079a8a8 various fixes around, plus new 'ask for review' page
koda
parents:
diff changeset
    22
d7479079a8a8 various fixes around, plus new 'ask for review' page
koda
parents:
diff changeset
    23
@implementation SupportViewController
4115
222b8016c773 make the support page more portable
koda
parents: 3891
diff changeset
    24
@synthesize waysToSupport;
3884
d7479079a8a8 various fixes around, plus new 'ask for review' page
koda
parents:
diff changeset
    25
4115
222b8016c773 make the support page more portable
koda
parents: 3891
diff changeset
    26
-(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
3884
d7479079a8a8 various fixes around, plus new 'ask for review' page
koda
parents:
diff changeset
    27
    return rotationManager(interfaceOrientation);
d7479079a8a8 various fixes around, plus new 'ask for review' page
koda
parents:
diff changeset
    28
}
d7479079a8a8 various fixes around, plus new 'ask for review' page
koda
parents:
diff changeset
    29
4115
222b8016c773 make the support page more portable
koda
parents: 3891
diff changeset
    30
#pragma mark -
222b8016c773 make the support page more portable
koda
parents: 3891
diff changeset
    31
#pragma mark View lifecycle
222b8016c773 make the support page more portable
koda
parents: 3891
diff changeset
    32
-(void) viewDidLoad {
222b8016c773 make the support page more portable
koda
parents: 3891
diff changeset
    33
    [super viewDidLoad];
222b8016c773 make the support page more portable
koda
parents: 3891
diff changeset
    34
222b8016c773 make the support page more portable
koda
parents: 3891
diff changeset
    35
    NSArray *array = [[NSArray alloc] initWithObjects:
222b8016c773 make the support page more portable
koda
parents: 3891
diff changeset
    36
                      NSLocalizedString(@"Leave a positive review on iTunes!",@""),
222b8016c773 make the support page more portable
koda
parents: 3891
diff changeset
    37
                      NSLocalizedString(@"Join us on Facebook",@""),
5700
f0960a88ab0e savedgamesviewcontroller refactor, added icons to supportviewcontroller
koda
parents: 5208
diff changeset
    38
                      NSLocalizedString(@"Follow us on Twitter",@""),
f0960a88ab0e savedgamesviewcontroller refactor, added icons to supportviewcontroller
koda
parents: 5208
diff changeset
    39
                      NSLocalizedString(@"Visit our website",@""),
f0960a88ab0e savedgamesviewcontroller refactor, added icons to supportviewcontroller
koda
parents: 5208
diff changeset
    40
                      NSLocalizedString(@"Chat with the devs in IRC",@""),
4115
222b8016c773 make the support page more portable
koda
parents: 3891
diff changeset
    41
                      nil];
222b8016c773 make the support page more portable
koda
parents: 3891
diff changeset
    42
    self.waysToSupport = array;
222b8016c773 make the support page more portable
koda
parents: 3891
diff changeset
    43
    [array release];
222b8016c773 make the support page more portable
koda
parents: 3891
diff changeset
    44
6074
047eaed35cbb ios major refactoring for ios settings, now they are presented differently on iphone/ipad, code is simplified and optimized, and ui is a little refreshed (eg. no more stuck selected fields)
koda
parents: 5976
diff changeset
    45
    self.navigationItem.title = @"♥";
4115
222b8016c773 make the support page more portable
koda
parents: 3891
diff changeset
    46
    self.tableView.rowHeight = 50;
222b8016c773 make the support page more portable
koda
parents: 3891
diff changeset
    47
}
222b8016c773 make the support page more portable
koda
parents: 3891
diff changeset
    48
222b8016c773 make the support page more portable
koda
parents: 3891
diff changeset
    49
#pragma mark -
222b8016c773 make the support page more portable
koda
parents: 3891
diff changeset
    50
#pragma mark Table view data source
222b8016c773 make the support page more portable
koda
parents: 3891
diff changeset
    51
-(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
222b8016c773 make the support page more portable
koda
parents: 3891
diff changeset
    52
    return 2;
222b8016c773 make the support page more portable
koda
parents: 3891
diff changeset
    53
}
222b8016c773 make the support page more portable
koda
parents: 3891
diff changeset
    54
222b8016c773 make the support page more portable
koda
parents: 3891
diff changeset
    55
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
222b8016c773 make the support page more portable
koda
parents: 3891
diff changeset
    56
    if (section == 0)
222b8016c773 make the support page more portable
koda
parents: 3891
diff changeset
    57
        return 1;
222b8016c773 make the support page more portable
koda
parents: 3891
diff changeset
    58
    else
222b8016c773 make the support page more portable
koda
parents: 3891
diff changeset
    59
        return [self.waysToSupport count] - 1;
222b8016c773 make the support page more portable
koda
parents: 3891
diff changeset
    60
}
222b8016c773 make the support page more portable
koda
parents: 3891
diff changeset
    61
222b8016c773 make the support page more portable
koda
parents: 3891
diff changeset
    62
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
222b8016c773 make the support page more portable
koda
parents: 3891
diff changeset
    63
    static NSString *CellIdentifier = @"Cell";
222b8016c773 make the support page more portable
koda
parents: 3891
diff changeset
    64
    NSInteger row = [indexPath row];
222b8016c773 make the support page more portable
koda
parents: 3891
diff changeset
    65
    NSInteger section = [indexPath section];
5976
306cedbeb213 fixed several 'retina display' images and added a bunch more (though just from upscaling the normal ones; might be nice to have 'em redrawn at a real higher resolution)
koda
parents: 5700
diff changeset
    66
    NSString *imgName = @"";
4115
222b8016c773 make the support page more portable
koda
parents: 3891
diff changeset
    67
222b8016c773 make the support page more portable
koda
parents: 3891
diff changeset
    68
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
222b8016c773 make the support page more portable
koda
parents: 3891
diff changeset
    69
    if (cell == nil)
222b8016c773 make the support page more portable
koda
parents: 3891
diff changeset
    70
        cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
222b8016c773 make the support page more portable
koda
parents: 3891
diff changeset
    71
222b8016c773 make the support page more portable
koda
parents: 3891
diff changeset
    72
    NSString *rowString = [self.waysToSupport objectAtIndex:(row + section)];
222b8016c773 make the support page more portable
koda
parents: 3891
diff changeset
    73
    cell.textLabel.text = rowString;
222b8016c773 make the support page more portable
koda
parents: 3891
diff changeset
    74
222b8016c773 make the support page more portable
koda
parents: 3891
diff changeset
    75
    if (section == 0) {
5976
306cedbeb213 fixed several 'retina display' images and added a bunch more (though just from upscaling the normal ones; might be nice to have 'em redrawn at a real higher resolution)
koda
parents: 5700
diff changeset
    76
        imgName = @"star";
11549
893722a2a1f9 - Some warnings fixed with text alignment on iOS front-end
antonc27 <antonc27@mail.ru>
parents: 11310
diff changeset
    77
        cell.textLabel.textAlignment = NSTextAlignmentCenter;
4115
222b8016c773 make the support page more portable
koda
parents: 3891
diff changeset
    78
        cell.imageView.image = nil;
222b8016c773 make the support page more portable
koda
parents: 3891
diff changeset
    79
    } else {
11549
893722a2a1f9 - Some warnings fixed with text alignment on iOS front-end
antonc27 <antonc27@mail.ru>
parents: 11310
diff changeset
    80
        cell.textLabel.textAlignment = NSTextAlignmentLeft;
4115
222b8016c773 make the support page more portable
koda
parents: 3891
diff changeset
    81
        switch (row) {
222b8016c773 make the support page more portable
koda
parents: 3891
diff changeset
    82
            case 0:
5976
306cedbeb213 fixed several 'retina display' images and added a bunch more (though just from upscaling the normal ones; might be nice to have 'em redrawn at a real higher resolution)
koda
parents: 5700
diff changeset
    83
                imgName = @"fb";
4115
222b8016c773 make the support page more portable
koda
parents: 3891
diff changeset
    84
                break;
222b8016c773 make the support page more portable
koda
parents: 3891
diff changeset
    85
            case 1:
5976
306cedbeb213 fixed several 'retina display' images and added a bunch more (though just from upscaling the normal ones; might be nice to have 'em redrawn at a real higher resolution)
koda
parents: 5700
diff changeset
    86
                imgName = @"tw";
4115
222b8016c773 make the support page more portable
koda
parents: 3891
diff changeset
    87
                break;
222b8016c773 make the support page more portable
koda
parents: 3891
diff changeset
    88
            case 2:
5976
306cedbeb213 fixed several 'retina display' images and added a bunch more (though just from upscaling the normal ones; might be nice to have 'em redrawn at a real higher resolution)
koda
parents: 5700
diff changeset
    89
                imgName = @"hedgehog";
4115
222b8016c773 make the support page more portable
koda
parents: 3891
diff changeset
    90
                break;
4341
46b8791e577f minor things
koda
parents: 4115
diff changeset
    91
            case 3:
5976
306cedbeb213 fixed several 'retina display' images and added a bunch more (though just from upscaling the normal ones; might be nice to have 'em redrawn at a real higher resolution)
koda
parents: 5700
diff changeset
    92
                imgName = @"irc";
4341
46b8791e577f minor things
koda
parents: 4115
diff changeset
    93
                break;
4115
222b8016c773 make the support page more portable
koda
parents: 3891
diff changeset
    94
            default:
222b8016c773 make the support page more portable
koda
parents: 3891
diff changeset
    95
                DLog(@"No way");
222b8016c773 make the support page more portable
koda
parents: 3891
diff changeset
    96
                break;
222b8016c773 make the support page more portable
koda
parents: 3891
diff changeset
    97
        }
11310
9671c2bfce41 - Support screen refactoring:
antonc27 <antonc27@mail.ru>
parents: 11229
diff changeset
    98
        cell.accessoryView = nil;
4115
222b8016c773 make the support page more portable
koda
parents: 3891
diff changeset
    99
    }
5976
306cedbeb213 fixed several 'retina display' images and added a bunch more (though just from upscaling the normal ones; might be nice to have 'em redrawn at a real higher resolution)
koda
parents: 5700
diff changeset
   100
306cedbeb213 fixed several 'retina display' images and added a bunch more (though just from upscaling the normal ones; might be nice to have 'em redrawn at a real higher resolution)
koda
parents: 5700
diff changeset
   101
    NSString *imgString = [[NSString alloc] initWithFormat:@"%@/%@.png",[[NSBundle mainBundle] resourcePath],imgName];
5700
f0960a88ab0e savedgamesviewcontroller refactor, added icons to supportviewcontroller
koda
parents: 5208
diff changeset
   102
    UIImage *img = [[UIImage alloc] initWithContentsOfFile:imgString];
5976
306cedbeb213 fixed several 'retina display' images and added a bunch more (though just from upscaling the normal ones; might be nice to have 'em redrawn at a real higher resolution)
koda
parents: 5700
diff changeset
   103
    [imgString release];
5700
f0960a88ab0e savedgamesviewcontroller refactor, added icons to supportviewcontroller
koda
parents: 5208
diff changeset
   104
    cell.imageView.image = img;
f0960a88ab0e savedgamesviewcontroller refactor, added icons to supportviewcontroller
koda
parents: 5208
diff changeset
   105
    if (section == 0) {
f0960a88ab0e savedgamesviewcontroller refactor, added icons to supportviewcontroller
koda
parents: 5208
diff changeset
   106
        UIImageView *imgView = [[UIImageView alloc] initWithImage:img];
f0960a88ab0e savedgamesviewcontroller refactor, added icons to supportviewcontroller
koda
parents: 5208
diff changeset
   107
        cell.accessoryView = imgView;
f0960a88ab0e savedgamesviewcontroller refactor, added icons to supportviewcontroller
koda
parents: 5208
diff changeset
   108
        [imgView release];
f0960a88ab0e savedgamesviewcontroller refactor, added icons to supportviewcontroller
koda
parents: 5208
diff changeset
   109
    }
f0960a88ab0e savedgamesviewcontroller refactor, added icons to supportviewcontroller
koda
parents: 5208
diff changeset
   110
    [img release];
8441
a00b0fa0dbd7 some whitespaces from ios files
koda
parents: 6832
diff changeset
   111
4115
222b8016c773 make the support page more portable
koda
parents: 3891
diff changeset
   112
    return cell;
222b8016c773 make the support page more portable
koda
parents: 3891
diff changeset
   113
}
222b8016c773 make the support page more portable
koda
parents: 3891
diff changeset
   114
222b8016c773 make the support page more portable
koda
parents: 3891
diff changeset
   115
#pragma mark -
222b8016c773 make the support page more portable
koda
parents: 3891
diff changeset
   116
#pragma mark Table view delegate
11310
9671c2bfce41 - Support screen refactoring:
antonc27 <antonc27@mail.ru>
parents: 11229
diff changeset
   117
-(void) tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
9671c2bfce41 - Support screen refactoring:
antonc27 <antonc27@mail.ru>
parents: 11229
diff changeset
   118
{
4115
222b8016c773 make the support page more portable
koda
parents: 3891
diff changeset
   119
    if ([indexPath section] == 0)
11310
9671c2bfce41 - Support screen refactoring:
antonc27 <antonc27@mail.ru>
parents: 11229
diff changeset
   120
    {
9671c2bfce41 - Support screen refactoring:
antonc27 <antonc27@mail.ru>
parents: 11229
diff changeset
   121
        [Appirater rateApp];
9671c2bfce41 - Support screen refactoring:
antonc27 <antonc27@mail.ru>
parents: 11229
diff changeset
   122
    }
4115
222b8016c773 make the support page more portable
koda
parents: 3891
diff changeset
   123
    else
11310
9671c2bfce41 - Support screen refactoring:
antonc27 <antonc27@mail.ru>
parents: 11229
diff changeset
   124
    {
9671c2bfce41 - Support screen refactoring:
antonc27 <antonc27@mail.ru>
parents: 11229
diff changeset
   125
        NSString *urlString = nil;
9671c2bfce41 - Support screen refactoring:
antonc27 <antonc27@mail.ru>
parents: 11229
diff changeset
   126
        switch ([indexPath row])
9671c2bfce41 - Support screen refactoring:
antonc27 <antonc27@mail.ru>
parents: 11229
diff changeset
   127
        {
4115
222b8016c773 make the support page more portable
koda
parents: 3891
diff changeset
   128
            case 0:
222b8016c773 make the support page more portable
koda
parents: 3891
diff changeset
   129
                urlString = @"http://www.facebook.com/Hedgewars";
222b8016c773 make the support page more portable
koda
parents: 3891
diff changeset
   130
                break;
222b8016c773 make the support page more portable
koda
parents: 3891
diff changeset
   131
            case 1:
222b8016c773 make the support page more portable
koda
parents: 3891
diff changeset
   132
                urlString = @"http://twitter.com/hedgewars";
222b8016c773 make the support page more portable
koda
parents: 3891
diff changeset
   133
                break;
222b8016c773 make the support page more portable
koda
parents: 3891
diff changeset
   134
            case 2:
222b8016c773 make the support page more portable
koda
parents: 3891
diff changeset
   135
                urlString = @"http://www.hedgewars.org";
222b8016c773 make the support page more portable
koda
parents: 3891
diff changeset
   136
                break;
4341
46b8791e577f minor things
koda
parents: 4115
diff changeset
   137
            case 3:
46b8791e577f minor things
koda
parents: 4115
diff changeset
   138
                urlString = @"http://webchat.freenode.net/?channels=hedgewars";
46b8791e577f minor things
koda
parents: 4115
diff changeset
   139
                break;
4115
222b8016c773 make the support page more portable
koda
parents: 3891
diff changeset
   140
            default:
222b8016c773 make the support page more portable
koda
parents: 3891
diff changeset
   141
                DLog(@"No way");
222b8016c773 make the support page more portable
koda
parents: 3891
diff changeset
   142
                break;
222b8016c773 make the support page more portable
koda
parents: 3891
diff changeset
   143
        }
11310
9671c2bfce41 - Support screen refactoring:
antonc27 <antonc27@mail.ru>
parents: 11229
diff changeset
   144
        [[UIApplication sharedApplication] openURL:[NSURL URLWithString:urlString]];
9671c2bfce41 - Support screen refactoring:
antonc27 <antonc27@mail.ru>
parents: 11229
diff changeset
   145
    }
4115
222b8016c773 make the support page more portable
koda
parents: 3891
diff changeset
   146
}
222b8016c773 make the support page more portable
koda
parents: 3891
diff changeset
   147
222b8016c773 make the support page more portable
koda
parents: 3891
diff changeset
   148
-(UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger) section {
222b8016c773 make the support page more portable
koda
parents: 3891
diff changeset
   149
    if (section == 1) {
222b8016c773 make the support page more portable
koda
parents: 3891
diff changeset
   150
        UIView *footer = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.tableView.frame.size.width, 240)];
6658
2cccf6b2b89d added MGSplitViewController, popular replacement for uisplitviewcontrollers: this brings rotation support to our settings pages! weapons and schemes are the only controllers displaying minor glitches
koda
parents: 6078
diff changeset
   151
        footer.autoresizingMask = UIViewAutoresizingFlexibleWidth;
2cccf6b2b89d added MGSplitViewController, popular replacement for uisplitviewcontrollers: this brings rotation support to our settings pages! weapons and schemes are the only controllers displaying minor glitches
koda
parents: 6078
diff changeset
   152
4115
222b8016c773 make the support page more portable
koda
parents: 3891
diff changeset
   153
        UIImage *img = [[UIImage alloc] initWithContentsOfFile:@"surprise.png"];
222b8016c773 make the support page more portable
koda
parents: 3891
diff changeset
   154
        UIImageView *imgView = [[UIImageView alloc] initWithImage:img];
222b8016c773 make the support page more portable
koda
parents: 3891
diff changeset
   155
        [img release];
222b8016c773 make the support page more portable
koda
parents: 3891
diff changeset
   156
        imgView.center = CGPointMake(self.tableView.frame.size.width/2, 120);
6658
2cccf6b2b89d added MGSplitViewController, popular replacement for uisplitviewcontrollers: this brings rotation support to our settings pages! weapons and schemes are the only controllers displaying minor glitches
koda
parents: 6078
diff changeset
   157
        imgView.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin;
4115
222b8016c773 make the support page more portable
koda
parents: 3891
diff changeset
   158
        [footer addSubview:imgView];
222b8016c773 make the support page more portable
koda
parents: 3891
diff changeset
   159
        [imgView release];
8441
a00b0fa0dbd7 some whitespaces from ios files
koda
parents: 6832
diff changeset
   160
4115
222b8016c773 make the support page more portable
koda
parents: 3891
diff changeset
   161
        UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, self.tableView.frame.size.width, 20)];
6658
2cccf6b2b89d added MGSplitViewController, popular replacement for uisplitviewcontrollers: this brings rotation support to our settings pages! weapons and schemes are the only controllers displaying minor glitches
koda
parents: 6078
diff changeset
   162
        label.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin;
11549
893722a2a1f9 - Some warnings fixed with text alignment on iOS front-end
antonc27 <antonc27@mail.ru>
parents: 11310
diff changeset
   163
        label.textAlignment = NSTextAlignmentCenter;
11229
b49dfdf628f6 - Some strings localizations for Settings
antonc27 <antonc27@mail.ru>
parents: 10108
diff changeset
   164
        label.text = NSLocalizedString(@" ♥ THANK YOU ♥ ", nil);
4115
222b8016c773 make the support page more portable
koda
parents: 3891
diff changeset
   165
        label.backgroundColor = [UIColor clearColor];
222b8016c773 make the support page more portable
koda
parents: 3891
diff changeset
   166
        label.center = CGPointMake(self.tableView.frame.size.width/2, 250);
222b8016c773 make the support page more portable
koda
parents: 3891
diff changeset
   167
        [footer addSubview:label];
222b8016c773 make the support page more portable
koda
parents: 3891
diff changeset
   168
        [label release];
8441
a00b0fa0dbd7 some whitespaces from ios files
koda
parents: 6832
diff changeset
   169
4115
222b8016c773 make the support page more portable
koda
parents: 3891
diff changeset
   170
        return [footer autorelease];
222b8016c773 make the support page more portable
koda
parents: 3891
diff changeset
   171
    } else
222b8016c773 make the support page more portable
koda
parents: 3891
diff changeset
   172
        return nil;
222b8016c773 make the support page more portable
koda
parents: 3891
diff changeset
   173
}
222b8016c773 make the support page more portable
koda
parents: 3891
diff changeset
   174
222b8016c773 make the support page more portable
koda
parents: 3891
diff changeset
   175
-(CGFloat) tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section {
222b8016c773 make the support page more portable
koda
parents: 3891
diff changeset
   176
    // image height + label height
11310
9671c2bfce41 - Support screen refactoring:
antonc27 <antonc27@mail.ru>
parents: 11229
diff changeset
   177
    return (section == 1) ? 265 : 20;
4115
222b8016c773 make the support page more portable
koda
parents: 3891
diff changeset
   178
}
222b8016c773 make the support page more portable
koda
parents: 3891
diff changeset
   179
222b8016c773 make the support page more portable
koda
parents: 3891
diff changeset
   180
#pragma mark -
222b8016c773 make the support page more portable
koda
parents: 3891
diff changeset
   181
#pragma mark Memory management
222b8016c773 make the support page more portable
koda
parents: 3891
diff changeset
   182
-(void)didReceiveMemoryWarning {
3884
d7479079a8a8 various fixes around, plus new 'ask for review' page
koda
parents:
diff changeset
   183
    [super didReceiveMemoryWarning];
d7479079a8a8 various fixes around, plus new 'ask for review' page
koda
parents:
diff changeset
   184
}
d7479079a8a8 various fixes around, plus new 'ask for review' page
koda
parents:
diff changeset
   185
d7479079a8a8 various fixes around, plus new 'ask for review' page
koda
parents:
diff changeset
   186
-(void) viewDidUnload {
4115
222b8016c773 make the support page more portable
koda
parents: 3891
diff changeset
   187
    self.waysToSupport = nil;
222b8016c773 make the support page more portable
koda
parents: 3891
diff changeset
   188
    MSG_DIDUNLOAD();
3884
d7479079a8a8 various fixes around, plus new 'ask for review' page
koda
parents:
diff changeset
   189
    [super viewDidUnload];
d7479079a8a8 various fixes around, plus new 'ask for review' page
koda
parents:
diff changeset
   190
}
d7479079a8a8 various fixes around, plus new 'ask for review' page
koda
parents:
diff changeset
   191
d7479079a8a8 various fixes around, plus new 'ask for review' page
koda
parents:
diff changeset
   192
-(void) dealloc {
5208
878e551f0b4a all together now! releaseAndNil ftw
koda
parents: 4976
diff changeset
   193
    releaseAndNil(waysToSupport);
3884
d7479079a8a8 various fixes around, plus new 'ask for review' page
koda
parents:
diff changeset
   194
    [super dealloc];
d7479079a8a8 various fixes around, plus new 'ask for review' page
koda
parents:
diff changeset
   195
}
d7479079a8a8 various fixes around, plus new 'ask for review' page
koda
parents:
diff changeset
   196
d7479079a8a8 various fixes around, plus new 'ask for review' page
koda
parents:
diff changeset
   197
@end