- Support screen refactoring:
- - "Rate app" now called via Appirater
- - Adjust for footer height
--- 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 -