From ec7e1e388014fca2be16d9ebcaf05c2fd36342c4 Mon Sep 17 00:00:00 2001 From: Ilya Grechuhin Date: Mon, 23 Jan 2017 13:45:17 +0300 Subject: [PATCH] [MAPSME-3628] [ios] Added cells deselection in settings. --- iphone/Maps/UI/Settings/MWMMobileInternetViewController.mm | 1 + iphone/Maps/UI/Settings/MWMNightModeController.mm | 1 + iphone/Maps/UI/Settings/MWMRecentTrackSettingsController.mm | 1 + iphone/Maps/UI/Settings/MWMTTSSettingsViewController.mm | 1 + iphone/Maps/UI/Settings/MWMUnitsController.mm | 1 + 5 files changed, 5 insertions(+) diff --git a/iphone/Maps/UI/Settings/MWMMobileInternetViewController.mm b/iphone/Maps/UI/Settings/MWMMobileInternetViewController.mm index a2bca313fd..46593c221f 100644 --- a/iphone/Maps/UI/Settings/MWMMobileInternetViewController.mm +++ b/iphone/Maps/UI/Settings/MWMMobileInternetViewController.mm @@ -67,6 +67,7 @@ using np = platform::NetworkPolicy; selected.accessoryType = UITableViewCellAccessoryCheckmark; selected.selected = NO; self.selected = selected; + [tableView deselectRowAtIndexPath:indexPath animated:YES]; } - (NSString *)tableView:(UITableView *)tableView titleForFooterInSection:(NSInteger)section diff --git a/iphone/Maps/UI/Settings/MWMNightModeController.mm b/iphone/Maps/UI/Settings/MWMNightModeController.mm index e49432c529..17a8819af8 100644 --- a/iphone/Maps/UI/Settings/MWMNightModeController.mm +++ b/iphone/Maps/UI/Settings/MWMNightModeController.mm @@ -65,6 +65,7 @@ selectedCell.accessoryType = UITableViewCellAccessoryCheckmark; selectedCell.selected = NO; self.selectedCell = selectedCell; + [tableView deselectRowAtIndexPath:indexPath animated:YES]; } @end diff --git a/iphone/Maps/UI/Settings/MWMRecentTrackSettingsController.mm b/iphone/Maps/UI/Settings/MWMRecentTrackSettingsController.mm index 5e3b726ec9..292b1538c5 100644 --- a/iphone/Maps/UI/Settings/MWMRecentTrackSettingsController.mm +++ b/iphone/Maps/UI/Settings/MWMRecentTrackSettingsController.mm @@ -95,6 +95,7 @@ typedef NS_ENUM(NSUInteger, DurationInHours) { One = 1, Two = 2, Six = 6, Twelve selectedCell = [tableView cellForRowAtIndexPath:indexPath]; selectedCell.selected = NO; self.selectedCell = selectedCell; + [tableView deselectRowAtIndexPath:indexPath animated:YES]; } - (NSString *)tableView:(UITableView *)tableView titleForFooterInSection:(NSInteger)section diff --git a/iphone/Maps/UI/Settings/MWMTTSSettingsViewController.mm b/iphone/Maps/UI/Settings/MWMTTSSettingsViewController.mm index 21dd3d6a00..6cd9c97839 100644 --- a/iphone/Maps/UI/Settings/MWMTTSSettingsViewController.mm +++ b/iphone/Maps/UI/Settings/MWMTTSSettingsViewController.mm @@ -155,6 +155,7 @@ using namespace locale_translator; - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { + [tableView deselectRowAtIndexPath:indexPath animated:YES]; if (indexPath.section == 0) { if (indexPath.row == 0) diff --git a/iphone/Maps/UI/Settings/MWMUnitsController.mm b/iphone/Maps/UI/Settings/MWMUnitsController.mm index bfe39b8660..4ac15af684 100644 --- a/iphone/Maps/UI/Settings/MWMUnitsController.mm +++ b/iphone/Maps/UI/Settings/MWMUnitsController.mm @@ -52,6 +52,7 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { self.selectedCell = [tableView cellForRowAtIndexPath:indexPath]; + [tableView deselectRowAtIndexPath:indexPath animated:YES]; } @end