# HG changeset patch # User antonc27 # Date 1446766421 -3600 # Node ID 9671c2bfce4155abcf6d8a643cbeda78d0c6ec5f # Parent 402baa6d4f64823eaf545ef866102801ec55d47d - Support screen refactoring: - - "Rate app" now called via Appirater - - Adjust for footer height diff -r 402baa6d4f64 -r 9671c2bfce41 project_files/HedgewarsMobile/Classes/SupportViewController.m --- a/project_files/HedgewarsMobile/Classes/SupportViewController.m Fri Nov 06 00:12:37 2015 +0100 +++ b/project_files/HedgewarsMobile/Classes/SupportViewController.m Fri Nov 06 00:33:41 2015 +0100 @@ -18,7 +18,7 @@ #import "SupportViewController.h" - +#import "Appirater.h" @implementation SupportViewController @synthesize waysToSupport; @@ -95,6 +95,7 @@ DLog(@"No way"); break; } + cell.accessoryView = nil; } NSString *imgString = [[NSString alloc] initWithFormat:@"%@/%@.png",[[NSBundle mainBundle] resourcePath],imgName]; @@ -113,12 +114,17 @@ #pragma mark - #pragma mark Table view delegate --(void) tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { - NSString *urlString = nil; +-(void) tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath +{ if ([indexPath section] == 0) - urlString = @"http://itunes.apple.com/us/app/hedgewars/id391234866?affC=QQABAAAAHgAFasEiWjVwUGZOc3k1VGctQkRJazlacXhUclpBTVpiU2xteVdfUQ%3D%3D#&mt=8"; + { + [Appirater rateApp]; + } else - switch ([indexPath row]) { + { + NSString *urlString = nil; + switch ([indexPath row]) + { case 0: urlString = @"http://www.facebook.com/Hedgewars"; break; @@ -135,7 +141,8 @@ DLog(@"No way"); break; } - [[UIApplication sharedApplication] openURL:[NSURL URLWithString:urlString]]; + [[UIApplication sharedApplication] openURL:[NSURL URLWithString:urlString]]; + } } -(UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger) section { @@ -167,7 +174,7 @@ -(CGFloat) tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section { // image height + label height - return 265; + return (section == 1) ? 265 : 20; } #pragma mark -