forked from organicmaps/organicmaps
[ios] Autozoom in settings.
This commit is contained in:
parent
fcc825f8b5
commit
24e7b3f7c7
2 changed files with 22 additions and 2 deletions
|
@ -73,7 +73,7 @@ typedef NS_ENUM(NSUInteger, Section)
|
|||
case SectionMetrics:
|
||||
return 2;
|
||||
case SectionRouting:
|
||||
return 3;
|
||||
return 4;
|
||||
case SectionMap:
|
||||
return 5;
|
||||
}
|
||||
|
@ -196,8 +196,18 @@ typedef NS_ENUM(NSUInteger, Section)
|
|||
customCell.delegate = self;
|
||||
break;
|
||||
}
|
||||
// Change TTS language
|
||||
// Allow autozoom
|
||||
case 2:
|
||||
{
|
||||
cell = [tableView dequeueReusableCellWithIdentifier:[SwitchCell className]];
|
||||
SwitchCell * customCell = static_cast<SwitchCell *>(cell);
|
||||
customCell.switchButton.on = GetFramework().LoadAutoZoom();
|
||||
customCell.titleLabel.text = L(@"pref_autozoom_enable_title");
|
||||
customCell.delegate = self;
|
||||
break;
|
||||
}
|
||||
// Change TTS language
|
||||
case 3:
|
||||
{
|
||||
cell = [tableView dequeueReusableCellWithIdentifier:[LinkCell className]];
|
||||
LinkCell * customCell = (LinkCell *)cell;
|
||||
|
@ -320,6 +330,15 @@ typedef NS_ENUM(NSUInteger, Section)
|
|||
withParameters:@{kStatValue : value ? kStatOn : kStatOff}];
|
||||
[MWMTextToSpeech setTTSEnabled:value];
|
||||
}
|
||||
// Enable autozoom
|
||||
else if (indexPath.row == 2)
|
||||
{
|
||||
[Statistics logEvent:kStatEventName(kStatSettings, kStatAutoZoom)
|
||||
withParameters:@{kStatValue : value ? kStatOn : kStatOff}];
|
||||
auto & f = GetFramework();
|
||||
f.AllowAutoZoom(value);
|
||||
f.SaveAutoZoom(value);
|
||||
}
|
||||
break;
|
||||
|
||||
case SectionMetrics:
|
||||
|
|
|
@ -14,6 +14,7 @@ static NSString * const kStatApplication = @"Application";
|
|||
static NSString * const kStatApply = @"Apply";
|
||||
static NSString * const kStatAuthorization = @"Authorization";
|
||||
static NSString * const kStatAutoDownload = @"Auto download";
|
||||
static NSString * const kStatAutoZoom = @"Autozoom";
|
||||
static NSString * const kStatBack = @"Back";
|
||||
static NSString * const kStatBannerDescription = @"Banner description";
|
||||
static NSString * const kStatBannerTitle = @"Banner title";
|
||||
|
|
Loading…
Add table
Reference in a new issue