From 4feb95e75566dd4b7d98536d22f6433589257108 Mon Sep 17 00:00:00 2001 From: Igor Khmurets Date: Fri, 1 Aug 2014 11:21:30 +0300 Subject: [PATCH] [ios] Added animation to metrics switching in settings --- iphone/Maps/Settings/SettingsViewController.mm | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/iphone/Maps/Settings/SettingsViewController.mm b/iphone/Maps/Settings/SettingsViewController.mm index ff8b6ba6f2..0d68de6772 100644 --- a/iphone/Maps/Settings/SettingsViewController.mm +++ b/iphone/Maps/Settings/SettingsViewController.mm @@ -134,10 +134,7 @@ typedef NS_ENUM(NSUInteger, Section) Settings::Units unitsForIndex(NSInteger index) { - if (index == 0) - return Settings::Metric; - else - return Settings::Foot; + return index == 0 ? Settings::Metric : Settings::Foot; } - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath @@ -146,7 +143,7 @@ Settings::Units unitsForIndex(NSInteger index) { Settings::Units units = unitsForIndex(indexPath.row); Settings::Set("Units", units); - [tableView reloadSections:[NSIndexSet indexSetWithIndex:SectionMetrics] withRowAnimation:UITableViewRowAnimationNone]; + [tableView reloadSections:[NSIndexSet indexSetWithIndex:SectionMetrics] withRowAnimation:UITableViewRowAnimationFade]; [[MapsAppDelegate theApp].m_mapViewController setupMeasurementSystem]; } else if (indexPath.section == SectionAbout)