Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladiMihaylenko <vxmihaylenko@gmail.com>2015-12-22 16:09:59 +0300
committerDaria Volvenkova <d.volvenkova@corp.mail.ru>2015-12-29 16:42:41 +0300
commit094ce33c1ecfcebf5bb7a5ee6405833aea7b2e98 (patch)
tree6acc00aac701f10b3c808826a8ffe83957aadc95 /iphone/Maps/Settings
parentd10d785e0d7d22a5fd43be1224590f082a17fdcc (diff)
[ios] UI for changing map view style. (logic)
Diffstat (limited to 'iphone/Maps/Settings')
-rw-r--r--iphone/Maps/Settings/SettingsViewController.mm28
1 files changed, 24 insertions, 4 deletions
diff --git a/iphone/Maps/Settings/SettingsViewController.mm b/iphone/Maps/Settings/SettingsViewController.mm
index c1816abf26..b4c48b097b 100644
--- a/iphone/Maps/Settings/SettingsViewController.mm
+++ b/iphone/Maps/Settings/SettingsViewController.mm
@@ -66,8 +66,9 @@ typedef NS_ENUM(NSUInteger, Section)
switch (sections[section])
{
case SectionMetrics:
- case SectionRouting:
return 2;
+ case SectionRouting:
+ return 3;
case SectionMap:
case SectionAd:
case SectionStatistics:
@@ -136,19 +137,34 @@ typedef NS_ENUM(NSUInteger, Section)
}
case SectionRouting:
{
- if (indexPath.row == 0)
+ switch (indexPath.row)
+ {
+ case 0:
+ {
+ cell = [tableView dequeueReusableCellWithIdentifier:[LinkCell className]];
+ LinkCell * customCell = (LinkCell *)cell;
+ customCell.titleLabel.text = L(@"prefs_map_view_title");
+ break;
+ }
+ case 1:
{
cell = [tableView dequeueReusableCellWithIdentifier:[SwitchCell className]];
SwitchCell * customCell = (SwitchCell *)cell;
customCell.switchButton.on = [[MWMTextToSpeech tts] isNeedToEnable];
customCell.titleLabel.text = L(@"pref_tts_enable_title");
customCell.delegate = self;
+ break;
}
- else
+ case 2:
{
cell = [tableView dequeueReusableCellWithIdentifier:[LinkCell className]];
LinkCell * customCell = (LinkCell *)cell;
customCell.titleLabel.text = L(@"pref_tts_language_title");
+ break;
+ }
+ default:
+ NSAssert(false, @"Incorrect index path!");
+ break;
}
break;
}
@@ -241,7 +257,11 @@ Settings::Units unitsForIndex(NSInteger index)
break;
}
case SectionRouting:
- if (indexPath.row == 1)
+ if (indexPath.row == 0)
+ {
+ [self performSegueWithIdentifier:@"SettingsToMapViewSegue" sender:nil];
+ }
+ else if (indexPath.row == 2)
{
[[Statistics instance] logEvent:kStatEventName(kStatSettings, kStatTTS)
withParameters:@{kStatAction : kStatChangeLanguage}];