From 8651506dc68d6643c16f20fa5c0a382ac499cd7f Mon Sep 17 00:00:00 2001 From: Ilya Grechuhin Date: Thu, 15 Dec 2016 11:15:41 +0300 Subject: [swift] [ios] Moved settings files to designated folders. --- iphone/Maps/CommunityVC.h | 5 - iphone/Maps/CommunityVC.mm | 127 ----------- iphone/Maps/MWMAboutController.h | 5 - iphone/Maps/MWMAboutController.mm | 136 ----------- iphone/Maps/MWMAboutControllerHeader.xib | 88 ------- iphone/Maps/MWMHelpController.h | 5 - iphone/Maps/MWMHelpController.mm | 254 --------------------- iphone/Maps/MWMMobileInternetViewController.h | 5 - iphone/Maps/MWMMobileInternetViewController.mm | 77 ------- iphone/Maps/MWMNightModeController.h | 5 - iphone/Maps/MWMNightModeController.mm | 102 --------- iphone/Maps/MWMRecentTrackSettingsController.h | 5 - iphone/Maps/MWMRecentTrackSettingsController.mm | 106 --------- iphone/Maps/MWMSettings.h | 35 --- iphone/Maps/MWMSettings.mm | 153 ------------- iphone/Maps/MWMTTSLanguageViewController.h | 5 - iphone/Maps/MWMTTSLanguageViewController.mm | 41 ---- iphone/Maps/MWMTTSSettingsViewController.h | 10 - iphone/Maps/MWMTTSSettingsViewController.mm | 201 ---------------- iphone/Maps/MWMUnitsController.h | 5 - iphone/Maps/MWMUnitsController.mm | 57 ----- iphone/Maps/Maps.xcodeproj/project.pbxproj | 132 +++++------ iphone/Maps/Settings/Cells/LinkCell.h | 8 + iphone/Maps/Settings/Cells/LinkCell.mm | 12 + iphone/Maps/Settings/Cells/SelectableCell.h | 7 + iphone/Maps/Settings/Cells/SelectableCell.mm | 12 + iphone/Maps/Settings/Cells/SwitchCell.h | 17 ++ iphone/Maps/Settings/Cells/SwitchCell.mm | 18 ++ iphone/Maps/Settings/LinkCell.h | 8 - iphone/Maps/Settings/LinkCell.mm | 12 - iphone/Maps/Settings/MWMAboutController.h | 5 + iphone/Maps/Settings/MWMAboutController.mm | 136 +++++++++++ iphone/Maps/Settings/MWMAboutControllerHeader.xib | 88 +++++++ iphone/Maps/Settings/MWMHelpController.h | 5 + iphone/Maps/Settings/MWMHelpController.mm | 254 +++++++++++++++++++++ .../Settings/MWMMobileInternetViewController.h | 5 + .../Settings/MWMMobileInternetViewController.mm | 77 +++++++ iphone/Maps/Settings/MWMNightModeController.h | 5 + iphone/Maps/Settings/MWMNightModeController.mm | 102 +++++++++ .../Settings/MWMRecentTrackSettingsController.h | 5 + .../Settings/MWMRecentTrackSettingsController.mm | 106 +++++++++ iphone/Maps/Settings/MWMSettings.h | 35 +++ iphone/Maps/Settings/MWMSettings.mm | 153 +++++++++++++ .../Maps/Settings/MWMTTSLanguageViewController.h | 5 + .../Maps/Settings/MWMTTSLanguageViewController.mm | 41 ++++ .../Maps/Settings/MWMTTSSettingsViewController.h | 10 + .../Maps/Settings/MWMTTSSettingsViewController.mm | 201 ++++++++++++++++ iphone/Maps/Settings/MWMUnitsController.h | 5 + iphone/Maps/Settings/MWMUnitsController.mm | 57 +++++ iphone/Maps/Settings/SelectableCell.h | 7 - iphone/Maps/Settings/SelectableCell.mm | 12 - iphone/Maps/Settings/SwitchCell.h | 17 -- iphone/Maps/Settings/SwitchCell.mm | 18 -- 53 files changed, 1430 insertions(+), 1572 deletions(-) delete mode 100644 iphone/Maps/CommunityVC.h delete mode 100644 iphone/Maps/CommunityVC.mm delete mode 100644 iphone/Maps/MWMAboutController.h delete mode 100644 iphone/Maps/MWMAboutController.mm delete mode 100644 iphone/Maps/MWMAboutControllerHeader.xib delete mode 100644 iphone/Maps/MWMHelpController.h delete mode 100644 iphone/Maps/MWMHelpController.mm delete mode 100644 iphone/Maps/MWMMobileInternetViewController.h delete mode 100644 iphone/Maps/MWMMobileInternetViewController.mm delete mode 100644 iphone/Maps/MWMNightModeController.h delete mode 100644 iphone/Maps/MWMNightModeController.mm delete mode 100644 iphone/Maps/MWMRecentTrackSettingsController.h delete mode 100644 iphone/Maps/MWMRecentTrackSettingsController.mm delete mode 100644 iphone/Maps/MWMSettings.h delete mode 100644 iphone/Maps/MWMSettings.mm delete mode 100644 iphone/Maps/MWMTTSLanguageViewController.h delete mode 100644 iphone/Maps/MWMTTSLanguageViewController.mm delete mode 100644 iphone/Maps/MWMTTSSettingsViewController.h delete mode 100644 iphone/Maps/MWMTTSSettingsViewController.mm delete mode 100644 iphone/Maps/MWMUnitsController.h delete mode 100644 iphone/Maps/MWMUnitsController.mm create mode 100644 iphone/Maps/Settings/Cells/LinkCell.h create mode 100644 iphone/Maps/Settings/Cells/LinkCell.mm create mode 100644 iphone/Maps/Settings/Cells/SelectableCell.h create mode 100644 iphone/Maps/Settings/Cells/SelectableCell.mm create mode 100644 iphone/Maps/Settings/Cells/SwitchCell.h create mode 100644 iphone/Maps/Settings/Cells/SwitchCell.mm delete mode 100644 iphone/Maps/Settings/LinkCell.h delete mode 100644 iphone/Maps/Settings/LinkCell.mm create mode 100644 iphone/Maps/Settings/MWMAboutController.h create mode 100644 iphone/Maps/Settings/MWMAboutController.mm create mode 100644 iphone/Maps/Settings/MWMAboutControllerHeader.xib create mode 100644 iphone/Maps/Settings/MWMHelpController.h create mode 100644 iphone/Maps/Settings/MWMHelpController.mm create mode 100644 iphone/Maps/Settings/MWMMobileInternetViewController.h create mode 100644 iphone/Maps/Settings/MWMMobileInternetViewController.mm create mode 100644 iphone/Maps/Settings/MWMNightModeController.h create mode 100644 iphone/Maps/Settings/MWMNightModeController.mm create mode 100644 iphone/Maps/Settings/MWMRecentTrackSettingsController.h create mode 100644 iphone/Maps/Settings/MWMRecentTrackSettingsController.mm create mode 100644 iphone/Maps/Settings/MWMSettings.h create mode 100644 iphone/Maps/Settings/MWMSettings.mm create mode 100644 iphone/Maps/Settings/MWMTTSLanguageViewController.h create mode 100644 iphone/Maps/Settings/MWMTTSLanguageViewController.mm create mode 100644 iphone/Maps/Settings/MWMTTSSettingsViewController.h create mode 100644 iphone/Maps/Settings/MWMTTSSettingsViewController.mm create mode 100644 iphone/Maps/Settings/MWMUnitsController.h create mode 100644 iphone/Maps/Settings/MWMUnitsController.mm delete mode 100644 iphone/Maps/Settings/SelectableCell.h delete mode 100644 iphone/Maps/Settings/SelectableCell.mm delete mode 100644 iphone/Maps/Settings/SwitchCell.h delete mode 100644 iphone/Maps/Settings/SwitchCell.mm (limited to 'iphone/Maps') diff --git a/iphone/Maps/CommunityVC.h b/iphone/Maps/CommunityVC.h deleted file mode 100644 index d52a00e57d..0000000000 --- a/iphone/Maps/CommunityVC.h +++ /dev/null @@ -1,5 +0,0 @@ -#import "MWMTableViewController.h" - -@interface CommunityVC : MWMTableViewController - -@end diff --git a/iphone/Maps/CommunityVC.mm b/iphone/Maps/CommunityVC.mm deleted file mode 100644 index bf82186103..0000000000 --- a/iphone/Maps/CommunityVC.mm +++ /dev/null @@ -1,127 +0,0 @@ -#import "CommunityVC.h" -#import "MWMMailViewController.h" -#import "Statistics.h" -#import "UIImageView+Coloring.h" -#import "UIViewController+Navigation.h" - -#import "../../3party/Alohalytics/src/alohalytics_objc.h" - -extern NSString * const kAlohalyticsTapEventKey; - -@interface CommunityVC () - -@property (nonatomic) NSArray * items; - -@end - -@implementation CommunityVC - -- (void)viewDidLoad -{ - [super viewDidLoad]; - self.title = L(@"maps_me_community"); - - self.items = @[@{@"Title" : @"", - @"Items" : @[@{@"Id" : @"Facebook", @"Title" : L(@"like_on_facebook"), @"Icon" : @"IconFacebook"}, - @{@"Id" : @"Twitter", @"Title" : L(@"follow_on_twitter"), @"Icon" : @"IconTwitter"}, - @{@"Id" : @"Subscribe", @"Title" : L(@"subscribe_to_news"), @"Icon" : @"IconSubscribe"}]}, - @{@"Title" : @"", - @"Items" : @[@{@"Id" : @"Contact", @"Title" : L(@"contact_us"), @"Icon" : @"IconReportABug"}]}]; -} - -- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section -{ - return 0.001; -} - -- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section -{ - return 20; -} - -- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView -{ - return [self.items count]; -} - -- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section -{ - return [self.items[section][@"Items"] count]; -} - -- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath -{ - NSDictionary * item = self.items[indexPath.section][@"Items"][indexPath.row]; - - UITableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:[UITableViewCell className]]; - if (!cell) // iOS 5 - cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:[UITableViewCell className]]; - - cell.textLabel.text = item[@"Title"]; - cell.imageView.image = [UIImage imageNamed:item[@"Icon"]]; - cell.imageView.mwm_coloring = MWMImageColoringBlack; - return cell; -} - -- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath -{ - NSString * itemId = self.items[indexPath.section][@"Items"][indexPath.row][@"Id"]; - [Statistics logEvent:kStatEventName(kStatSocial, kStatToggleCompassCalibration) - withParameters:@{kStatValue : itemId}]; - if ([itemId isEqualToString:@"Facebook"]) - { - [Alohalytics logEvent:kAlohalyticsTapEventKey withValue:@"likeOnFb"]; - [self openUrl:[NSURL URLWithString:@"https://facebook.com/MapsWithMe"]]; - } - else if ([itemId isEqualToString:@"Twitter"]) - { - [Alohalytics logEvent:kAlohalyticsTapEventKey withValue:@"followOnTwitter"]; - [self openUrl:[NSURL URLWithString:@"https://twitter.com/MAPS_ME"]]; - } - else if ([itemId isEqualToString:@"Contact"]) - { - [Alohalytics logEvent:kAlohalyticsTapEventKey withValue:@"contactUs"]; - [self contact]; - } - else if ([itemId isEqualToString:@"Subscribe"]) - { - [Alohalytics logEvent:kAlohalyticsTapEventKey withValue:@"subscribeToNews"]; - [self subscribe]; - } - [tableView deselectRowAtIndexPath:indexPath animated:YES]; -} - -- (void)contact -{ - [self sendEmailWithText:nil subject:@"MAPS.ME" toRecipient:@"ios@maps.me"]; -} - -- (void)subscribe -{ - [self sendEmailWithText:L(@"subscribe_me_body") subject:L(@"subscribe_me_subject") toRecipient:@"subscribe@maps.me"]; -} - -- (void)sendEmailWithText:(NSString *)text subject:(NSString *)subject toRecipient:(NSString *)email -{ - if ([MWMMailViewController canSendMail]) - { - MWMMailViewController * vc = [[MWMMailViewController alloc] init]; - vc.mailComposeDelegate = self; - [vc setSubject:subject]; - [vc setMessageBody:text isHTML:NO]; - [vc setToRecipients:@[email]]; - [self presentViewController:vc animated:YES completion:nil]; - } - else - { - NSString * text = [NSString stringWithFormat:L(@"email_error_body"), email]; - [[[UIAlertView alloc] initWithTitle:L(@"email_error_title") message:text delegate:nil cancelButtonTitle:L(@"ok") otherButtonTitles:nil] show]; - } -} - -- (void)mailComposeController:(MFMailComposeViewController *)controller didFinishWithResult:(MFMailComposeResult)result error:(NSError *)error -{ - [self dismissViewControllerAnimated:YES completion:nil]; -} - -@end diff --git a/iphone/Maps/MWMAboutController.h b/iphone/Maps/MWMAboutController.h deleted file mode 100644 index bf44d902da..0000000000 --- a/iphone/Maps/MWMAboutController.h +++ /dev/null @@ -1,5 +0,0 @@ -#import "MWMTableViewController.h" - -@interface MWMAboutController : MWMTableViewController - -@end diff --git a/iphone/Maps/MWMAboutController.mm b/iphone/Maps/MWMAboutController.mm deleted file mode 100644 index 6df96a4dc4..0000000000 --- a/iphone/Maps/MWMAboutController.mm +++ /dev/null @@ -1,136 +0,0 @@ -#import "MWMAboutController.h" -#import "AppInfo.h" -#import "LinkCell.h" -#import "MWMMailViewController.h" -#import "Statistics.h" -#import "WebViewController.h" - -#import "3party/Alohalytics/src/alohalytics_objc.h" - -#include "Framework.h" - -#include "platform/platform.hpp" - -extern NSString * const kAlohalyticsTapEventKey; - -@interface MWMAboutController () - -@property(weak, nonatomic) IBOutlet UILabel * versionLabel; -@property(weak, nonatomic) IBOutlet UILabel * dateLabel; - -@property(weak, nonatomic) IBOutlet LinkCell * websiteCell; -@property(weak, nonatomic) IBOutlet LinkCell * blogCell; -@property(weak, nonatomic) IBOutlet LinkCell * facebookCell; -@property(weak, nonatomic) IBOutlet LinkCell * twitterCell; -@property(weak, nonatomic) IBOutlet LinkCell * subscribeCell; -@property(weak, nonatomic) IBOutlet LinkCell * rateCell; -@property(weak, nonatomic) IBOutlet LinkCell * copyrightCell; - -@property(nonatomic) IBOutlet UIView * headerView; - -@end - -@implementation MWMAboutController - -- (void)viewDidLoad -{ - [super viewDidLoad]; - self.title = L(@"about_menu_title"); - - [[NSBundle mainBundle] loadNibNamed:@"MWMAboutControllerHeader" owner:self options:nil]; - self.tableView.tableHeaderView = self.headerView; - - AppInfo * appInfo = [AppInfo sharedInfo]; - NSString * version = appInfo.bundleVersion; - if (appInfo.buildNumber) - version = [NSString stringWithFormat:@"%@.%@", version, appInfo.buildNumber]; - self.versionLabel.text = [NSString stringWithFormat:L(@"version"), version]; - - NSDateFormatter * dateFormatter = [[NSDateFormatter alloc] init]; - dateFormatter.dateStyle = NSDateFormatterShortStyle; - dateFormatter.timeStyle = NSDateFormatterNoStyle; - auto const dataVersion = GetFramework().GetCurrentDataVersion(); - self.dateLabel.text = [NSString stringWithFormat:L(@"date"), dataVersion]; -} - -- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath -{ - [tableView deselectRowAtIndexPath:indexPath animated:YES]; - LinkCell * cell = static_cast([tableView cellForRowAtIndexPath:indexPath]); - if (cell == self.websiteCell) - { - [Alohalytics logEvent:kAlohalyticsTapEventKey withValue:@"website"]; - [self openUrl:[NSURL URLWithString:@"https://maps.me"]]; - } - else if (cell == self.blogCell) - { - [Alohalytics logEvent:kAlohalyticsTapEventKey withValue:@"blog"]; - [self openUrl:[NSURL URLWithString:@"http://blog.maps.me"]]; - } - else if (cell == self.facebookCell) - { - [Alohalytics logEvent:kAlohalyticsTapEventKey withValue:@"likeOnFb"]; - [self openUrl:[NSURL URLWithString:@"https://facebook.com/MapsWithMe"]]; - } - else if (cell == self.twitterCell) - { - [Alohalytics logEvent:kAlohalyticsTapEventKey withValue:@"followOnTwitter"]; - [self openUrl:[NSURL URLWithString:@"https://twitter.com/MAPS_ME"]]; - } - else if (cell == self.subscribeCell) - { - [Alohalytics logEvent:kAlohalyticsTapEventKey withValue:@"subscribeToNews"]; - [self sendEmailWithText:L(@"subscribe_me_body") - subject:L(@"subscribe_me_subject") - toRecipient:@"subscribe@maps.me"]; - } - else if (cell == self.rateCell) - { - [Statistics logEvent:kStatSettingsOpenSection withParameters:@{kStatName : kStatRate}]; - [Alohalytics logEvent:kAlohalyticsTapEventKey withValue:@"rate"]; - [[UIApplication sharedApplication] rateVersionFrom:@"rate_menu_item"]; - } - else if (cell == self.copyrightCell) - { - [Statistics logEvent:kStatSettingsOpenSection withParameters:@{kStatName : kStatCopyright}]; - [Alohalytics logEvent:kAlohalyticsTapEventKey withValue:@"copyright"]; - string s; - GetPlatform().GetReader("copyright.html")->ReadAsString(s); - NSString * text = [NSString stringWithFormat:@"%@\n%@", self.versionLabel.text, @(s.c_str())]; - WebViewController * aboutViewController = - [[WebViewController alloc] initWithHtml:text baseUrl:nil andTitleOrNil:L(@"copyright")]; - aboutViewController.openInSafari = YES; - [self.navigationController pushViewController:aboutViewController animated:YES]; - } -} - -- (void)sendEmailWithText:(NSString *)text subject:(NSString *)subject toRecipient:(NSString *)email -{ - if ([MWMMailViewController canSendMail]) - { - MWMMailViewController * vc = [[MWMMailViewController alloc] init]; - vc.mailComposeDelegate = self; - [vc setSubject:subject]; - [vc setMessageBody:text isHTML:NO]; - [vc setToRecipients:@[ email ]]; - [self presentViewController:vc animated:YES completion:nil]; - } - else - { - NSString * text = [NSString stringWithFormat:L(@"email_error_body"), email]; - [[[UIAlertView alloc] initWithTitle:L(@"email_error_title") - message:text - delegate:nil - cancelButtonTitle:L(@"ok") - otherButtonTitles:nil] show]; - } -} - -- (void)mailComposeController:(MFMailComposeViewController *)controller - didFinishWithResult:(MFMailComposeResult)result - error:(NSError *)error -{ - [self dismissViewControllerAnimated:YES completion:nil]; -} - -@end diff --git a/iphone/Maps/MWMAboutControllerHeader.xib b/iphone/Maps/MWMAboutControllerHeader.xib deleted file mode 100644 index 8adc47bd07..0000000000 --- a/iphone/Maps/MWMAboutControllerHeader.xib +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/iphone/Maps/MWMHelpController.h b/iphone/Maps/MWMHelpController.h deleted file mode 100644 index 8906ecbabb..0000000000 --- a/iphone/Maps/MWMHelpController.h +++ /dev/null @@ -1,5 +0,0 @@ -#import "MWMViewController.h" - -@interface MWMHelpController : MWMViewController - -@end diff --git a/iphone/Maps/MWMHelpController.mm b/iphone/Maps/MWMHelpController.mm deleted file mode 100644 index 5ba66f4395..0000000000 --- a/iphone/Maps/MWMHelpController.mm +++ /dev/null @@ -1,254 +0,0 @@ -#import "MWMHelpController.h" -#import -#import "AppInfo.h" -#import "Common.h" -#import "MWMMailViewController.h" -#import "Statistics.h" -#import "UIColor+MapsMeColor.h" -#import "WebViewController.h" - -#import "3party/Alohalytics/src/alohalytics_objc.h" - -#include "platform/platform.hpp" - -extern NSString * const kAlohalyticsTapEventKey; -extern NSString * const kLocaleUsedInSupportEmails = @"en_gb"; -extern NSDictionary * const kDeviceNames = @{ - @"i386" : @"Simulator", - @"iPad1,1" : @"iPad WiFi", - @"iPad1,2" : @"iPad GSM", - @"iPad2,1" : @"iPad 2 WiFi", - @"iPad2,2" : @"iPad 2 CDMA", - @"iPad2,2" : @"iPad 2 GSM", - @"iPad2,3" : @"iPad 2 GSM EV-DO", - @"iPad2,4" : @"iPad 2", - @"iPad2,5" : @"iPad Mini WiFi", - @"iPad2,6" : @"iPad Mini GSM", - @"iPad2,7" : @"iPad Mini CDMA", - @"iPad3,1" : @"iPad 3rd gen. WiFi", - @"iPad3,2" : @"iPad 3rd gen. GSM", - @"iPad3,3" : @"iPad 3rd gen. CDMA", - @"iPad3,4" : @"iPad 4th gen. WiFi", - @"iPad3,5" : @"iPad 4th gen. GSM", - @"iPad3,6" : @"iPad 4th gen. CDMA", - @"iPad4,1" : @"iPad Air WiFi", - @"iPad4,2" : @"iPad Air GSM", - @"iPad4,3" : @"iPad Air CDMA", - @"iPad4,4" : @"iPad Mini 2nd gen. WiFi", - @"iPad4,5" : @"iPad Mini 2nd gen. GSM", - @"iPad4,6" : @"iPad Mini 2nd gen. CDMA", - @"iPad5,3" : @"iPad Air 2 WiFi", - @"iPad5,4" : @"iPad Air 2 GSM", - @"iPad6,3" : @"iPad Pro (9.7 inch) WiFi", - @"iPad6,4" : @"iPad Pro (9.7 inch) GSM", - @"iPad6,7" : @"iPad Pro (12.9 inch) WiFi", - @"iPad6,8" : @"iPad Pro (12.9 inch) GSM", - @"iPhone1,1" : @"iPhone", - @"iPhone1,2" : @"iPhone 3G", - @"iPhone2,1" : @"iPhone 3GS", - @"iPhone3,1" : @"iPhone 4 GSM", - @"iPhone3,2" : @"iPhone 4 CDMA", - @"iPhone3,3" : @"iPhone 4 GSM EV-DO", - @"iPhone4,1" : @"iPhone 4S", - @"iPhone4,2" : @"iPhone 4S", - @"iPhone4,3" : @"iPhone 4S", - @"iPhone5,1" : @"iPhone 5", - @"iPhone5,2" : @"iPhone 5", - @"iPhone5,3" : @"iPhone 5c", - @"iPhone5,4" : @"iPhone 5c", - @"iPhone6,1" : @"iPhone 5s", - @"iPhone6,2" : @"iPhone 5s", - @"iPhone7,1" : @"iPhone 6 Plus", - @"iPhone7,2" : @"iPhone 6", - @"iPhone8,1" : @"iPhone 6s", - @"iPhone8,2" : @"iPhone 6s Plus", - @"iPhone8,4" : @"iPhone SE", - @"iPod1,1" : @"iPod Touch", - @"iPod2,1" : @"iPod Touch 2nd gen.", - @"iPod3,1" : @"iPod Touch 3rd gen.", - @"iPod4,1" : @"iPod Touch 4th gen.", - @"iPod5,1" : @"iPod Touch 5th gen.", - @"x86_64" : @"Simulator", -}; - -namespace -{ -NSString * const kCommonReportActionTitle = L(@"leave_a_review"); -NSString * const kBugReportActionTitle = L(@"something_is_not_working"); -NSString * const kCancelActionTitle = L(@"cancel"); -NSString * const kiOSEmail = @"ios@maps.me"; -} - -@interface MWMHelpController () - -@property(nonatomic) WebViewController * aboutViewController; - -@property(weak, nonatomic) IBOutlet UIView * separatorView; - -@end // namespace - -@implementation MWMHelpController - -- (void)viewDidLoad -{ - [super viewDidLoad]; - - self.title = L(@"help"); - - NSString * html; - if (GetPlatform().ConnectionStatus() == Platform::EConnectionType::CONNECTION_NONE) - { - NSString * path = [[NSBundle mainBundle] pathForResource:@"faq" ofType:@"html"]; - html = [NSString stringWithContentsOfFile:path encoding:NSUTF8StringEncoding error:nil]; - self.aboutViewController = - [[WebViewController alloc] initWithHtml:html baseUrl:nil andTitleOrNil:nil]; - } - else - { - NSURL * url = [NSURL URLWithString:@"https://support.maps.me"]; - self.aboutViewController = [[WebViewController alloc] initWithUrl:url andTitleOrNil:nil]; - } - - self.aboutViewController.openInSafari = NO; - UIView * aboutView = self.aboutViewController.view; - [self addChildViewController:self.aboutViewController]; - [self.view addSubview:aboutView]; - - aboutView.translatesAutoresizingMaskIntoConstraints = NO; - NSLayoutConstraint * top = [NSLayoutConstraint constraintWithItem:self.view - attribute:NSLayoutAttributeTop - relatedBy:NSLayoutRelationEqual - toItem:aboutView - attribute:NSLayoutAttributeTop - multiplier:1.0 - constant:0.0]; - NSLayoutConstraint * bottom = [NSLayoutConstraint constraintWithItem:self.separatorView - attribute:NSLayoutAttributeTop - relatedBy:NSLayoutRelationEqual - toItem:aboutView - attribute:NSLayoutAttributeBottom - multiplier:1.0 - constant:0.0]; - NSLayoutConstraint * left = [NSLayoutConstraint constraintWithItem:self.view - attribute:NSLayoutAttributeLeft - relatedBy:NSLayoutRelationEqual - toItem:aboutView - attribute:NSLayoutAttributeLeft - multiplier:1.0 - constant:0.0]; - NSLayoutConstraint * right = [NSLayoutConstraint constraintWithItem:self.view - attribute:NSLayoutAttributeRight - relatedBy:NSLayoutRelationEqual - toItem:aboutView - attribute:NSLayoutAttributeRight - multiplier:1.0 - constant:0.0]; - - [self.view addConstraints:@[ top, bottom, left, right ]]; -} - -- (IBAction)reportBug -{ - UIAlertController * alert = - [UIAlertController alertControllerWithTitle:L(@"feedback") - message:nil - preferredStyle:UIAlertControllerStyleAlert]; - - UIAlertAction * commonReport = [UIAlertAction actionWithTitle:kCommonReportActionTitle - style:UIAlertActionStyleDefault - handler:^(UIAlertAction * _Nonnull action) { - [self commonReportAction]; - }]; - [alert addAction:commonReport]; - - UIAlertAction * bugReport = [UIAlertAction actionWithTitle:kBugReportActionTitle - style:UIAlertActionStyleDefault - handler:^(UIAlertAction * _Nonnull action) { - [self bugReportAction]; - }]; - [alert addAction:bugReport]; - - UIAlertAction * cancel = - [UIAlertAction actionWithTitle:kCancelActionTitle style:UIAlertActionStyleCancel handler:nil]; - [alert addAction:cancel]; - alert.preferredAction = cancel; - - [self presentViewController:alert animated:YES completion:nil]; -} - -#pragma mark - Actions - -- (void)commonReportAction -{ - [Statistics logEvent:kStatSettingsOpenSection withParameters:@{kStatName : kStatFeedback}]; - [Alohalytics logEvent:kAlohalyticsTapEventKey withValue:@"contactUs"]; - // Do not localize subject. Support team uses it to filter emails. - [self sendEmailWithSubject:@"Feedback from user" toRecipient:kiOSEmail]; -} - -- (void)bugReportAction -{ - [Statistics logEvent:kStatSettingsOpenSection withParameters:@{kStatName : kStatReport}]; - [Alohalytics logEvent:kAlohalyticsTapEventKey withValue:@"reportABug"]; - // Do not localize subject. Support team uses it to filter emails. - [self sendEmailWithSubject:@"Bug report from user" toRecipient:kiOSEmail]; -} - -#pragma mark - Email - -- (void)sendEmailWithSubject:(NSString *)subject toRecipient:(NSString *)email -{ - if ([MWMMailViewController canSendMail]) - { - struct utsname systemInfo; - uname(&systemInfo); - NSString * machine = - [NSString stringWithCString:systemInfo.machine encoding:NSUTF8StringEncoding]; - NSString * device = kDeviceNames[machine]; - if (!device) - device = machine; - NSString * languageCode = [[NSLocale preferredLanguages] firstObject]; - NSString * language = [[NSLocale localeWithLocaleIdentifier:kLocaleUsedInSupportEmails] - displayNameForKey:NSLocaleLanguageCode - value:languageCode]; - NSString * locale = [[NSLocale currentLocale] objectForKey:NSLocaleCountryCode]; - NSString * country = [[NSLocale localeWithLocaleIdentifier:kLocaleUsedInSupportEmails] - displayNameForKey:NSLocaleCountryCode - value:locale]; - NSString * bundleVersion = - [[NSBundle mainBundle] objectForInfoDictionaryKey:(NSString *)kCFBundleVersionKey]; - NSString * text = [NSString stringWithFormat:@"\n\n\n\n- %@ (%@)\n- MAPS.ME %@\n- %@/%@", - device, [UIDevice currentDevice].systemVersion, - bundleVersion, language, country]; - NSString * alohalyticsId = [Alohalytics installationId]; - if (alohalyticsId) - text = [NSString stringWithFormat:@"%@\n- %@", text, alohalyticsId]; - - MWMMailViewController * vc = [[MWMMailViewController alloc] init]; - vc.mailComposeDelegate = self; - [vc setSubject:[NSString stringWithFormat:@"[%@ iOS] %@", [AppInfo sharedInfo].bundleVersion, - subject]]; - [vc setMessageBody:text isHTML:NO]; - [vc setToRecipients:@[ email ]]; - [vc.navigationBar setTintColor:[UIColor whitePrimaryText]]; - [self presentViewController:vc animated:YES completion:nil]; - } - else - { - NSString * text = [NSString stringWithFormat:L(@"email_error_body"), email]; - [[[UIAlertView alloc] initWithTitle:L(@"email_error_title") - message:text - delegate:nil - cancelButtonTitle:L(@"ok") - otherButtonTitles:nil] show]; - } -} - -- (void)mailComposeController:(MFMailComposeViewController *)controller - didFinishWithResult:(MFMailComposeResult)result - error:(NSError *)error -{ - [self dismissViewControllerAnimated:YES completion:nil]; -} - -@end diff --git a/iphone/Maps/MWMMobileInternetViewController.h b/iphone/Maps/MWMMobileInternetViewController.h deleted file mode 100644 index bdd9ce1e5b..0000000000 --- a/iphone/Maps/MWMMobileInternetViewController.h +++ /dev/null @@ -1,5 +0,0 @@ -#import "MWMTableViewController.h" - -@interface MWMMobileInternetViewController : MWMTableViewController - -@end diff --git a/iphone/Maps/MWMMobileInternetViewController.mm b/iphone/Maps/MWMMobileInternetViewController.mm deleted file mode 100644 index 822e791003..0000000000 --- a/iphone/Maps/MWMMobileInternetViewController.mm +++ /dev/null @@ -1,77 +0,0 @@ -#import "MWMMobileInternetViewController.h" -#import "MWMNetworkPolicy.h" -#import "SelectableCell.h" -#import "Statistics.h" - -using namespace network_policy; -using np = platform::NetworkPolicy; - -@interface MWMMobileInternetViewController () - -@property(weak, nonatomic) IBOutlet SelectableCell * always; -@property(weak, nonatomic) IBOutlet SelectableCell * ask; -@property(weak, nonatomic) IBOutlet SelectableCell * never; -@property(weak, nonatomic) SelectableCell * selected; - -@end - -@implementation MWMMobileInternetViewController - -- (void)viewDidLoad -{ - [super viewDidLoad]; - self.title = L(@"mobile_data"); - - SelectableCell * selected; - switch (GetStage()) - { - case np::Stage::Always: selected = self.always; break; - case np::Stage::Session: selected = self.ask; break; - case np::Stage::Never: selected = self.never; break; - } - selected.accessoryType = UITableViewCellAccessoryCheckmark; - self.selected = selected; -} - -- (void)setSelected:(SelectableCell *)selected -{ - if ([_selected isEqual:selected]) - return; - - _selected = selected; - NSString * statValue = nil; - if ([selected isEqual:self.always]) - { - statValue = kStatAlways; - SetStage(np::Stage::Always); - } - else if ([selected isEqual:self.ask]) - { - statValue = kStatAsk; - SetStage(np::Stage::Session); - } - else if ([selected isEqual:self.never]) - { - statValue = kStatNever; - SetStage(np::Stage::Never); - } - - [Statistics logEvent:kStatMobileInternet withParameters:@{kStatValue : statValue}]; -} - -- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath -{ - SelectableCell * selected = self.selected; - selected.accessoryType = UITableViewCellAccessoryNone; - selected = [tableView cellForRowAtIndexPath:indexPath]; - selected.accessoryType = UITableViewCellAccessoryCheckmark; - selected.selected = NO; - self.selected = selected; -} - -- (NSString *)tableView:(UITableView *)tableView titleForFooterInSection:(NSInteger)section -{ - return L(@"mobile_data_description"); -} - -@end diff --git a/iphone/Maps/MWMNightModeController.h b/iphone/Maps/MWMNightModeController.h deleted file mode 100644 index 27b77f6f56..0000000000 --- a/iphone/Maps/MWMNightModeController.h +++ /dev/null @@ -1,5 +0,0 @@ -#import "MWMTableViewController.h" - -@interface MWMNightModeController : MWMTableViewController - -@end diff --git a/iphone/Maps/MWMNightModeController.mm b/iphone/Maps/MWMNightModeController.mm deleted file mode 100644 index 0ffb6f81db..0000000000 --- a/iphone/Maps/MWMNightModeController.mm +++ /dev/null @@ -1,102 +0,0 @@ -#import "MWMNightModeController.h" -#import "MWMSettings.h" -#import "MapsAppDelegate.h" -#import "SelectableCell.h" -#import "Statistics.h" -#import "UIColor+MapsMeColor.h" - -#include "Framework.h" - -@interface MWMNightModeController () - -@property(weak, nonatomic) IBOutlet SelectableCell * autoSwitch; -@property(weak, nonatomic) IBOutlet SelectableCell * on; -@property(weak, nonatomic) IBOutlet SelectableCell * off; -@property(weak, nonatomic) SelectableCell * selectedCell; - -@end - -@implementation MWMNightModeController - -- (void)viewDidLoad -{ - [super viewDidLoad]; - self.title = L(@"pref_map_style_title"); - if ([MWMSettings autoNightModeEnabled]) - { - self.autoSwitch.accessoryType = UITableViewCellAccessoryCheckmark; - _selectedCell = self.autoSwitch; - return; - } - - switch (GetFramework().GetMapStyle()) - { - case MapStyleDark: - self.on.accessoryType = UITableViewCellAccessoryCheckmark; - _selectedCell = self.on; - break; - case MapStyleClear: - case MapStyleLight: - self.off.accessoryType = UITableViewCellAccessoryCheckmark; - _selectedCell = self.off; - break; - case MapStyleMerged: - case MapStyleCount: break; - } -} - -- (void)setSelectedCell:(SelectableCell *)cell -{ - if ([_selectedCell isEqual:cell]) - return; - - _selectedCell = cell; - auto & f = GetFramework(); - auto const style = f.GetMapStyle(); - NSString * statValue = nil; - if ([cell isEqual:self.on]) - { - [MapsAppDelegate setAutoNightModeOff:YES]; - if (style == MapStyleDark) - return; - f.SetMapStyle(MapStyleDark); - [UIColor setNightMode:YES]; - [self mwm_refreshUI]; - statValue = kStatOn; - } - else if ([cell isEqual:self.off]) - { - [MapsAppDelegate setAutoNightModeOff:YES]; - if (style == MapStyleClear || style == MapStyleLight) - return; - f.SetMapStyle(MapStyleClear); - [UIColor setNightMode:NO]; - [self mwm_refreshUI]; - statValue = kStatOff; - } - else if ([cell isEqual:self.autoSwitch]) - { - [MapsAppDelegate setAutoNightModeOff:NO]; - [MapsAppDelegate changeMapStyleIfNedeed]; - if (style == MapStyleClear || style == MapStyleLight) - return; - [UIColor setNightMode:NO]; - f.SetMapStyle(MapStyleClear); - [self mwm_refreshUI]; - statValue = kStatValue; - } - - [Statistics logEvent:kStatNightMode withParameters:@{kStatValue : statValue}]; -} - -- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath -{ - SelectableCell * selectedCell = self.selectedCell; - selectedCell.accessoryType = UITableViewCellAccessoryNone; - selectedCell = [tableView cellForRowAtIndexPath:indexPath]; - selectedCell.accessoryType = UITableViewCellAccessoryCheckmark; - selectedCell.selected = NO; - self.selectedCell = selectedCell; -} - -@end diff --git a/iphone/Maps/MWMRecentTrackSettingsController.h b/iphone/Maps/MWMRecentTrackSettingsController.h deleted file mode 100644 index 4266571020..0000000000 --- a/iphone/Maps/MWMRecentTrackSettingsController.h +++ /dev/null @@ -1,5 +0,0 @@ -#import "MWMTableViewController.h" - -@interface MWMRecentTrackSettingsController : MWMTableViewController - -@end diff --git a/iphone/Maps/MWMRecentTrackSettingsController.mm b/iphone/Maps/MWMRecentTrackSettingsController.mm deleted file mode 100644 index 3b0ec4a2f8..0000000000 --- a/iphone/Maps/MWMRecentTrackSettingsController.mm +++ /dev/null @@ -1,106 +0,0 @@ -#import "MWMRecentTrackSettingsController.h" -#import "SelectableCell.h" -#import "Statistics.h" - -#include "Framework.h" - -#include "map/gps_tracker.hpp" - -extern NSString * const kUDTrackWarningAlertWasShown = @"TrackWarningAlertWasShown"; - -typedef NS_ENUM(NSUInteger, DurationInHours) { One = 1, Two = 2, Six = 6, Twelve = 12, Day = 24 }; - -@interface MWMRecentTrackSettingsController () - -@property(weak, nonatomic) IBOutlet SelectableCell * none; -@property(weak, nonatomic) IBOutlet SelectableCell * oneHour; -@property(weak, nonatomic) IBOutlet SelectableCell * twoHours; -@property(weak, nonatomic) IBOutlet SelectableCell * sixHours; -@property(weak, nonatomic) IBOutlet SelectableCell * twelveHours; -@property(weak, nonatomic) IBOutlet SelectableCell * oneDay; -@property(weak, nonatomic) SelectableCell * selectedCell; - -@end - -@implementation MWMRecentTrackSettingsController - -- (void)viewDidLoad -{ - [super viewDidLoad]; - self.title = L(@"pref_track_record_title"); - - if (!GpsTracker::Instance().IsEnabled()) - { - _selectedCell = self.none; - } - else - { - switch (GpsTracker::Instance().GetDuration().count()) - { - case One: _selectedCell = self.oneHour; break; - case Two: _selectedCell = self.twoHours; break; - case Six: _selectedCell = self.sixHours; break; - case Twelve: _selectedCell = self.twelveHours; break; - case Day: _selectedCell = self.oneDay; break; - default: NSAssert(false, @"Incorrect hours value"); break; - } - } - self.selectedCell.accessoryType = UITableViewCellAccessoryCheckmark; -} - -- (void)setSelectedCell:(SelectableCell *)selectedCell -{ - _selectedCell = selectedCell; - auto & f = GetFramework(); - auto & tracker = GpsTracker::Instance(); - NSString * statValue = nil; - if ([selectedCell isEqual:self.none]) - { - f.DisconnectFromGpsTracker(); - tracker.SetEnabled(false); - statValue = kStatOff; - } - else - { - if (!tracker.IsEnabled()) - { - tracker.SetEnabled(true); - NSUserDefaults * ud = [NSUserDefaults standardUserDefaults]; - [ud setBool:NO forKey:kUDTrackWarningAlertWasShown]; - [ud synchronize]; - } - f.ConnectToGpsTracker(); - - if ([selectedCell isEqual:self.oneHour]) - tracker.SetDuration(hours(One)); - else if ([selectedCell isEqual:self.twoHours]) - tracker.SetDuration(hours(Two)); - else if ([selectedCell isEqual:self.sixHours]) - tracker.SetDuration(hours(Six)); - else if ([selectedCell isEqual:self.twelveHours]) - tracker.SetDuration(hours(Twelve)); - else - tracker.SetDuration(hours(Day)); - - statValue = [NSString stringWithFormat:@"%@ hour(s)", @(tracker.GetDuration().count())]; - } - selectedCell.accessoryType = UITableViewCellAccessoryCheckmark; - [Statistics logEvent:kStatChangeRecentTrack withParameters:@{kStatValue : statValue}]; -} - -- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath -{ - SelectableCell * selectedCell = self.selectedCell; - selectedCell.accessoryType = UITableViewCellAccessoryNone; - selectedCell = [tableView cellForRowAtIndexPath:indexPath]; - selectedCell.selected = NO; - self.selectedCell = selectedCell; -} - -- (NSString *)tableView:(UITableView *)tableView titleForFooterInSection:(NSInteger)section -{ - NSAssert(section == 0, @"Incorrect sections count"); - return L(@"recent_track_help_text"); -} - -@end diff --git a/iphone/Maps/MWMSettings.h b/iphone/Maps/MWMSettings.h deleted file mode 100644 index f2d612c6db..0000000000 --- a/iphone/Maps/MWMSettings.h +++ /dev/null @@ -1,35 +0,0 @@ -#include "platform/measurement_utils.hpp" - -@interface MWMSettings : NSObject - -+ (BOOL)adServerForbidden; -+ (void)setAdServerForbidden:(BOOL)adServerForbidden; - -+ (BOOL)adForbidden; -+ (void)setAdForbidden:(BOOL)adForbidden; - -+ (BOOL)autoDownloadEnabled; -+ (void)setAutoDownloadEnabled:(BOOL)autoDownloadEnabled; - -+ (measurement_utils::Units)measurementUnits; -+ (void)setMeasurementUnits:(measurement_utils::Units)measurementUnits; - -+ (BOOL)zoomButtonsEnabled; -+ (void)setZoomButtonsEnabled:(BOOL)zoomButtonsEnabled; - -+ (BOOL)compassCalibrationEnabled; -+ (void)setCompassCalibrationEnabled:(BOOL)compassCalibrationEnabled; - -+ (BOOL)statisticsEnabled; -+ (void)setStatisticsEnabled:(BOOL)statisticsEnabled; - -+ (BOOL)autoNightModeEnabled; -+ (void)setAutoNightModeEnabled:(BOOL)autoNightModeEnabled; - -+ (BOOL)routingDisclaimerApproved; -+ (void)setRoutingDisclaimerApproved; - -+ (NSString *)spotlightLocaleLanguageId; -+ (void)setSpotlightLocaleLanguageId:(NSString *)spotlightLocaleLanguageId; - -@end diff --git a/iphone/Maps/MWMSettings.mm b/iphone/Maps/MWMSettings.mm deleted file mode 100644 index bcb055a62b..0000000000 --- a/iphone/Maps/MWMSettings.mm +++ /dev/null @@ -1,153 +0,0 @@ -#import "MWMSettings.h" -#import "MWMMapViewControlsManager.h" - -#import "3party/Alohalytics/src/alohalytics_objc.h" - -#include "Framework.h" - -#include "platform/settings.hpp" - -namespace -{ -char const * kAdForbiddenSettingsKey = "AdForbidden"; -char const * kAdServerForbiddenKey = "AdServerForbidden"; -char const * kAutoDownloadEnabledKey = "AutoDownloadEnabled"; -char const * kZoomButtonsEnabledKey = "ZoomButtonsEnabled"; -char const * kCompassCalibrationEnabledKey = "CompassCalibrationEnabled"; -char const * kRoutingDisclaimerApprovedKey = "IsDisclaimerApproved"; -char const * kStatisticsEnabledSettingsKey = "StatisticsEnabled"; - -NSString * const kUDAutoNightModeOff = @"AutoNightModeOff"; -NSString * const kSpotlightLocaleLanguageId = @"SpotlightLocaleLanguageId"; -} // namespace - -@implementation MWMSettings - -+ (BOOL)adServerForbidden -{ - bool adServerForbidden = false; - UNUSED_VALUE(settings::Get(kAdServerForbiddenKey, adServerForbidden)); - return adServerForbidden; -} - -+ (void)setAdServerForbidden:(BOOL)adServerForbidden -{ - settings::Set(kAdServerForbiddenKey, static_cast(adServerForbidden)); -} - -+ (BOOL)adForbidden -{ - bool adForbidden = false; - UNUSED_VALUE(settings::Get(kAdForbiddenSettingsKey, adForbidden)); - return adForbidden; -} - -+ (void)setAdForbidden:(BOOL)adForbidden -{ - settings::Set(kAdForbiddenSettingsKey, static_cast(adForbidden)); -} - -+ (BOOL)autoDownloadEnabled -{ - bool autoDownloadEnabled = true; - UNUSED_VALUE(settings::Get(kAutoDownloadEnabledKey, autoDownloadEnabled)); - return autoDownloadEnabled; -} - -+ (void)setAutoDownloadEnabled:(BOOL)autoDownloadEnabled -{ - settings::Set(kAutoDownloadEnabledKey, static_cast(autoDownloadEnabled)); -} - -+ (measurement_utils::Units)measurementUnits -{ - auto units = measurement_utils::Units::Metric; - UNUSED_VALUE(settings::Get(settings::kMeasurementUnits, units)); - return units; -} - -+ (void)setMeasurementUnits:(measurement_utils::Units)measurementUnits -{ - settings::Set(settings::kMeasurementUnits, measurementUnits); - GetFramework().SetupMeasurementSystem(); -} - -+ (BOOL)zoomButtonsEnabled -{ - bool enabled = true; - UNUSED_VALUE(settings::Get(kZoomButtonsEnabledKey, enabled)); - return enabled; -} - -+ (void)setZoomButtonsEnabled:(BOOL)zoomButtonsEnabled -{ - settings::Set(kZoomButtonsEnabledKey, static_cast(zoomButtonsEnabled)); - [MWMMapViewControlsManager manager].zoomHidden = !zoomButtonsEnabled; -} - -+ (BOOL)compassCalibrationEnabled -{ - bool enabled = true; - UNUSED_VALUE(settings::Get(kCompassCalibrationEnabledKey, enabled)); - return enabled; -} - -+ (void)setCompassCalibrationEnabled:(BOOL)compassCalibrationEnabled -{ - settings::Set(kCompassCalibrationEnabledKey, static_cast(compassCalibrationEnabled)); -} - -+ (BOOL)statisticsEnabled -{ - bool enabled = true; - UNUSED_VALUE(settings::Get(kStatisticsEnabledSettingsKey, enabled)); - return enabled; -} - -+ (void)setStatisticsEnabled:(BOOL)statisticsEnabled -{ - if (statisticsEnabled) - { - [Alohalytics enable]; - } - else - { - [Alohalytics logEvent:@"statisticsDisabled"]; - [Alohalytics disable]; - } - settings::Set(kStatisticsEnabledSettingsKey, static_cast(statisticsEnabled)); -} - -+ (BOOL)autoNightModeEnabled -{ - return ![[NSUserDefaults standardUserDefaults] boolForKey:kUDAutoNightModeOff]; -} - -+ (void)setAutoNightModeEnabled:(BOOL)autoNightModeEnabled -{ - NSUserDefaults * ud = [NSUserDefaults standardUserDefaults]; - [ud setBool:!autoNightModeEnabled forKey:kUDAutoNightModeOff]; - [ud synchronize]; -} - -+ (BOOL)routingDisclaimerApproved -{ - bool enabled = false; - UNUSED_VALUE(settings::Get(kRoutingDisclaimerApprovedKey, enabled)); - return enabled; -} - -+ (void)setRoutingDisclaimerApproved { settings::Set(kRoutingDisclaimerApprovedKey, true); } -+ (NSString *)spotlightLocaleLanguageId -{ - return [[NSUserDefaults standardUserDefaults] stringForKey:kSpotlightLocaleLanguageId]; -} - -+ (void)setSpotlightLocaleLanguageId:(NSString *)spotlightLocaleLanguageId -{ - NSUserDefaults * ud = [NSUserDefaults standardUserDefaults]; - [ud setObject:spotlightLocaleLanguageId forKey:kSpotlightLocaleLanguageId]; - [ud synchronize]; -} - -@end diff --git a/iphone/Maps/MWMTTSLanguageViewController.h b/iphone/Maps/MWMTTSLanguageViewController.h deleted file mode 100644 index a7b6a64ac2..0000000000 --- a/iphone/Maps/MWMTTSLanguageViewController.h +++ /dev/null @@ -1,5 +0,0 @@ -#import "MWMTableViewController.h" - -@interface MWMTTSLanguageViewController : MWMTableViewController - -@end diff --git a/iphone/Maps/MWMTTSLanguageViewController.mm b/iphone/Maps/MWMTTSLanguageViewController.mm deleted file mode 100644 index 8b1e2b269a..0000000000 --- a/iphone/Maps/MWMTTSLanguageViewController.mm +++ /dev/null @@ -1,41 +0,0 @@ -#import "MWMTextToSpeech.h" -#import "MWMTTSLanguageViewController.h" -#import "MWMTTSSettingsViewController.h" -#import "SelectableCell.h" -#import "UIColor+MapsMeColor.h" - -static NSString * const kUnwingSegueIdentifier = @"UnwindToTTSSettings"; - -@implementation MWMTTSLanguageViewController - -- (void)viewDidLoad -{ - [super viewDidLoad]; - self.title = L(@"pref_tts_other_section_title"); - self.tableView.separatorColor = [UIColor blackDividers]; -} - -- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(SelectableCell *)sender -{ - if (![segue.identifier isEqualToString:kUnwingSegueIdentifier]) - return; - MWMTTSSettingsViewController * dest = segue.destinationViewController; - NSUInteger const row = [self.tableView indexPathForCell:sender].row; - [dest setAdditionalTTSLanguage:[[MWMTextToSpeech tts] availableLanguages][row]]; -} - -#pragma mark - UITableViewDataSource && UITableViewDelegate - -- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section -{ - return [[MWMTextToSpeech tts] availableLanguages].size(); -} - -- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath -{ - SelectableCell * cell = (SelectableCell *)[tableView dequeueReusableCellWithIdentifier:[SelectableCell className]]; - cell.titleLabel.text = @([[MWMTextToSpeech tts] availableLanguages][indexPath.row].second.c_str()); - return cell; -} - -@end diff --git a/iphone/Maps/MWMTTSSettingsViewController.h b/iphone/Maps/MWMTTSSettingsViewController.h deleted file mode 100644 index 9c364a5247..0000000000 --- a/iphone/Maps/MWMTTSSettingsViewController.h +++ /dev/null @@ -1,10 +0,0 @@ -#import "MWMTableViewController.h" - -#include "std/utility.hpp" -#include "std/string.hpp" - -@interface MWMTTSSettingsViewController : MWMTableViewController - -- (void)setAdditionalTTSLanguage:(pair const &)l; - -@end diff --git a/iphone/Maps/MWMTTSSettingsViewController.mm b/iphone/Maps/MWMTTSSettingsViewController.mm deleted file mode 100644 index bc120aee3c..0000000000 --- a/iphone/Maps/MWMTTSSettingsViewController.mm +++ /dev/null @@ -1,201 +0,0 @@ -#import "MWMTTSSettingsViewController.h" -#import -#import "LinkCell.h" -#import "MWMTextToSpeech.h" -#import "SelectableCell.h" -#import "Statistics.h" -#import "UIColor+MapsMeColor.h" -#import "WebViewController.h" - -#include "LocaleTranslator.h" - -static NSString * kSelectTTSLanguageSegueName = @"TTSLanguage"; - -using namespace locale_translator; - -@interface MWMTTSSettingsViewController () -{ - pair _additionalTTSLanguage; - vector> _languages; -} - -@property(nonatomic) BOOL isLocaleLanguageAbsent; - -@end - -@implementation MWMTTSSettingsViewController - -- (void)viewDidLoad -{ - [super viewDidLoad]; - self.title = L(@"pref_tts_language_title"); - self.tableView.separatorColor = [UIColor blackDividers]; - MWMTextToSpeech * tts = [MWMTextToSpeech tts]; - - _languages.reserve(3); - auto const & v = tts.availableLanguages; - NSAssert(!v.empty(), @"Vector can't be empty!"); - pair const standart = v.front(); - _languages.push_back(standart); - - using namespace tts; - NSString * currentBcp47 = [AVSpeechSynthesisVoice currentLanguageCode]; - string const currentBcp47Str = [currentBcp47 UTF8String]; - string const currentTwineStr = bcp47ToTwineLanguage(currentBcp47); - if (currentBcp47Str != standart.first && !currentBcp47Str.empty()) - { - string const translated = translatedTwine(currentTwineStr); - pair const cur{currentBcp47Str, translated}; - if (translated.empty() || find(v.begin(), v.end(), cur) != v.end()) - _languages.push_back(cur); - else - self.isLocaleLanguageAbsent = YES; - } - - NSString * nsSavedLanguage = [MWMTextToSpeech savedLanguage]; - if (nsSavedLanguage.length) - { - string const savedLanguage = nsSavedLanguage.UTF8String; - if (savedLanguage != currentBcp47Str && savedLanguage != standart.first && - !savedLanguage.empty()) - _languages.emplace_back( - make_pair(savedLanguage, translatedTwine(bcp47ToTwineLanguage(nsSavedLanguage)))); - } -} - -- (IBAction)unwind:(id)sender -{ - size_t const size = _languages.size(); - if (find(_languages.begin(), _languages.end(), _additionalTTSLanguage) != _languages.end()) - { - [self.tableView reloadData]; - return; - } - switch (size) - { - case 1: _languages.push_back(_additionalTTSLanguage); break; - case 2: - if (self.isLocaleLanguageAbsent) - _languages[size - 1] = _additionalTTSLanguage; - else - _languages.push_back(_additionalTTSLanguage); - break; - case 3: _languages[size - 1] = _additionalTTSLanguage; break; - default: NSAssert(false, @"Incorrect language's count"); break; - } - [self.tableView reloadData]; -} - -- (void)setAdditionalTTSLanguage:(pair const &)l -{ - [[MWMTextToSpeech tts] setNotificationsLocale:@(l.first.c_str())]; - _additionalTTSLanguage = l; -} - -#pragma mark - UITableViewDataSource - -- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { return 2; } -- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section -{ - if (section == 0) - return _languages.size() + 2; - else - return 1; -} - -- (UITableViewCell *)tableView:(UITableView *)tableView - cellForRowAtIndexPath:(NSIndexPath *)indexPath -{ - if (indexPath.section == 0) - { - if (indexPath.row == 0) - { - SelectableCell * cell = (SelectableCell *)[tableView - dequeueReusableCellWithIdentifier:[SelectableCell className]]; - cell.titleLabel.text = L(@"duration_disabled"); - cell.accessoryType = [MWMTextToSpeech isTTSEnabled] ? UITableViewCellAccessoryNone : UITableViewCellAccessoryCheckmark; - return cell; - } - else - { - NSInteger const row = indexPath.row - 1; - if (row == _languages.size()) - { - LinkCell * cell = - (LinkCell *)[tableView dequeueReusableCellWithIdentifier:[LinkCell className]]; - cell.titleLabel.text = L(@"pref_tts_other_section_title"); - return cell; - } - else - { - SelectableCell * cell = (SelectableCell *)[tableView - dequeueReusableCellWithIdentifier:[SelectableCell className]]; - pair const p = _languages[row]; - cell.titleLabel.text = @(p.second.c_str()); - BOOL const isSelected = - [@(p.first.c_str()) isEqualToString:[MWMTextToSpeech savedLanguage]]; - cell.accessoryType = [MWMTextToSpeech isTTSEnabled] && isSelected - ? UITableViewCellAccessoryCheckmark - : UITableViewCellAccessoryNone; - return cell; - } - } - } - else - { - LinkCell * cell = - (LinkCell *)[tableView dequeueReusableCellWithIdentifier:[LinkCell className]]; - cell.titleLabel.text = L(@"pref_tts_how_to_set_up_voice"); - return cell; - } -} - -- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath -{ - if (indexPath.section == 0) - { - if (indexPath.row == 0) - { - [Statistics logEvent:kStatEventName(kStatSettings, kStatTTS) - withParameters:@{kStatValue : kStatOff}]; - [MWMTextToSpeech setTTSEnabled:NO]; - [tableView reloadSections:[NSIndexSet indexSetWithIndex:0] - withRowAnimation:UITableViewRowAnimationFade]; - } - else - { - [Statistics logEvent:kStatEventName(kStatSettings, kStatTTS) - withParameters:@{kStatValue : kStatOn}]; - [MWMTextToSpeech setTTSEnabled:YES]; - NSInteger const row = indexPath.row - 1; - if (row == _languages.size()) - { - [Statistics logEvent:kStatEventName(kStatTTSSettings, kStatChangeLanguage) - withParameters:@{kStatValue : kStatOther}]; - [self performSegueWithIdentifier:kSelectTTSLanguageSegueName sender:nil]; - } - else - { - [[MWMTextToSpeech tts] setNotificationsLocale:@(_languages[row].first.c_str())]; - [tableView reloadSections:[NSIndexSet indexSetWithIndex:0] - withRowAnimation:UITableViewRowAnimationFade]; - } - } - } - else if (indexPath.section == 1) - { - [Statistics logEvent:kStatEventName(kStatTTSSettings, kStatHelp)]; - NSString * path = - [[NSBundle mainBundle] pathForResource:@"tts-how-to-set-up-voice" ofType:@"html"]; - NSString * html = - [[NSString alloc] initWithContentsOfFile:path encoding:NSUTF8StringEncoding error:nil]; - NSURL * baseURL = [NSURL fileURLWithPath:path]; - WebViewController * vc = - [[WebViewController alloc] initWithHtml:html - baseUrl:baseURL - andTitleOrNil:L(@"pref_tts_how_to_set_up_voice")]; - [self.navigationController pushViewController:vc animated:YES]; - } -} - -@end diff --git a/iphone/Maps/MWMUnitsController.h b/iphone/Maps/MWMUnitsController.h deleted file mode 100644 index 9135e1df1e..0000000000 --- a/iphone/Maps/MWMUnitsController.h +++ /dev/null @@ -1,5 +0,0 @@ -#import "MWMTableViewController.h" - -@interface MWMUnitsController : MWMTableViewController - -@end diff --git a/iphone/Maps/MWMUnitsController.mm b/iphone/Maps/MWMUnitsController.mm deleted file mode 100644 index 859b99e12c..0000000000 --- a/iphone/Maps/MWMUnitsController.mm +++ /dev/null @@ -1,57 +0,0 @@ -#import "MWMUnitsController.h" -#import "MWMSettings.h" -#import "SelectableCell.h" -#import "Statistics.h" - -@interface MWMUnitsController () - -@property(weak, nonatomic) IBOutlet SelectableCell * kilometers; -@property(weak, nonatomic) IBOutlet SelectableCell * miles; -@property(weak, nonatomic) SelectableCell * selectedCell; - -@end - -@implementation MWMUnitsController - -- (void)viewDidLoad -{ - [super viewDidLoad]; - self.title = L(@"measurement_units"); - - switch ([MWMSettings measurementUnits]) - { - case measurement_utils::Units::Metric: self.selectedCell = self.kilometers; break; - case measurement_utils::Units::Imperial: self.selectedCell = self.miles; break; - } -} - -- (void)setSelectedCell:(SelectableCell *)cell -{ - SelectableCell * selectedCell = _selectedCell; - if (selectedCell == cell) - return; - - selectedCell.accessoryType = UITableViewCellAccessoryNone; - cell.accessoryType = UITableViewCellAccessoryCheckmark; - cell.selected = NO; - _selectedCell = cell; - if (cell == self.kilometers) - { - [Statistics logEvent:kStatEventName(kStatSettings, kStatChangeMeasureUnits) - withParameters:@{kStatValue : kStatKilometers}]; - [MWMSettings setMeasurementUnits:measurement_utils::Units::Metric]; - } - else - { - [Statistics logEvent:kStatEventName(kStatSettings, kStatChangeMeasureUnits) - withParameters:@{kStatValue : kStatMiles}]; - [MWMSettings setMeasurementUnits:measurement_utils::Units::Imperial]; - } -} - -- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath -{ - self.selectedCell = [tableView cellForRowAtIndexPath:indexPath]; -} - -@end diff --git a/iphone/Maps/Maps.xcodeproj/project.pbxproj b/iphone/Maps/Maps.xcodeproj/project.pbxproj index 78ec3c7614..6a50fa59a1 100644 --- a/iphone/Maps/Maps.xcodeproj/project.pbxproj +++ b/iphone/Maps/Maps.xcodeproj/project.pbxproj @@ -129,6 +129,18 @@ 34479C7D1C60C6130065D261 /* MWMFrameworkListener.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34479C781C60C6130065D261 /* MWMFrameworkListener.mm */; }; 344D77B41D1BD7C800DBED70 /* MWMLocationManager.mm in Sources */ = {isa = PBXBuildFile; fileRef = 344D77B31D1BD7C800DBED70 /* MWMLocationManager.mm */; }; 344D77B51D1BD7C800DBED70 /* MWMLocationManager.mm in Sources */ = {isa = PBXBuildFile; fileRef = 344D77B31D1BD7C800DBED70 /* MWMLocationManager.mm */; }; + 345050021E0287C400A8DC59 /* LinkCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34504FFD1E0287C400A8DC59 /* LinkCell.mm */; }; + 345050031E0287C400A8DC59 /* LinkCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34504FFD1E0287C400A8DC59 /* LinkCell.mm */; }; + 345050041E0287C400A8DC59 /* LinkCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34504FFD1E0287C400A8DC59 /* LinkCell.mm */; }; + 345050051E0287C400A8DC59 /* SelectableCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34504FFF1E0287C400A8DC59 /* SelectableCell.mm */; }; + 345050061E0287C400A8DC59 /* SelectableCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34504FFF1E0287C400A8DC59 /* SelectableCell.mm */; }; + 345050071E0287C400A8DC59 /* SelectableCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34504FFF1E0287C400A8DC59 /* SelectableCell.mm */; }; + 345050081E0287C400A8DC59 /* SwitchCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = 345050011E0287C400A8DC59 /* SwitchCell.mm */; }; + 345050091E0287C400A8DC59 /* SwitchCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = 345050011E0287C400A8DC59 /* SwitchCell.mm */; }; + 3450500A1E0287C400A8DC59 /* SwitchCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = 345050011E0287C400A8DC59 /* SwitchCell.mm */; }; + 345050121E02887000A8DC59 /* MWMSettingsViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 345050111E02887000A8DC59 /* MWMSettingsViewController.mm */; }; + 345050131E02887000A8DC59 /* MWMSettingsViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 345050111E02887000A8DC59 /* MWMSettingsViewController.mm */; }; + 345050141E02887000A8DC59 /* MWMSettingsViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 345050111E02887000A8DC59 /* MWMSettingsViewController.mm */; }; 3454E05F1DF00DAE00F40F46 /* banners.txt in Resources */ = {isa = PBXBuildFile; fileRef = 3454E05E1DF00DAE00F40F46 /* banners.txt */; }; 3454E0601DF00DC000F40F46 /* banners.txt in Resources */ = {isa = PBXBuildFile; fileRef = 3454E05E1DF00DAE00F40F46 /* banners.txt */; }; 3454E0611DF00DC100F40F46 /* banners.txt in Resources */ = {isa = PBXBuildFile; fileRef = 3454E05E1DF00DAE00F40F46 /* banners.txt */; }; @@ -520,7 +532,6 @@ 6741A99A1BF340DE002C974C /* MWMBookmarkColorViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = F6588E321B15D73100EE1E58 /* MWMBookmarkColorViewController.xib */; }; 6741A99B1BF340DE002C974C /* PlacePageInfoCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F6CB215B1AEE704D00FB8963 /* PlacePageInfoCell.xib */; }; 6741A99F1BF340DE002C974C /* 07_roboto_medium.ttf in Resources */ = {isa = PBXBuildFile; fileRef = FAF30A94173AB23900818BF6 /* 07_roboto_medium.ttf */; }; - 6741A9A21BF340DE002C974C /* CommunityVC.mm in Sources */ = {isa = PBXBuildFile; fileRef = 978D4A241996B0EC00D72CA7 /* CommunityVC.mm */; }; 6741A9A31BF340DE002C974C /* main.mm in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.mm */; }; 6741A9A41BF340DE002C974C /* MWMSearchTabbedViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34CC4C071B81F3B500E44C1F /* MWMSearchTabbedViewController.mm */; }; 6741A9A51BF340DE002C974C /* MWMShareActivityItem.mm in Sources */ = {isa = PBXBuildFile; fileRef = 340837151B72451A00B5C185 /* MWMShareActivityItem.mm */; }; @@ -563,7 +574,6 @@ 6741A9EB1BF340DE002C974C /* ContextViews.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6D409F91B319BD70041730F /* ContextViews.mm */; }; 6741A9EC1BF340DE002C974C /* MWMCircularProgress.mm in Sources */ = {isa = PBXBuildFile; fileRef = 349A35761B53D4C9009677EE /* MWMCircularProgress.mm */; }; 6741A9EE1BF340DE002C974C /* MWMSearchCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34B82AD91B847FFC00180497 /* MWMSearchCell.mm */; }; - 6741A9F01BF340DE002C974C /* MWMSettingsViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 978F9239183B660F000D6C7C /* MWMSettingsViewController.mm */; }; 6741A9F11BF340DE002C974C /* MWMNavigationDashboardEntity.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6BD33861B62412E00F2CE18 /* MWMNavigationDashboardEntity.mm */; }; 6741A9F21BF340DE002C974C /* MWMPlacePageInfoCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6CB215F1AEE7A5B00FB8963 /* MWMPlacePageInfoCell.mm */; }; 6741A9F31BF340DE002C974C /* MWMSearchHistoryManager.mm in Sources */ = {isa = PBXBuildFile; fileRef = 340E105F1B944DAB00D975D5 /* MWMSearchHistoryManager.mm */; }; @@ -585,19 +595,16 @@ 6741AA0D1BF340DE002C974C /* LocalNotificationManager.mm in Sources */ = {isa = PBXBuildFile; fileRef = 974D041B1977DE430081D0A7 /* LocalNotificationManager.mm */; }; 6741AA0E1BF340DE002C974C /* AppInfo.mm in Sources */ = {isa = PBXBuildFile; fileRef = 97C98520186AE3CF00AF7E9E /* AppInfo.mm */; }; 6741AA0F1BF340DE002C974C /* MWMSearchHistoryMyPositionCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6A750B81BE8C74400981B41 /* MWMSearchHistoryMyPositionCell.mm */; }; - 6741AA101BF340DE002C974C /* SelectableCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = 978F923A183B660F000D6C7C /* SelectableCell.mm */; }; 6741AA111BF340DE002C974C /* MWMSearchCategoriesManager.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34B82AE11B84AC5E00180497 /* MWMSearchCategoriesManager.mm */; }; 6741AA131BF340DE002C974C /* UIColor+MapsMeColor.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6F533A21B3C248900C1940B /* UIColor+MapsMeColor.mm */; }; 6741AA141BF340DE002C974C /* MWMMultilineLabel.mm in Sources */ = {isa = PBXBuildFile; fileRef = 346EDADA1B9F0E35004F8DB5 /* MWMMultilineLabel.mm */; }; 6741AA151BF340DE002C974C /* Statistics.mm in Sources */ = {isa = PBXBuildFile; fileRef = CB252D6C16FF82C8001E41E9 /* Statistics.mm */; }; 6741AA161BF340DE002C974C /* MWMCustomFacebookEvents.mm in Sources */ = {isa = PBXBuildFile; fileRef = 6BA0BCD01B74DDBA00CC9969 /* MWMCustomFacebookEvents.mm */; }; - 6741AA171BF340DE002C974C /* SwitchCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = 978F923B183B660F000D6C7C /* SwitchCell.mm */; }; 6741AA181BF340DE002C974C /* UIView+RuntimeAttributes.mm in Sources */ = {isa = PBXBuildFile; fileRef = 342AD7711B53D32F00E0B997 /* UIView+RuntimeAttributes.mm */; }; 6741AA191BF340DE002C974C /* MWMDownloaderDialogCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = F64F4B6C1B46A51F0081A24A /* MWMDownloaderDialogCell.mm */; }; 6741AA1B1BF340DE002C974C /* MWMDirectionView.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6ED13531B1643900095C6DE /* MWMDirectionView.mm */; }; 6741AA1C1BF340DE002C974C /* MWMRoutingDisclaimerAlert.mm in Sources */ = {isa = PBXBuildFile; fileRef = F63774E91B59376F00BCF54D /* MWMRoutingDisclaimerAlert.mm */; }; 6741AA1D1BF340DE002C974C /* MWMDownloadTransitMapAlert.mm in Sources */ = {isa = PBXBuildFile; fileRef = F64F19971AB81A00006EAF7E /* MWMDownloadTransitMapAlert.mm */; }; - 6741AA1E1BF340DE002C974C /* LinkCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = 97F61793183E7445009919E2 /* LinkCell.mm */; }; 6741AA1F1BF340DE002C974C /* MWMSearchBookmarksCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34B82ACE1B846B2C00180497 /* MWMSearchBookmarksCell.mm */; }; 6741AA221BF340DE002C974C /* MWMNavigationView.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6BD33831B6240F200F2CE18 /* MWMNavigationView.mm */; }; 6741AA231BF340DE002C974C /* UIFont+MapsMeFonts.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3472EC041B4D44BE0085CB79 /* UIFont+MapsMeFonts.mm */; }; @@ -831,7 +838,6 @@ 849CF67D1DE842290024A8A5 /* PlacePageInfoCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F6CB215B1AEE704D00FB8963 /* PlacePageInfoCell.xib */; }; 849CF67E1DE842290024A8A5 /* 07_roboto_medium.ttf in Resources */ = {isa = PBXBuildFile; fileRef = FAF30A94173AB23900818BF6 /* 07_roboto_medium.ttf */; }; 849CF67F1DE842290024A8A5 /* MWMMapDownloaderButtonTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 34E0EECD1CC51B1D008E4919 /* MWMMapDownloaderButtonTableViewCell.xib */; }; - 849CF6811DE842290024A8A5 /* CommunityVC.mm in Sources */ = {isa = PBXBuildFile; fileRef = 978D4A241996B0EC00D72CA7 /* CommunityVC.mm */; }; 849CF6821DE842290024A8A5 /* main.mm in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.mm */; }; 849CF6831DE842290024A8A5 /* MWMSearchTabbedViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34CC4C071B81F3B500E44C1F /* MWMSearchTabbedViewController.mm */; }; 849CF6841DE842290024A8A5 /* MWMShareActivityItem.mm in Sources */ = {isa = PBXBuildFile; fileRef = 340837151B72451A00B5C185 /* MWMShareActivityItem.mm */; }; @@ -943,7 +949,6 @@ 849CF6F11DE842290024A8A5 /* MWMCircularProgress.mm in Sources */ = {isa = PBXBuildFile; fileRef = 349A35761B53D4C9009677EE /* MWMCircularProgress.mm */; }; 849CF6F21DE842290024A8A5 /* MWMSearchCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34B82AD91B847FFC00180497 /* MWMSearchCell.mm */; }; 849CF6F31DE842290024A8A5 /* MWMButton.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6FEA82C1C58E89B007223CC /* MWMButton.mm */; }; - 849CF6F41DE842290024A8A5 /* MWMSettingsViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 978F9239183B660F000D6C7C /* MWMSettingsViewController.mm */; }; 849CF6F51DE842290024A8A5 /* MWMPlacePageLayout.mm in Sources */ = {isa = PBXBuildFile; fileRef = F67517A11D76FC46008FE34F /* MWMPlacePageLayout.mm */; }; 849CF6F61DE842290024A8A5 /* MWMNavigationDashboardEntity.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6BD33861B62412E00F2CE18 /* MWMNavigationDashboardEntity.mm */; }; 849CF6F71DE842290024A8A5 /* MWMPlacePageInfoCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6CB215F1AEE7A5B00FB8963 /* MWMPlacePageInfoCell.mm */; }; @@ -1005,7 +1010,6 @@ 849CF72F1DE842290024A8A5 /* MWMInputValidator.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34ABA61F1C2D517500FE1BEC /* MWMInputValidator.mm */; }; 849CF7301DE842290024A8A5 /* MWMActionBarButton.mm in Sources */ = {isa = PBXBuildFile; fileRef = F639883A1CF70FE500226B6B /* MWMActionBarButton.mm */; }; 849CF7311DE842290024A8A5 /* MWMKeyboard.mm in Sources */ = {isa = PBXBuildFile; fileRef = 348868F21D87DFB70069BBA3 /* MWMKeyboard.mm */; }; - 849CF7321DE842290024A8A5 /* SelectableCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = 978F923A183B660F000D6C7C /* SelectableCell.mm */; }; 849CF7331DE842290024A8A5 /* MWMInputValidatorFactory.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34ABA6231C2D551900FE1BEC /* MWMInputValidatorFactory.mm */; }; 849CF7341DE842290024A8A5 /* MWMSearchChangeModeView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34257D1A1DC9FD9400DC5BB9 /* MWMSearchChangeModeView.mm */; }; 849CF7351DE842290024A8A5 /* MWMSearchCategoriesManager.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34B82AE11B84AC5E00180497 /* MWMSearchCategoriesManager.mm */; }; @@ -1023,7 +1027,6 @@ 849CF7411DE842290024A8A5 /* MWMMapDownloaderSubplaceTableViewCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = 341F99D01C6B1165001C67B8 /* MWMMapDownloaderSubplaceTableViewCell.mm */; }; 849CF7421DE842290024A8A5 /* MWMNoMapsView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 343FAC491CBFBDFC00A45D3B /* MWMNoMapsView.mm */; }; 849CF7431DE842290024A8A5 /* MWMCustomFacebookEvents.mm in Sources */ = {isa = PBXBuildFile; fileRef = 6BA0BCD01B74DDBA00CC9969 /* MWMCustomFacebookEvents.mm */; }; - 849CF7441DE842290024A8A5 /* SwitchCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = 978F923B183B660F000D6C7C /* SwitchCell.mm */; }; 849CF7451DE842290024A8A5 /* UIView+RuntimeAttributes.mm in Sources */ = {isa = PBXBuildFile; fileRef = 342AD7711B53D32F00E0B997 /* UIView+RuntimeAttributes.mm */; }; 849CF7461DE842290024A8A5 /* MWMTableViewCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = F626D52D1C3E6CAA00C17D15 /* MWMTableViewCell.mm */; }; 849CF7471DE842290024A8A5 /* MWMDownloaderDialogCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = F64F4B6C1B46A51F0081A24A /* MWMDownloaderDialogCell.mm */; }; @@ -1045,7 +1048,6 @@ 849CF7571DE842290024A8A5 /* MWMMigrationViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34E273201C737A4100463965 /* MWMMigrationViewController.mm */; }; 849CF7581DE842290024A8A5 /* MWMDownloadTransitMapAlert.mm in Sources */ = {isa = PBXBuildFile; fileRef = F64F19971AB81A00006EAF7E /* MWMDownloadTransitMapAlert.mm */; }; 849CF7591DE842290024A8A5 /* MWMMapDownloaderDefaultDataSource.mm in Sources */ = {isa = PBXBuildFile; fileRef = 341F99E71C6B119E001C67B8 /* MWMMapDownloaderDefaultDataSource.mm */; }; - 849CF75A1DE842290024A8A5 /* LinkCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = 97F61793183E7445009919E2 /* LinkCell.mm */; }; 849CF75B1DE842290024A8A5 /* MWMSearchBookmarksCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34B82ACE1B846B2C00180497 /* MWMSearchBookmarksCell.mm */; }; 849CF75C1DE842290024A8A5 /* MWMNavigationView.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6BD33831B6240F200F2CE18 /* MWMNavigationView.mm */; }; 849CF75D1DE842290024A8A5 /* UIFont+MapsMeFonts.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3472EC041B4D44BE0085CB79 /* UIFont+MapsMeFonts.mm */; }; @@ -1113,12 +1115,8 @@ 974D041D1977DE430081D0A7 /* LocalNotificationManager.mm in Sources */ = {isa = PBXBuildFile; fileRef = 974D041B1977DE430081D0A7 /* LocalNotificationManager.mm */; }; 97719D451843B6DC00BDD815 /* MessageUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 97719D441843B6DC00BDD815 /* MessageUI.framework */; }; 97719D491843B6F700BDD815 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 97719D471843B6F200BDD815 /* Security.framework */; }; - 978D4A251996B0EC00D72CA7 /* CommunityVC.mm in Sources */ = {isa = PBXBuildFile; fileRef = 978D4A241996B0EC00D72CA7 /* CommunityVC.mm */; }; 978D4A291996C17300D72CA7 /* RichTextVC.mm in Sources */ = {isa = PBXBuildFile; fileRef = 978D4A281996C17300D72CA7 /* RichTextVC.mm */; }; 978D4A31199A11E600D72CA7 /* faq.html in Resources */ = {isa = PBXBuildFile; fileRef = 978D4A30199A11E600D72CA7 /* faq.html */; }; - 978F9240183B660F000D6C7C /* MWMSettingsViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 978F9239183B660F000D6C7C /* MWMSettingsViewController.mm */; }; - 978F9242183B660F000D6C7C /* SelectableCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = 978F923A183B660F000D6C7C /* SelectableCell.mm */; }; - 978F9244183B660F000D6C7C /* SwitchCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = 978F923B183B660F000D6C7C /* SwitchCell.mm */; }; 97A5967F19B9CD47007A963F /* copyright.html in Resources */ = {isa = PBXBuildFile; fileRef = 97A5967E19B9CD47007A963F /* copyright.html */; }; 97C98522186AE3CF00AF7E9E /* AppInfo.mm in Sources */ = {isa = PBXBuildFile; fileRef = 97C98520186AE3CF00AF7E9E /* AppInfo.mm */; }; 97D40C0A184D031900A1D572 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97D40C09184D031900A1D572 /* Images.xcassets */; }; @@ -1126,7 +1124,6 @@ 97ECD871183620CE00F77A46 /* AdSupport.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 97ECD870183620CE00F77A46 /* AdSupport.framework */; settings = {ATTRIBUTES = (Required, ); }; }; 97ECD87818362B3D00F77A46 /* CoreTelephony.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 97ECD87718362B3D00F77A46 /* CoreTelephony.framework */; }; 97ECD87A18362B5400F77A46 /* MobileCoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 97ECD87918362B5400F77A46 /* MobileCoreServices.framework */; }; - 97F61794183E7445009919E2 /* LinkCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = 97F61793183E7445009919E2 /* LinkCell.mm */; }; 9DA46A091C47E92100EF52BA /* resources-hdpi_legacy in Resources */ = {isa = PBXBuildFile; fileRef = 9DA46A041C47E92100EF52BA /* resources-hdpi_legacy */; }; 9DA46A0A1C47E92100EF52BA /* resources-mdpi_legacy in Resources */ = {isa = PBXBuildFile; fileRef = 9DA46A051C47E92100EF52BA /* resources-mdpi_legacy */; }; 9DA46A0B1C47E92100EF52BA /* resources-mdpi_legacy in Resources */ = {isa = PBXBuildFile; fileRef = 9DA46A051C47E92100EF52BA /* resources-mdpi_legacy */; }; @@ -1553,6 +1550,14 @@ 344BDB021B9069810076DB31 /* MWMSearchTabbedViewProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MWMSearchTabbedViewProtocol.h; sourceTree = ""; }; 344D77B21D1BD7C800DBED70 /* MWMLocationManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMLocationManager.h; sourceTree = ""; }; 344D77B31D1BD7C800DBED70 /* MWMLocationManager.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMLocationManager.mm; sourceTree = ""; }; + 34504FFC1E0287C400A8DC59 /* LinkCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LinkCell.h; sourceTree = ""; }; + 34504FFD1E0287C400A8DC59 /* LinkCell.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = LinkCell.mm; sourceTree = ""; }; + 34504FFE1E0287C400A8DC59 /* SelectableCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SelectableCell.h; sourceTree = ""; }; + 34504FFF1E0287C400A8DC59 /* SelectableCell.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = SelectableCell.mm; sourceTree = ""; }; + 345050001E0287C400A8DC59 /* SwitchCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SwitchCell.h; sourceTree = ""; }; + 345050011E0287C400A8DC59 /* SwitchCell.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = SwitchCell.mm; sourceTree = ""; }; + 345050101E02887000A8DC59 /* MWMSettingsViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMSettingsViewController.h; sourceTree = ""; }; + 345050111E02887000A8DC59 /* MWMSettingsViewController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMSettingsViewController.mm; sourceTree = ""; }; 3454E05E1DF00DAE00F40F46 /* banners.txt */ = {isa = PBXFileReference; lastKnownFileType = text; name = banners.txt; path = ../../data/banners.txt; sourceTree = ""; }; 3456E0201DC0C4030055DF50 /* HockeySDK.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = HockeySDK.framework; path = Frameworks/HockeySDK.embeddedframework/HockeySDK.framework; sourceTree = ""; }; 3456E0251DC0C4500055DF50 /* HockeySDKResources.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = HockeySDKResources.bundle; path = Frameworks/HockeySDK.embeddedframework/Resources/HockeySDKResources.bundle; sourceTree = ""; }; @@ -1926,17 +1931,9 @@ 974D041C1977DE430081D0A7 /* LocalNotificationManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LocalNotificationManager.h; sourceTree = ""; }; 97719D441843B6DC00BDD815 /* MessageUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MessageUI.framework; path = System/Library/Frameworks/MessageUI.framework; sourceTree = SDKROOT; }; 97719D471843B6F200BDD815 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; }; - 978D4A231996B0EC00D72CA7 /* CommunityVC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CommunityVC.h; sourceTree = ""; }; - 978D4A241996B0EC00D72CA7 /* CommunityVC.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = CommunityVC.mm; sourceTree = ""; }; 978D4A271996C17300D72CA7 /* RichTextVC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RichTextVC.h; sourceTree = ""; }; 978D4A281996C17300D72CA7 /* RichTextVC.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = RichTextVC.mm; sourceTree = ""; }; 978D4A30199A11E600D72CA7 /* faq.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; name = faq.html; path = ../../data/faq.html; sourceTree = ""; }; - 978F9239183B660F000D6C7C /* MWMSettingsViewController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; lineEnding = 0; name = MWMSettingsViewController.mm; path = Settings/MWMSettingsViewController.mm; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; - 978F923A183B660F000D6C7C /* SelectableCell.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = SelectableCell.mm; path = Settings/SelectableCell.mm; sourceTree = ""; }; - 978F923B183B660F000D6C7C /* SwitchCell.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = SwitchCell.mm; path = Settings/SwitchCell.mm; sourceTree = ""; }; - 978F923D183B660F000D6C7C /* SwitchCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SwitchCell.h; path = Settings/SwitchCell.h; sourceTree = ""; }; - 978F923E183B660F000D6C7C /* SelectableCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SelectableCell.h; path = Settings/SelectableCell.h; sourceTree = ""; }; - 978F923F183B660F000D6C7C /* MWMSettingsViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MWMSettingsViewController.h; path = Settings/MWMSettingsViewController.h; sourceTree = ""; }; 97A5967E19B9CD47007A963F /* copyright.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; name = copyright.html; path = ../../data/copyright.html; sourceTree = ""; }; 97C98520186AE3CF00AF7E9E /* AppInfo.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; lineEnding = 0; path = AppInfo.mm; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; 97C98521186AE3CF00AF7E9E /* AppInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppInfo.h; sourceTree = ""; }; @@ -1951,8 +1948,6 @@ 97ECD870183620CE00F77A46 /* AdSupport.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AdSupport.framework; path = System/Library/Frameworks/AdSupport.framework; sourceTree = SDKROOT; }; 97ECD87718362B3D00F77A46 /* CoreTelephony.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreTelephony.framework; path = System/Library/Frameworks/CoreTelephony.framework; sourceTree = SDKROOT; }; 97ECD87918362B5400F77A46 /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = System/Library/Frameworks/MobileCoreServices.framework; sourceTree = SDKROOT; }; - 97F6178F183E742E009919E2 /* LinkCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LinkCell.h; path = Settings/LinkCell.h; sourceTree = ""; }; - 97F61793183E7445009919E2 /* LinkCell.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = LinkCell.mm; path = Settings/LinkCell.mm; sourceTree = ""; }; 9DA46A041C47E92100EF52BA /* resources-hdpi_legacy */ = {isa = PBXFileReference; lastKnownFileType = folder; name = "resources-hdpi_legacy"; path = "../../data/resources-hdpi_legacy"; sourceTree = ""; }; 9DA46A051C47E92100EF52BA /* resources-mdpi_legacy */ = {isa = PBXFileReference; lastKnownFileType = folder; name = "resources-mdpi_legacy"; path = "../../data/resources-mdpi_legacy"; sourceTree = ""; }; 9DA46A061C47E92100EF52BA /* resources-xhdpi_legacy */ = {isa = PBXFileReference; lastKnownFileType = folder; name = "resources-xhdpi_legacy"; path = "../../data/resources-xhdpi_legacy"; sourceTree = ""; }; @@ -2736,6 +2731,19 @@ path = Location; sourceTree = ""; }; + 34504FFB1E0287C400A8DC59 /* Cells */ = { + isa = PBXGroup; + children = ( + 34504FFC1E0287C400A8DC59 /* LinkCell.h */, + 34504FFD1E0287C400A8DC59 /* LinkCell.mm */, + 34504FFE1E0287C400A8DC59 /* SelectableCell.h */, + 34504FFF1E0287C400A8DC59 /* SelectableCell.mm */, + 345050001E0287C400A8DC59 /* SwitchCell.h */, + 345050011E0287C400A8DC59 /* SwitchCell.mm */, + ); + path = Cells; + sourceTree = ""; + }; 345C34661CE9D32500BB2224 /* SideButtons */ = { isa = PBXGroup; children = ( @@ -3376,19 +3384,6 @@ name = Categories; sourceTree = ""; }; - 978F924D183BB5D6000D6C7C /* Cells */ = { - isa = PBXGroup; - children = ( - 978F923E183B660F000D6C7C /* SelectableCell.h */, - 978F923A183B660F000D6C7C /* SelectableCell.mm */, - 978F923D183B660F000D6C7C /* SwitchCell.h */, - 978F923B183B660F000D6C7C /* SwitchCell.mm */, - 97F6178F183E742E009919E2 /* LinkCell.h */, - 97F61793183E7445009919E2 /* LinkCell.mm */, - ); - name = Cells; - sourceTree = ""; - }; 97B4E9271851DAB300BEC5D7 /* Custom Views */ = { isa = PBXGroup; children = ( @@ -3922,23 +3917,7 @@ FA4135DF120A25B90062D5B4 /* Settings */ = { isa = PBXGroup; children = ( - 978F924D183BB5D6000D6C7C /* Cells */, - 978F923F183B660F000D6C7C /* MWMSettingsViewController.h */, - 978F9239183B660F000D6C7C /* MWMSettingsViewController.mm */, - F668F6541BCD4507002D6FFC /* MWMTTSSettingsViewController.h */, - F668F6551BCD4507002D6FFC /* MWMTTSSettingsViewController.mm */, - F63BA36F1BCD5B520044C504 /* MWMTTSLanguageViewController.h */, - F63BA3701BCD5B520044C504 /* MWMTTSLanguageViewController.mm */, - F6C641AE1C15BBE6008FCAF3 /* MWMRecentTrackSettingsController.h */, - F6C641AF1C15BBE6008FCAF3 /* MWMRecentTrackSettingsController.mm */, - F6B2E61D1C3D5F31005562DF /* MWMNightModeController.h */, - F6B2E61E1C3D5F31005562DF /* MWMNightModeController.mm */, - 978D4A231996B0EC00D72CA7 /* CommunityVC.h */, - 978D4A241996B0EC00D72CA7 /* CommunityVC.mm */, - 34618BFB1D6DAAE600EDEEF4 /* MWMSettings.h */, - 34618BFC1D6DAAE600EDEEF4 /* MWMSettings.mm */, - 34B104201D6EE45700C8B577 /* MWMUnitsController.h */, - 34B104211D6EE45700C8B577 /* MWMUnitsController.mm */, + 34504FFB1E0287C400A8DC59 /* Cells */, 34B104241D6F040E00C8B577 /* MWMAboutController.h */, 34B104251D6F040E00C8B577 /* MWMAboutController.mm */, 34AA09D61DC3A14A002E8083 /* MWMAboutControllerHeader.xib */, @@ -3946,9 +3925,23 @@ 348C26041D701B9F00813924 /* MWMHelpController.mm */, 349A137A1DEC0B6200C7DB60 /* MWMMobileInternetViewController.h */, 349A137B1DEC0B6200C7DB60 /* MWMMobileInternetViewController.mm */, + F6B2E61D1C3D5F31005562DF /* MWMNightModeController.h */, + F6B2E61E1C3D5F31005562DF /* MWMNightModeController.mm */, + F6C641AE1C15BBE6008FCAF3 /* MWMRecentTrackSettingsController.h */, + F6C641AF1C15BBE6008FCAF3 /* MWMRecentTrackSettingsController.mm */, + 34618BFB1D6DAAE600EDEEF4 /* MWMSettings.h */, + 34618BFC1D6DAAE600EDEEF4 /* MWMSettings.mm */, + 345050101E02887000A8DC59 /* MWMSettingsViewController.h */, + 345050111E02887000A8DC59 /* MWMSettingsViewController.mm */, + F63BA36F1BCD5B520044C504 /* MWMTTSLanguageViewController.h */, + F63BA3701BCD5B520044C504 /* MWMTTSLanguageViewController.mm */, + F668F6541BCD4507002D6FFC /* MWMTTSSettingsViewController.h */, + F668F6551BCD4507002D6FFC /* MWMTTSSettingsViewController.mm */, + 34B104201D6EE45700C8B577 /* MWMUnitsController.h */, + 34B104211D6EE45700C8B577 /* MWMUnitsController.mm */, ); name = Settings; - path = ..; + path = ../Settings; sourceTree = ""; }; FA6E1F1B124E6B2800F59149 /* Platform */ = { @@ -4680,7 +4673,6 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 978D4A251996B0EC00D72CA7 /* CommunityVC.mm in Sources */, 1D60589B0D05DD56006BFB54 /* main.mm in Sources */, 34CC4C091B81F3B500E44C1F /* MWMSearchTabbedViewController.mm in Sources */, 340837161B72451A00B5C185 /* MWMShareActivityItem.mm in Sources */, @@ -4793,11 +4785,11 @@ 349A13821DEC138C00C7DB60 /* MWMMobileInternetAlert.mm in Sources */, 347FD8851C60B2CE002FB65E /* MWMOpeningHoursTimeSelectorTableViewCell.mm in Sources */, 34EB84581C073DF70004689F /* MWMOpeningHoursEditorViewController.mm in Sources */, + 345050021E0287C400A8DC59 /* LinkCell.mm in Sources */, F617B4E31D8FDDD5007A1A4E /* MWMBookmarkCell.mm in Sources */, 349A357A1B53D4C9009677EE /* MWMCircularProgress.mm in Sources */, 34B82ADA1B847FFC00180497 /* MWMSearchCell.mm in Sources */, F6FEA82D1C58E89B007223CC /* MWMButton.mm in Sources */, - 978F9240183B660F000D6C7C /* MWMSettingsViewController.mm in Sources */, F67517A21D76FC46008FE34F /* MWMPlacePageLayout.mm in Sources */, F6BD33871B62412E00F2CE18 /* MWMNavigationDashboardEntity.mm in Sources */, F6CB21601AEE7A5B00FB8963 /* MWMPlacePageInfoCell.mm in Sources */, @@ -4826,6 +4818,7 @@ F653CE161C71F60200A453F1 /* MWMAddPlaceNavigationBar.mm in Sources */, A32B6D4D1A14980500E54A65 /* iosOGLContextFactory.mm in Sources */, 349C3AEC1D33A933002AC7A9 /* MWMNavigationInfoView.mm in Sources */, + 345050121E02887000A8DC59 /* MWMSettingsViewController.mm in Sources */, 34B104221D6EE45700C8B577 /* MWMUnitsController.mm in Sources */, 347FD8671C60B2CE002FB65E /* MWMOpeningHoursAddClosedTableViewCell.mm in Sources */, FA054612155C465E001F4E37 /* SelectSetVC.mm in Sources */, @@ -4860,7 +4853,6 @@ 34ABA6201C2D517500FE1BEC /* MWMInputValidator.mm in Sources */, F639883B1CF70FE500226B6B /* MWMActionBarButton.mm in Sources */, 348868F31D87DFB70069BBA3 /* MWMKeyboard.mm in Sources */, - 978F9242183B660F000D6C7C /* SelectableCell.mm in Sources */, 34ABA6241C2D551900FE1BEC /* MWMInputValidatorFactory.mm in Sources */, 34257D1B1DC9FD9400DC5BB9 /* MWMSearchChangeModeView.mm in Sources */, 34EA976C1DEC779D00616B11 /* MWMNetworkPolicy.mm in Sources */, @@ -4881,7 +4873,6 @@ 343FAC4A1CBFBDFC00A45D3B /* MWMNoMapsView.mm in Sources */, F63421EF1DF975A800A96868 /* MWMPlacePageTaxiCell.mm in Sources */, 6BA0BCD11B74DDBA00CC9969 /* MWMCustomFacebookEvents.mm in Sources */, - 978F9244183B660F000D6C7C /* SwitchCell.mm in Sources */, 342AD7721B53D32F00E0B997 /* UIView+RuntimeAttributes.mm in Sources */, F626D52E1C3E6CAA00C17D15 /* MWMTableViewCell.mm in Sources */, F64F4B6D1B46A51F0081A24A /* MWMDownloaderDialogCell.mm in Sources */, @@ -4891,6 +4882,7 @@ 348868EB1D8721650069BBA3 /* MWMSearchNoResults.mm in Sources */, 346B42AB1DD5E3D20094EBEE /* MWMLocationNotFoundAlert.mm in Sources */, 34BBB7231DD0853B0002E025 /* MWMSearchManager+Layout.mm in Sources */, + 345050051E0287C400A8DC59 /* SelectableCell.mm in Sources */, 341F99D91C6B1165001C67B8 /* MWMMapDownloaderPlaceTableViewCell.mm in Sources */, 34A759D01DC795140078C3AE /* MWMWhatsNewProfileBookingController.mm in Sources */, 345FD7E71CEC7D8400F58045 /* MWMEditorAdditionalNamesHeader.mm in Sources */, @@ -4903,7 +4895,6 @@ 34E273211C737A4100463965 /* MWMMigrationViewController.mm in Sources */, F64F19A31AB81A00006EAF7E /* MWMDownloadTransitMapAlert.mm in Sources */, 341F99E81C6B119E001C67B8 /* MWMMapDownloaderDefaultDataSource.mm in Sources */, - 97F61794183E7445009919E2 /* LinkCell.mm in Sources */, 34B82AD01B846B2C00180497 /* MWMSearchBookmarksCell.mm in Sources */, F6BD33841B6240F200F2CE18 /* MWMNavigationView.mm in Sources */, 3472EC051B4D44BE0085CB79 /* UIFont+MapsMeFonts.mm in Sources */, @@ -4919,6 +4910,7 @@ ED48BBBA17C2B1E2003E7E92 /* CircleView.mm in Sources */, 340E10631B949D1900D975D5 /* MWMSearchBookmarksManager.mm in Sources */, F68FCB8A1DA7BD20007CC7D7 /* MWMTaxiPreviewCell.mm in Sources */, + 345050081E0287C400A8DC59 /* SwitchCell.mm in Sources */, F6E9BF291CE364150050E534 /* MWMEditBookmarkController.mm in Sources */, F65B31F11DD20E9600105FDE /* MWMiPhonePlacePageLayoutImpl.mm in Sources */, 34A759CA1DC795140078C3AE /* MWMWelcomeController.mm in Sources */, @@ -4934,7 +4926,6 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 6741A9A21BF340DE002C974C /* CommunityVC.mm in Sources */, 34FED5511D21121000183B1B /* CLLocation+Mercator.mm in Sources */, 6741A9A31BF340DE002C974C /* main.mm in Sources */, 6741A9A41BF340DE002C974C /* MWMSearchTabbedViewController.mm in Sources */, @@ -5047,11 +5038,11 @@ 349A13831DEC138C00C7DB60 /* MWMMobileInternetAlert.mm in Sources */, 347FD8861C60B2CE002FB65E /* MWMOpeningHoursTimeSelectorTableViewCell.mm in Sources */, 6741A9EB1BF340DE002C974C /* ContextViews.mm in Sources */, + 345050031E0287C400A8DC59 /* LinkCell.mm in Sources */, 6741A9EC1BF340DE002C974C /* MWMCircularProgress.mm in Sources */, 342CC5F21C2D7730005F3FE5 /* MWMAuthorizationLoginViewController.mm in Sources */, 6741A9EE1BF340DE002C974C /* MWMSearchCell.mm in Sources */, F617B4E41D8FDDD5007A1A4E /* MWMBookmarkCell.mm in Sources */, - 6741A9F01BF340DE002C974C /* MWMSettingsViewController.mm in Sources */, 6741A9F11BF340DE002C974C /* MWMNavigationDashboardEntity.mm in Sources */, 6741A9F21BF340DE002C974C /* MWMPlacePageInfoCell.mm in Sources */, 6741A9F31BF340DE002C974C /* MWMSearchHistoryManager.mm in Sources */, @@ -5080,6 +5071,7 @@ F68FCB861DA7BBA6007CC7D7 /* MWMTaxiPreviewDataSource.mm in Sources */, 347FD8681C60B2CE002FB65E /* MWMOpeningHoursAddClosedTableViewCell.mm in Sources */, 6741A9FF1BF340DE002C974C /* AddSetVC.mm in Sources */, + 345050131E02887000A8DC59 /* MWMSettingsViewController.mm in Sources */, 6741AA011BF340DE002C974C /* MWMSearchTabbedViewLayout.mm in Sources */, 349C3AED1D33A933002AC7A9 /* MWMNavigationInfoView.mm in Sources */, 34B104231D6EE45700C8B577 /* MWMUnitsController.mm in Sources */, @@ -5109,7 +5101,6 @@ 6741AA0F1BF340DE002C974C /* MWMSearchHistoryMyPositionCell.mm in Sources */, 34A759DD1DC7978E0078C3AE /* MWMWhatsNewBookingBicycleRoutingController.mm in Sources */, 34A759DE1DC797920078C3AE /* MWMWhatsNewDownloaderEditorController.mm in Sources */, - 6741AA101BF340DE002C974C /* SelectableCell.mm in Sources */, F6B97B271CD0CA990009B612 /* MWMBookmarkNameCell.mm in Sources */, 6741AA111BF340DE002C974C /* MWMSearchCategoriesManager.mm in Sources */, 34ABA6211C2D517500FE1BEC /* MWMInputValidator.mm in Sources */, @@ -5127,7 +5118,6 @@ 34C9BD051C6DB693000DC38D /* MWMViewController.mm in Sources */, F69E912B1D9A877A00D7A778 /* MWMOpeningHours.mm in Sources */, 6741AA161BF340DE002C974C /* MWMCustomFacebookEvents.mm in Sources */, - 6741AA171BF340DE002C974C /* SwitchCell.mm in Sources */, 6741AA181BF340DE002C974C /* UIView+RuntimeAttributes.mm in Sources */, 341F99DE1C6B1165001C67B8 /* MWMMapDownloaderSubplaceTableViewCell.mm in Sources */, F69AEEBA1DDB263E00BE034A /* MWMOpeningHoursLayoutHelper.mm in Sources */, @@ -5145,9 +5135,9 @@ 341F99D61C6B1165001C67B8 /* MWMMapDownloaderLargeCountryTableViewCell.mm in Sources */, 346B42AC1DD5E3D20094EBEE /* MWMLocationNotFoundAlert.mm in Sources */, 34BBB7241DD0853B0002E025 /* MWMSearchManager+Layout.mm in Sources */, + 345050061E0287C400A8DC59 /* SelectableCell.mm in Sources */, 348C26061D701B9F00813924 /* MWMHelpController.mm in Sources */, 348868EC1D8721650069BBA3 /* MWMSearchNoResults.mm in Sources */, - 6741AA1E1BF340DE002C974C /* LinkCell.mm in Sources */, 345FD7E81CEC7D8400F58045 /* MWMEditorAdditionalNamesHeader.mm in Sources */, 347FD8701C60B2CE002FB65E /* MWMOpeningHoursAllDayTableViewCell.mm in Sources */, 6741AA1F1BF340DE002C974C /* MWMSearchBookmarksCell.mm in Sources */, @@ -5173,6 +5163,7 @@ 6741AA291BF340DE002C974C /* ColorPickerView.mm in Sources */, 6741AA2B1BF340DE002C974C /* CircleView.mm in Sources */, 56D545631C74A41900E3719C /* Framework.cpp in Sources */, + 345050091E0287C400A8DC59 /* SwitchCell.mm in Sources */, F68FCB8B1DA7BD20007CC7D7 /* MWMTaxiPreviewCell.mm in Sources */, F65B31F21DD20E9600105FDE /* MWMiPhonePlacePageLayoutImpl.mm in Sources */, F6E9BF2A1CE364150050E534 /* MWMEditBookmarkController.mm in Sources */, @@ -5188,7 +5179,6 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 849CF6811DE842290024A8A5 /* CommunityVC.mm in Sources */, 849CF6821DE842290024A8A5 /* main.mm in Sources */, 849CF6831DE842290024A8A5 /* MWMSearchTabbedViewController.mm in Sources */, 849CF6841DE842290024A8A5 /* MWMShareActivityItem.mm in Sources */, @@ -5283,6 +5273,7 @@ 849CF6DD1DE842290024A8A5 /* MWMWhatsNewNavigationController.mm in Sources */, 849CF6DE1DE842290024A8A5 /* MWMRoutePointLayout.mm in Sources */, 849CF6DF1DE842290024A8A5 /* MWMAuthorizationCommon.mm in Sources */, + 3450500A1E0287C400A8DC59 /* SwitchCell.mm in Sources */, 849CF6E01DE842290024A8A5 /* MWMSearchHistoryClearCell.mm in Sources */, 849CF6E11DE842290024A8A5 /* MWMDownloaderDialogHeader.mm in Sources */, 849CF6E21DE842290024A8A5 /* MWMSearchTableView.mm in Sources */, @@ -5303,7 +5294,6 @@ 849CF6F11DE842290024A8A5 /* MWMCircularProgress.mm in Sources */, 849CF6F21DE842290024A8A5 /* MWMSearchCell.mm in Sources */, 849CF6F31DE842290024A8A5 /* MWMButton.mm in Sources */, - 849CF6F41DE842290024A8A5 /* MWMSettingsViewController.mm in Sources */, 849CF6F51DE842290024A8A5 /* MWMPlacePageLayout.mm in Sources */, 849CF6F61DE842290024A8A5 /* MWMNavigationDashboardEntity.mm in Sources */, 849CF6F71DE842290024A8A5 /* MWMPlacePageInfoCell.mm in Sources */, @@ -5365,9 +5355,9 @@ 849CF72E1DE842290024A8A5 /* MWMSearchHistoryMyPositionCell.mm in Sources */, 341966881E000CDD00F96327 /* MWMWhatsNewTrafficController.mm in Sources */, 849CF72F1DE842290024A8A5 /* MWMInputValidator.mm in Sources */, + 345050041E0287C400A8DC59 /* LinkCell.mm in Sources */, 849CF7301DE842290024A8A5 /* MWMActionBarButton.mm in Sources */, 849CF7311DE842290024A8A5 /* MWMKeyboard.mm in Sources */, - 849CF7321DE842290024A8A5 /* SelectableCell.mm in Sources */, 849CF7331DE842290024A8A5 /* MWMInputValidatorFactory.mm in Sources */, 849CF7341DE842290024A8A5 /* MWMSearchChangeModeView.mm in Sources */, 849CF7351DE842290024A8A5 /* MWMSearchCategoriesManager.mm in Sources */, @@ -5387,11 +5377,11 @@ 849CF7421DE842290024A8A5 /* MWMNoMapsView.mm in Sources */, 849CF7431DE842290024A8A5 /* MWMCustomFacebookEvents.mm in Sources */, 349B926E1DF0518E007779DD /* MWMToast.mm in Sources */, - 849CF7441DE842290024A8A5 /* SwitchCell.mm in Sources */, 849CF7451DE842290024A8A5 /* UIView+RuntimeAttributes.mm in Sources */, 849CF7461DE842290024A8A5 /* MWMTableViewCell.mm in Sources */, 849CF7471DE842290024A8A5 /* MWMDownloaderDialogCell.mm in Sources */, 849CF7481DE842290024A8A5 /* MWMPlacePageEntity.mm in Sources */, + 345050141E02887000A8DC59 /* MWMSettingsViewController.mm in Sources */, 849CF7491DE842290024A8A5 /* MWMPlacePageButtonCell.mm in Sources */, 849CF74A1DE842290024A8A5 /* MWMHelpController.mm in Sources */, 849CF74B1DE842290024A8A5 /* MWMSearchNoResults.mm in Sources */, @@ -5408,8 +5398,8 @@ 849CF7561DE842290024A8A5 /* MWMRoutingDisclaimerAlert.mm in Sources */, 849CF7571DE842290024A8A5 /* MWMMigrationViewController.mm in Sources */, 849CF7581DE842290024A8A5 /* MWMDownloadTransitMapAlert.mm in Sources */, + 345050071E0287C400A8DC59 /* SelectableCell.mm in Sources */, 849CF7591DE842290024A8A5 /* MWMMapDownloaderDefaultDataSource.mm in Sources */, - 849CF75A1DE842290024A8A5 /* LinkCell.mm in Sources */, 849CF75B1DE842290024A8A5 /* MWMSearchBookmarksCell.mm in Sources */, 849CF75C1DE842290024A8A5 /* MWMNavigationView.mm in Sources */, 849CF75D1DE842290024A8A5 /* UIFont+MapsMeFonts.mm in Sources */, diff --git a/iphone/Maps/Settings/Cells/LinkCell.h b/iphone/Maps/Settings/Cells/LinkCell.h new file mode 100644 index 0000000000..abbfce412d --- /dev/null +++ b/iphone/Maps/Settings/Cells/LinkCell.h @@ -0,0 +1,8 @@ +#import "MWMTableViewCell.h" + +@interface LinkCell : MWMTableViewCell + +@property(nonatomic) IBOutlet UILabel * titleLabel; +@property(nonatomic) IBOutlet UILabel * infoLabel; + +@end diff --git a/iphone/Maps/Settings/Cells/LinkCell.mm b/iphone/Maps/Settings/Cells/LinkCell.mm new file mode 100644 index 0000000000..1ca486d125 --- /dev/null +++ b/iphone/Maps/Settings/Cells/LinkCell.mm @@ -0,0 +1,12 @@ +#import "LinkCell.h" +#import "UIColor+MapsMeColor.h" + +@implementation LinkCell + +- (void)awakeFromNib +{ + [super awakeFromNib]; + self.backgroundColor = [UIColor white]; +} + +@end diff --git a/iphone/Maps/Settings/Cells/SelectableCell.h b/iphone/Maps/Settings/Cells/SelectableCell.h new file mode 100644 index 0000000000..d86d8819d1 --- /dev/null +++ b/iphone/Maps/Settings/Cells/SelectableCell.h @@ -0,0 +1,7 @@ +#import "MWMTableViewCell.h" + +@interface SelectableCell : MWMTableViewCell + +@property (weak, nonatomic) IBOutlet UILabel * titleLabel; + +@end diff --git a/iphone/Maps/Settings/Cells/SelectableCell.mm b/iphone/Maps/Settings/Cells/SelectableCell.mm new file mode 100644 index 0000000000..289e5c7b23 --- /dev/null +++ b/iphone/Maps/Settings/Cells/SelectableCell.mm @@ -0,0 +1,12 @@ +#import "SelectableCell.h" +#import "UIColor+MapsMeColor.h" + +@implementation SelectableCell + +- (void)awakeFromNib +{ + [super awakeFromNib]; + self.backgroundColor = [UIColor white]; +} + +@end diff --git a/iphone/Maps/Settings/Cells/SwitchCell.h b/iphone/Maps/Settings/Cells/SwitchCell.h new file mode 100644 index 0000000000..8dfb1ad1c4 --- /dev/null +++ b/iphone/Maps/Settings/Cells/SwitchCell.h @@ -0,0 +1,17 @@ +#import "MWMTableViewCell.h" + +@class SwitchCell; +@protocol SwitchCellDelegate + +- (void)switchCell:(SwitchCell *)cell didChangeValue:(BOOL)value; + +@end + +@interface SwitchCell : MWMTableViewCell + +@property(weak, nonatomic) IBOutlet UILabel * titleLabel; +@property(weak, nonatomic) IBOutlet UISwitch * switchButton; + +@property(weak, nonatomic) id delegate; + +@end diff --git a/iphone/Maps/Settings/Cells/SwitchCell.mm b/iphone/Maps/Settings/Cells/SwitchCell.mm new file mode 100644 index 0000000000..292ec81b43 --- /dev/null +++ b/iphone/Maps/Settings/Cells/SwitchCell.mm @@ -0,0 +1,18 @@ +#import "SwitchCell.h" +#import "UIColor+MapsMeColor.h" + +@implementation SwitchCell + +- (void)awakeFromNib +{ + [super awakeFromNib]; + [self.switchButton addTarget:self action:@selector(switchChanged:) forControlEvents:UIControlEventValueChanged]; + self.backgroundColor = [UIColor white]; +} + +- (void)switchChanged:(UISwitch *)sender +{ + [self.delegate switchCell:self didChangeValue:sender.on]; +} + +@end diff --git a/iphone/Maps/Settings/LinkCell.h b/iphone/Maps/Settings/LinkCell.h deleted file mode 100644 index abbfce412d..0000000000 --- a/iphone/Maps/Settings/LinkCell.h +++ /dev/null @@ -1,8 +0,0 @@ -#import "MWMTableViewCell.h" - -@interface LinkCell : MWMTableViewCell - -@property(nonatomic) IBOutlet UILabel * titleLabel; -@property(nonatomic) IBOutlet UILabel * infoLabel; - -@end diff --git a/iphone/Maps/Settings/LinkCell.mm b/iphone/Maps/Settings/LinkCell.mm deleted file mode 100644 index 1ca486d125..0000000000 --- a/iphone/Maps/Settings/LinkCell.mm +++ /dev/null @@ -1,12 +0,0 @@ -#import "LinkCell.h" -#import "UIColor+MapsMeColor.h" - -@implementation LinkCell - -- (void)awakeFromNib -{ - [super awakeFromNib]; - self.backgroundColor = [UIColor white]; -} - -@end diff --git a/iphone/Maps/Settings/MWMAboutController.h b/iphone/Maps/Settings/MWMAboutController.h new file mode 100644 index 0000000000..bf44d902da --- /dev/null +++ b/iphone/Maps/Settings/MWMAboutController.h @@ -0,0 +1,5 @@ +#import "MWMTableViewController.h" + +@interface MWMAboutController : MWMTableViewController + +@end diff --git a/iphone/Maps/Settings/MWMAboutController.mm b/iphone/Maps/Settings/MWMAboutController.mm new file mode 100644 index 0000000000..6df96a4dc4 --- /dev/null +++ b/iphone/Maps/Settings/MWMAboutController.mm @@ -0,0 +1,136 @@ +#import "MWMAboutController.h" +#import "AppInfo.h" +#import "LinkCell.h" +#import "MWMMailViewController.h" +#import "Statistics.h" +#import "WebViewController.h" + +#import "3party/Alohalytics/src/alohalytics_objc.h" + +#include "Framework.h" + +#include "platform/platform.hpp" + +extern NSString * const kAlohalyticsTapEventKey; + +@interface MWMAboutController () + +@property(weak, nonatomic) IBOutlet UILabel * versionLabel; +@property(weak, nonatomic) IBOutlet UILabel * dateLabel; + +@property(weak, nonatomic) IBOutlet LinkCell * websiteCell; +@property(weak, nonatomic) IBOutlet LinkCell * blogCell; +@property(weak, nonatomic) IBOutlet LinkCell * facebookCell; +@property(weak, nonatomic) IBOutlet LinkCell * twitterCell; +@property(weak, nonatomic) IBOutlet LinkCell * subscribeCell; +@property(weak, nonatomic) IBOutlet LinkCell * rateCell; +@property(weak, nonatomic) IBOutlet LinkCell * copyrightCell; + +@property(nonatomic) IBOutlet UIView * headerView; + +@end + +@implementation MWMAboutController + +- (void)viewDidLoad +{ + [super viewDidLoad]; + self.title = L(@"about_menu_title"); + + [[NSBundle mainBundle] loadNibNamed:@"MWMAboutControllerHeader" owner:self options:nil]; + self.tableView.tableHeaderView = self.headerView; + + AppInfo * appInfo = [AppInfo sharedInfo]; + NSString * version = appInfo.bundleVersion; + if (appInfo.buildNumber) + version = [NSString stringWithFormat:@"%@.%@", version, appInfo.buildNumber]; + self.versionLabel.text = [NSString stringWithFormat:L(@"version"), version]; + + NSDateFormatter * dateFormatter = [[NSDateFormatter alloc] init]; + dateFormatter.dateStyle = NSDateFormatterShortStyle; + dateFormatter.timeStyle = NSDateFormatterNoStyle; + auto const dataVersion = GetFramework().GetCurrentDataVersion(); + self.dateLabel.text = [NSString stringWithFormat:L(@"date"), dataVersion]; +} + +- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath +{ + [tableView deselectRowAtIndexPath:indexPath animated:YES]; + LinkCell * cell = static_cast([tableView cellForRowAtIndexPath:indexPath]); + if (cell == self.websiteCell) + { + [Alohalytics logEvent:kAlohalyticsTapEventKey withValue:@"website"]; + [self openUrl:[NSURL URLWithString:@"https://maps.me"]]; + } + else if (cell == self.blogCell) + { + [Alohalytics logEvent:kAlohalyticsTapEventKey withValue:@"blog"]; + [self openUrl:[NSURL URLWithString:@"http://blog.maps.me"]]; + } + else if (cell == self.facebookCell) + { + [Alohalytics logEvent:kAlohalyticsTapEventKey withValue:@"likeOnFb"]; + [self openUrl:[NSURL URLWithString:@"https://facebook.com/MapsWithMe"]]; + } + else if (cell == self.twitterCell) + { + [Alohalytics logEvent:kAlohalyticsTapEventKey withValue:@"followOnTwitter"]; + [self openUrl:[NSURL URLWithString:@"https://twitter.com/MAPS_ME"]]; + } + else if (cell == self.subscribeCell) + { + [Alohalytics logEvent:kAlohalyticsTapEventKey withValue:@"subscribeToNews"]; + [self sendEmailWithText:L(@"subscribe_me_body") + subject:L(@"subscribe_me_subject") + toRecipient:@"subscribe@maps.me"]; + } + else if (cell == self.rateCell) + { + [Statistics logEvent:kStatSettingsOpenSection withParameters:@{kStatName : kStatRate}]; + [Alohalytics logEvent:kAlohalyticsTapEventKey withValue:@"rate"]; + [[UIApplication sharedApplication] rateVersionFrom:@"rate_menu_item"]; + } + else if (cell == self.copyrightCell) + { + [Statistics logEvent:kStatSettingsOpenSection withParameters:@{kStatName : kStatCopyright}]; + [Alohalytics logEvent:kAlohalyticsTapEventKey withValue:@"copyright"]; + string s; + GetPlatform().GetReader("copyright.html")->ReadAsString(s); + NSString * text = [NSString stringWithFormat:@"%@\n%@", self.versionLabel.text, @(s.c_str())]; + WebViewController * aboutViewController = + [[WebViewController alloc] initWithHtml:text baseUrl:nil andTitleOrNil:L(@"copyright")]; + aboutViewController.openInSafari = YES; + [self.navigationController pushViewController:aboutViewController animated:YES]; + } +} + +- (void)sendEmailWithText:(NSString *)text subject:(NSString *)subject toRecipient:(NSString *)email +{ + if ([MWMMailViewController canSendMail]) + { + MWMMailViewController * vc = [[MWMMailViewController alloc] init]; + vc.mailComposeDelegate = self; + [vc setSubject:subject]; + [vc setMessageBody:text isHTML:NO]; + [vc setToRecipients:@[ email ]]; + [self presentViewController:vc animated:YES completion:nil]; + } + else + { + NSString * text = [NSString stringWithFormat:L(@"email_error_body"), email]; + [[[UIAlertView alloc] initWithTitle:L(@"email_error_title") + message:text + delegate:nil + cancelButtonTitle:L(@"ok") + otherButtonTitles:nil] show]; + } +} + +- (void)mailComposeController:(MFMailComposeViewController *)controller + didFinishWithResult:(MFMailComposeResult)result + error:(NSError *)error +{ + [self dismissViewControllerAnimated:YES completion:nil]; +} + +@end diff --git a/iphone/Maps/Settings/MWMAboutControllerHeader.xib b/iphone/Maps/Settings/MWMAboutControllerHeader.xib new file mode 100644 index 0000000000..8adc47bd07 --- /dev/null +++ b/iphone/Maps/Settings/MWMAboutControllerHeader.xib @@ -0,0 +1,88 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/iphone/Maps/Settings/MWMHelpController.h b/iphone/Maps/Settings/MWMHelpController.h new file mode 100644 index 0000000000..8906ecbabb --- /dev/null +++ b/iphone/Maps/Settings/MWMHelpController.h @@ -0,0 +1,5 @@ +#import "MWMViewController.h" + +@interface MWMHelpController : MWMViewController + +@end diff --git a/iphone/Maps/Settings/MWMHelpController.mm b/iphone/Maps/Settings/MWMHelpController.mm new file mode 100644 index 0000000000..5ba66f4395 --- /dev/null +++ b/iphone/Maps/Settings/MWMHelpController.mm @@ -0,0 +1,254 @@ +#import "MWMHelpController.h" +#import +#import "AppInfo.h" +#import "Common.h" +#import "MWMMailViewController.h" +#import "Statistics.h" +#import "UIColor+MapsMeColor.h" +#import "WebViewController.h" + +#import "3party/Alohalytics/src/alohalytics_objc.h" + +#include "platform/platform.hpp" + +extern NSString * const kAlohalyticsTapEventKey; +extern NSString * const kLocaleUsedInSupportEmails = @"en_gb"; +extern NSDictionary * const kDeviceNames = @{ + @"i386" : @"Simulator", + @"iPad1,1" : @"iPad WiFi", + @"iPad1,2" : @"iPad GSM", + @"iPad2,1" : @"iPad 2 WiFi", + @"iPad2,2" : @"iPad 2 CDMA", + @"iPad2,2" : @"iPad 2 GSM", + @"iPad2,3" : @"iPad 2 GSM EV-DO", + @"iPad2,4" : @"iPad 2", + @"iPad2,5" : @"iPad Mini WiFi", + @"iPad2,6" : @"iPad Mini GSM", + @"iPad2,7" : @"iPad Mini CDMA", + @"iPad3,1" : @"iPad 3rd gen. WiFi", + @"iPad3,2" : @"iPad 3rd gen. GSM", + @"iPad3,3" : @"iPad 3rd gen. CDMA", + @"iPad3,4" : @"iPad 4th gen. WiFi", + @"iPad3,5" : @"iPad 4th gen. GSM", + @"iPad3,6" : @"iPad 4th gen. CDMA", + @"iPad4,1" : @"iPad Air WiFi", + @"iPad4,2" : @"iPad Air GSM", + @"iPad4,3" : @"iPad Air CDMA", + @"iPad4,4" : @"iPad Mini 2nd gen. WiFi", + @"iPad4,5" : @"iPad Mini 2nd gen. GSM", + @"iPad4,6" : @"iPad Mini 2nd gen. CDMA", + @"iPad5,3" : @"iPad Air 2 WiFi", + @"iPad5,4" : @"iPad Air 2 GSM", + @"iPad6,3" : @"iPad Pro (9.7 inch) WiFi", + @"iPad6,4" : @"iPad Pro (9.7 inch) GSM", + @"iPad6,7" : @"iPad Pro (12.9 inch) WiFi", + @"iPad6,8" : @"iPad Pro (12.9 inch) GSM", + @"iPhone1,1" : @"iPhone", + @"iPhone1,2" : @"iPhone 3G", + @"iPhone2,1" : @"iPhone 3GS", + @"iPhone3,1" : @"iPhone 4 GSM", + @"iPhone3,2" : @"iPhone 4 CDMA", + @"iPhone3,3" : @"iPhone 4 GSM EV-DO", + @"iPhone4,1" : @"iPhone 4S", + @"iPhone4,2" : @"iPhone 4S", + @"iPhone4,3" : @"iPhone 4S", + @"iPhone5,1" : @"iPhone 5", + @"iPhone5,2" : @"iPhone 5", + @"iPhone5,3" : @"iPhone 5c", + @"iPhone5,4" : @"iPhone 5c", + @"iPhone6,1" : @"iPhone 5s", + @"iPhone6,2" : @"iPhone 5s", + @"iPhone7,1" : @"iPhone 6 Plus", + @"iPhone7,2" : @"iPhone 6", + @"iPhone8,1" : @"iPhone 6s", + @"iPhone8,2" : @"iPhone 6s Plus", + @"iPhone8,4" : @"iPhone SE", + @"iPod1,1" : @"iPod Touch", + @"iPod2,1" : @"iPod Touch 2nd gen.", + @"iPod3,1" : @"iPod Touch 3rd gen.", + @"iPod4,1" : @"iPod Touch 4th gen.", + @"iPod5,1" : @"iPod Touch 5th gen.", + @"x86_64" : @"Simulator", +}; + +namespace +{ +NSString * const kCommonReportActionTitle = L(@"leave_a_review"); +NSString * const kBugReportActionTitle = L(@"something_is_not_working"); +NSString * const kCancelActionTitle = L(@"cancel"); +NSString * const kiOSEmail = @"ios@maps.me"; +} + +@interface MWMHelpController () + +@property(nonatomic) WebViewController * aboutViewController; + +@property(weak, nonatomic) IBOutlet UIView * separatorView; + +@end // namespace + +@implementation MWMHelpController + +- (void)viewDidLoad +{ + [super viewDidLoad]; + + self.title = L(@"help"); + + NSString * html; + if (GetPlatform().ConnectionStatus() == Platform::EConnectionType::CONNECTION_NONE) + { + NSString * path = [[NSBundle mainBundle] pathForResource:@"faq" ofType:@"html"]; + html = [NSString stringWithContentsOfFile:path encoding:NSUTF8StringEncoding error:nil]; + self.aboutViewController = + [[WebViewController alloc] initWithHtml:html baseUrl:nil andTitleOrNil:nil]; + } + else + { + NSURL * url = [NSURL URLWithString:@"https://support.maps.me"]; + self.aboutViewController = [[WebViewController alloc] initWithUrl:url andTitleOrNil:nil]; + } + + self.aboutViewController.openInSafari = NO; + UIView * aboutView = self.aboutViewController.view; + [self addChildViewController:self.aboutViewController]; + [self.view addSubview:aboutView]; + + aboutView.translatesAutoresizingMaskIntoConstraints = NO; + NSLayoutConstraint * top = [NSLayoutConstraint constraintWithItem:self.view + attribute:NSLayoutAttributeTop + relatedBy:NSLayoutRelationEqual + toItem:aboutView + attribute:NSLayoutAttributeTop + multiplier:1.0 + constant:0.0]; + NSLayoutConstraint * bottom = [NSLayoutConstraint constraintWithItem:self.separatorView + attribute:NSLayoutAttributeTop + relatedBy:NSLayoutRelationEqual + toItem:aboutView + attribute:NSLayoutAttributeBottom + multiplier:1.0 + constant:0.0]; + NSLayoutConstraint * left = [NSLayoutConstraint constraintWithItem:self.view + attribute:NSLayoutAttributeLeft + relatedBy:NSLayoutRelationEqual + toItem:aboutView + attribute:NSLayoutAttributeLeft + multiplier:1.0 + constant:0.0]; + NSLayoutConstraint * right = [NSLayoutConstraint constraintWithItem:self.view + attribute:NSLayoutAttributeRight + relatedBy:NSLayoutRelationEqual + toItem:aboutView + attribute:NSLayoutAttributeRight + multiplier:1.0 + constant:0.0]; + + [self.view addConstraints:@[ top, bottom, left, right ]]; +} + +- (IBAction)reportBug +{ + UIAlertController * alert = + [UIAlertController alertControllerWithTitle:L(@"feedback") + message:nil + preferredStyle:UIAlertControllerStyleAlert]; + + UIAlertAction * commonReport = [UIAlertAction actionWithTitle:kCommonReportActionTitle + style:UIAlertActionStyleDefault + handler:^(UIAlertAction * _Nonnull action) { + [self commonReportAction]; + }]; + [alert addAction:commonReport]; + + UIAlertAction * bugReport = [UIAlertAction actionWithTitle:kBugReportActionTitle + style:UIAlertActionStyleDefault + handler:^(UIAlertAction * _Nonnull action) { + [self bugReportAction]; + }]; + [alert addAction:bugReport]; + + UIAlertAction * cancel = + [UIAlertAction actionWithTitle:kCancelActionTitle style:UIAlertActionStyleCancel handler:nil]; + [alert addAction:cancel]; + alert.preferredAction = cancel; + + [self presentViewController:alert animated:YES completion:nil]; +} + +#pragma mark - Actions + +- (void)commonReportAction +{ + [Statistics logEvent:kStatSettingsOpenSection withParameters:@{kStatName : kStatFeedback}]; + [Alohalytics logEvent:kAlohalyticsTapEventKey withValue:@"contactUs"]; + // Do not localize subject. Support team uses it to filter emails. + [self sendEmailWithSubject:@"Feedback from user" toRecipient:kiOSEmail]; +} + +- (void)bugReportAction +{ + [Statistics logEvent:kStatSettingsOpenSection withParameters:@{kStatName : kStatReport}]; + [Alohalytics logEvent:kAlohalyticsTapEventKey withValue:@"reportABug"]; + // Do not localize subject. Support team uses it to filter emails. + [self sendEmailWithSubject:@"Bug report from user" toRecipient:kiOSEmail]; +} + +#pragma mark - Email + +- (void)sendEmailWithSubject:(NSString *)subject toRecipient:(NSString *)email +{ + if ([MWMMailViewController canSendMail]) + { + struct utsname systemInfo; + uname(&systemInfo); + NSString * machine = + [NSString stringWithCString:systemInfo.machine encoding:NSUTF8StringEncoding]; + NSString * device = kDeviceNames[machine]; + if (!device) + device = machine; + NSString * languageCode = [[NSLocale preferredLanguages] firstObject]; + NSString * language = [[NSLocale localeWithLocaleIdentifier:kLocaleUsedInSupportEmails] + displayNameForKey:NSLocaleLanguageCode + value:languageCode]; + NSString * locale = [[NSLocale currentLocale] objectForKey:NSLocaleCountryCode]; + NSString * country = [[NSLocale localeWithLocaleIdentifier:kLocaleUsedInSupportEmails] + displayNameForKey:NSLocaleCountryCode + value:locale]; + NSString * bundleVersion = + [[NSBundle mainBundle] objectForInfoDictionaryKey:(NSString *)kCFBundleVersionKey]; + NSString * text = [NSString stringWithFormat:@"\n\n\n\n- %@ (%@)\n- MAPS.ME %@\n- %@/%@", + device, [UIDevice currentDevice].systemVersion, + bundleVersion, language, country]; + NSString * alohalyticsId = [Alohalytics installationId]; + if (alohalyticsId) + text = [NSString stringWithFormat:@"%@\n- %@", text, alohalyticsId]; + + MWMMailViewController * vc = [[MWMMailViewController alloc] init]; + vc.mailComposeDelegate = self; + [vc setSubject:[NSString stringWithFormat:@"[%@ iOS] %@", [AppInfo sharedInfo].bundleVersion, + subject]]; + [vc setMessageBody:text isHTML:NO]; + [vc setToRecipients:@[ email ]]; + [vc.navigationBar setTintColor:[UIColor whitePrimaryText]]; + [self presentViewController:vc animated:YES completion:nil]; + } + else + { + NSString * text = [NSString stringWithFormat:L(@"email_error_body"), email]; + [[[UIAlertView alloc] initWithTitle:L(@"email_error_title") + message:text + delegate:nil + cancelButtonTitle:L(@"ok") + otherButtonTitles:nil] show]; + } +} + +- (void)mailComposeController:(MFMailComposeViewController *)controller + didFinishWithResult:(MFMailComposeResult)result + error:(NSError *)error +{ + [self dismissViewControllerAnimated:YES completion:nil]; +} + +@end diff --git a/iphone/Maps/Settings/MWMMobileInternetViewController.h b/iphone/Maps/Settings/MWMMobileInternetViewController.h new file mode 100644 index 0000000000..bdd9ce1e5b --- /dev/null +++ b/iphone/Maps/Settings/MWMMobileInternetViewController.h @@ -0,0 +1,5 @@ +#import "MWMTableViewController.h" + +@interface MWMMobileInternetViewController : MWMTableViewController + +@end diff --git a/iphone/Maps/Settings/MWMMobileInternetViewController.mm b/iphone/Maps/Settings/MWMMobileInternetViewController.mm new file mode 100644 index 0000000000..822e791003 --- /dev/null +++ b/iphone/Maps/Settings/MWMMobileInternetViewController.mm @@ -0,0 +1,77 @@ +#import "MWMMobileInternetViewController.h" +#import "MWMNetworkPolicy.h" +#import "SelectableCell.h" +#import "Statistics.h" + +using namespace network_policy; +using np = platform::NetworkPolicy; + +@interface MWMMobileInternetViewController () + +@property(weak, nonatomic) IBOutlet SelectableCell * always; +@property(weak, nonatomic) IBOutlet SelectableCell * ask; +@property(weak, nonatomic) IBOutlet SelectableCell * never; +@property(weak, nonatomic) SelectableCell * selected; + +@end + +@implementation MWMMobileInternetViewController + +- (void)viewDidLoad +{ + [super viewDidLoad]; + self.title = L(@"mobile_data"); + + SelectableCell * selected; + switch (GetStage()) + { + case np::Stage::Always: selected = self.always; break; + case np::Stage::Session: selected = self.ask; break; + case np::Stage::Never: selected = self.never; break; + } + selected.accessoryType = UITableViewCellAccessoryCheckmark; + self.selected = selected; +} + +- (void)setSelected:(SelectableCell *)selected +{ + if ([_selected isEqual:selected]) + return; + + _selected = selected; + NSString * statValue = nil; + if ([selected isEqual:self.always]) + { + statValue = kStatAlways; + SetStage(np::Stage::Always); + } + else if ([selected isEqual:self.ask]) + { + statValue = kStatAsk; + SetStage(np::Stage::Session); + } + else if ([selected isEqual:self.never]) + { + statValue = kStatNever; + SetStage(np::Stage::Never); + } + + [Statistics logEvent:kStatMobileInternet withParameters:@{kStatValue : statValue}]; +} + +- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath +{ + SelectableCell * selected = self.selected; + selected.accessoryType = UITableViewCellAccessoryNone; + selected = [tableView cellForRowAtIndexPath:indexPath]; + selected.accessoryType = UITableViewCellAccessoryCheckmark; + selected.selected = NO; + self.selected = selected; +} + +- (NSString *)tableView:(UITableView *)tableView titleForFooterInSection:(NSInteger)section +{ + return L(@"mobile_data_description"); +} + +@end diff --git a/iphone/Maps/Settings/MWMNightModeController.h b/iphone/Maps/Settings/MWMNightModeController.h new file mode 100644 index 0000000000..27b77f6f56 --- /dev/null +++ b/iphone/Maps/Settings/MWMNightModeController.h @@ -0,0 +1,5 @@ +#import "MWMTableViewController.h" + +@interface MWMNightModeController : MWMTableViewController + +@end diff --git a/iphone/Maps/Settings/MWMNightModeController.mm b/iphone/Maps/Settings/MWMNightModeController.mm new file mode 100644 index 0000000000..0ffb6f81db --- /dev/null +++ b/iphone/Maps/Settings/MWMNightModeController.mm @@ -0,0 +1,102 @@ +#import "MWMNightModeController.h" +#import "MWMSettings.h" +#import "MapsAppDelegate.h" +#import "SelectableCell.h" +#import "Statistics.h" +#import "UIColor+MapsMeColor.h" + +#include "Framework.h" + +@interface MWMNightModeController () + +@property(weak, nonatomic) IBOutlet SelectableCell * autoSwitch; +@property(weak, nonatomic) IBOutlet SelectableCell * on; +@property(weak, nonatomic) IBOutlet SelectableCell * off; +@property(weak, nonatomic) SelectableCell * selectedCell; + +@end + +@implementation MWMNightModeController + +- (void)viewDidLoad +{ + [super viewDidLoad]; + self.title = L(@"pref_map_style_title"); + if ([MWMSettings autoNightModeEnabled]) + { + self.autoSwitch.accessoryType = UITableViewCellAccessoryCheckmark; + _selectedCell = self.autoSwitch; + return; + } + + switch (GetFramework().GetMapStyle()) + { + case MapStyleDark: + self.on.accessoryType = UITableViewCellAccessoryCheckmark; + _selectedCell = self.on; + break; + case MapStyleClear: + case MapStyleLight: + self.off.accessoryType = UITableViewCellAccessoryCheckmark; + _selectedCell = self.off; + break; + case MapStyleMerged: + case MapStyleCount: break; + } +} + +- (void)setSelectedCell:(SelectableCell *)cell +{ + if ([_selectedCell isEqual:cell]) + return; + + _selectedCell = cell; + auto & f = GetFramework(); + auto const style = f.GetMapStyle(); + NSString * statValue = nil; + if ([cell isEqual:self.on]) + { + [MapsAppDelegate setAutoNightModeOff:YES]; + if (style == MapStyleDark) + return; + f.SetMapStyle(MapStyleDark); + [UIColor setNightMode:YES]; + [self mwm_refreshUI]; + statValue = kStatOn; + } + else if ([cell isEqual:self.off]) + { + [MapsAppDelegate setAutoNightModeOff:YES]; + if (style == MapStyleClear || style == MapStyleLight) + return; + f.SetMapStyle(MapStyleClear); + [UIColor setNightMode:NO]; + [self mwm_refreshUI]; + statValue = kStatOff; + } + else if ([cell isEqual:self.autoSwitch]) + { + [MapsAppDelegate setAutoNightModeOff:NO]; + [MapsAppDelegate changeMapStyleIfNedeed]; + if (style == MapStyleClear || style == MapStyleLight) + return; + [UIColor setNightMode:NO]; + f.SetMapStyle(MapStyleClear); + [self mwm_refreshUI]; + statValue = kStatValue; + } + + [Statistics logEvent:kStatNightMode withParameters:@{kStatValue : statValue}]; +} + +- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath +{ + SelectableCell * selectedCell = self.selectedCell; + selectedCell.accessoryType = UITableViewCellAccessoryNone; + selectedCell = [tableView cellForRowAtIndexPath:indexPath]; + selectedCell.accessoryType = UITableViewCellAccessoryCheckmark; + selectedCell.selected = NO; + self.selectedCell = selectedCell; +} + +@end diff --git a/iphone/Maps/Settings/MWMRecentTrackSettingsController.h b/iphone/Maps/Settings/MWMRecentTrackSettingsController.h new file mode 100644 index 0000000000..4266571020 --- /dev/null +++ b/iphone/Maps/Settings/MWMRecentTrackSettingsController.h @@ -0,0 +1,5 @@ +#import "MWMTableViewController.h" + +@interface MWMRecentTrackSettingsController : MWMTableViewController + +@end diff --git a/iphone/Maps/Settings/MWMRecentTrackSettingsController.mm b/iphone/Maps/Settings/MWMRecentTrackSettingsController.mm new file mode 100644 index 0000000000..3b0ec4a2f8 --- /dev/null +++ b/iphone/Maps/Settings/MWMRecentTrackSettingsController.mm @@ -0,0 +1,106 @@ +#import "MWMRecentTrackSettingsController.h" +#import "SelectableCell.h" +#import "Statistics.h" + +#include "Framework.h" + +#include "map/gps_tracker.hpp" + +extern NSString * const kUDTrackWarningAlertWasShown = @"TrackWarningAlertWasShown"; + +typedef NS_ENUM(NSUInteger, DurationInHours) { One = 1, Two = 2, Six = 6, Twelve = 12, Day = 24 }; + +@interface MWMRecentTrackSettingsController () + +@property(weak, nonatomic) IBOutlet SelectableCell * none; +@property(weak, nonatomic) IBOutlet SelectableCell * oneHour; +@property(weak, nonatomic) IBOutlet SelectableCell * twoHours; +@property(weak, nonatomic) IBOutlet SelectableCell * sixHours; +@property(weak, nonatomic) IBOutlet SelectableCell * twelveHours; +@property(weak, nonatomic) IBOutlet SelectableCell * oneDay; +@property(weak, nonatomic) SelectableCell * selectedCell; + +@end + +@implementation MWMRecentTrackSettingsController + +- (void)viewDidLoad +{ + [super viewDidLoad]; + self.title = L(@"pref_track_record_title"); + + if (!GpsTracker::Instance().IsEnabled()) + { + _selectedCell = self.none; + } + else + { + switch (GpsTracker::Instance().GetDuration().count()) + { + case One: _selectedCell = self.oneHour; break; + case Two: _selectedCell = self.twoHours; break; + case Six: _selectedCell = self.sixHours; break; + case Twelve: _selectedCell = self.twelveHours; break; + case Day: _selectedCell = self.oneDay; break; + default: NSAssert(false, @"Incorrect hours value"); break; + } + } + self.selectedCell.accessoryType = UITableViewCellAccessoryCheckmark; +} + +- (void)setSelectedCell:(SelectableCell *)selectedCell +{ + _selectedCell = selectedCell; + auto & f = GetFramework(); + auto & tracker = GpsTracker::Instance(); + NSString * statValue = nil; + if ([selectedCell isEqual:self.none]) + { + f.DisconnectFromGpsTracker(); + tracker.SetEnabled(false); + statValue = kStatOff; + } + else + { + if (!tracker.IsEnabled()) + { + tracker.SetEnabled(true); + NSUserDefaults * ud = [NSUserDefaults standardUserDefaults]; + [ud setBool:NO forKey:kUDTrackWarningAlertWasShown]; + [ud synchronize]; + } + f.ConnectToGpsTracker(); + + if ([selectedCell isEqual:self.oneHour]) + tracker.SetDuration(hours(One)); + else if ([selectedCell isEqual:self.twoHours]) + tracker.SetDuration(hours(Two)); + else if ([selectedCell isEqual:self.sixHours]) + tracker.SetDuration(hours(Six)); + else if ([selectedCell isEqual:self.twelveHours]) + tracker.SetDuration(hours(Twelve)); + else + tracker.SetDuration(hours(Day)); + + statValue = [NSString stringWithFormat:@"%@ hour(s)", @(tracker.GetDuration().count())]; + } + selectedCell.accessoryType = UITableViewCellAccessoryCheckmark; + [Statistics logEvent:kStatChangeRecentTrack withParameters:@{kStatValue : statValue}]; +} + +- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath +{ + SelectableCell * selectedCell = self.selectedCell; + selectedCell.accessoryType = UITableViewCellAccessoryNone; + selectedCell = [tableView cellForRowAtIndexPath:indexPath]; + selectedCell.selected = NO; + self.selectedCell = selectedCell; +} + +- (NSString *)tableView:(UITableView *)tableView titleForFooterInSection:(NSInteger)section +{ + NSAssert(section == 0, @"Incorrect sections count"); + return L(@"recent_track_help_text"); +} + +@end diff --git a/iphone/Maps/Settings/MWMSettings.h b/iphone/Maps/Settings/MWMSettings.h new file mode 100644 index 0000000000..f2d612c6db --- /dev/null +++ b/iphone/Maps/Settings/MWMSettings.h @@ -0,0 +1,35 @@ +#include "platform/measurement_utils.hpp" + +@interface MWMSettings : NSObject + ++ (BOOL)adServerForbidden; ++ (void)setAdServerForbidden:(BOOL)adServerForbidden; + ++ (BOOL)adForbidden; ++ (void)setAdForbidden:(BOOL)adForbidden; + ++ (BOOL)autoDownloadEnabled; ++ (void)setAutoDownloadEnabled:(BOOL)autoDownloadEnabled; + ++ (measurement_utils::Units)measurementUnits; ++ (void)setMeasurementUnits:(measurement_utils::Units)measurementUnits; + ++ (BOOL)zoomButtonsEnabled; ++ (void)setZoomButtonsEnabled:(BOOL)zoomButtonsEnabled; + ++ (BOOL)compassCalibrationEnabled; ++ (void)setCompassCalibrationEnabled:(BOOL)compassCalibrationEnabled; + ++ (BOOL)statisticsEnabled; ++ (void)setStatisticsEnabled:(BOOL)statisticsEnabled; + ++ (BOOL)autoNightModeEnabled; ++ (void)setAutoNightModeEnabled:(BOOL)autoNightModeEnabled; + ++ (BOOL)routingDisclaimerApproved; ++ (void)setRoutingDisclaimerApproved; + ++ (NSString *)spotlightLocaleLanguageId; ++ (void)setSpotlightLocaleLanguageId:(NSString *)spotlightLocaleLanguageId; + +@end diff --git a/iphone/Maps/Settings/MWMSettings.mm b/iphone/Maps/Settings/MWMSettings.mm new file mode 100644 index 0000000000..bcb055a62b --- /dev/null +++ b/iphone/Maps/Settings/MWMSettings.mm @@ -0,0 +1,153 @@ +#import "MWMSettings.h" +#import "MWMMapViewControlsManager.h" + +#import "3party/Alohalytics/src/alohalytics_objc.h" + +#include "Framework.h" + +#include "platform/settings.hpp" + +namespace +{ +char const * kAdForbiddenSettingsKey = "AdForbidden"; +char const * kAdServerForbiddenKey = "AdServerForbidden"; +char const * kAutoDownloadEnabledKey = "AutoDownloadEnabled"; +char const * kZoomButtonsEnabledKey = "ZoomButtonsEnabled"; +char const * kCompassCalibrationEnabledKey = "CompassCalibrationEnabled"; +char const * kRoutingDisclaimerApprovedKey = "IsDisclaimerApproved"; +char const * kStatisticsEnabledSettingsKey = "StatisticsEnabled"; + +NSString * const kUDAutoNightModeOff = @"AutoNightModeOff"; +NSString * const kSpotlightLocaleLanguageId = @"SpotlightLocaleLanguageId"; +} // namespace + +@implementation MWMSettings + ++ (BOOL)adServerForbidden +{ + bool adServerForbidden = false; + UNUSED_VALUE(settings::Get(kAdServerForbiddenKey, adServerForbidden)); + return adServerForbidden; +} + ++ (void)setAdServerForbidden:(BOOL)adServerForbidden +{ + settings::Set(kAdServerForbiddenKey, static_cast(adServerForbidden)); +} + ++ (BOOL)adForbidden +{ + bool adForbidden = false; + UNUSED_VALUE(settings::Get(kAdForbiddenSettingsKey, adForbidden)); + return adForbidden; +} + ++ (void)setAdForbidden:(BOOL)adForbidden +{ + settings::Set(kAdForbiddenSettingsKey, static_cast(adForbidden)); +} + ++ (BOOL)autoDownloadEnabled +{ + bool autoDownloadEnabled = true; + UNUSED_VALUE(settings::Get(kAutoDownloadEnabledKey, autoDownloadEnabled)); + return autoDownloadEnabled; +} + ++ (void)setAutoDownloadEnabled:(BOOL)autoDownloadEnabled +{ + settings::Set(kAutoDownloadEnabledKey, static_cast(autoDownloadEnabled)); +} + ++ (measurement_utils::Units)measurementUnits +{ + auto units = measurement_utils::Units::Metric; + UNUSED_VALUE(settings::Get(settings::kMeasurementUnits, units)); + return units; +} + ++ (void)setMeasurementUnits:(measurement_utils::Units)measurementUnits +{ + settings::Set(settings::kMeasurementUnits, measurementUnits); + GetFramework().SetupMeasurementSystem(); +} + ++ (BOOL)zoomButtonsEnabled +{ + bool enabled = true; + UNUSED_VALUE(settings::Get(kZoomButtonsEnabledKey, enabled)); + return enabled; +} + ++ (void)setZoomButtonsEnabled:(BOOL)zoomButtonsEnabled +{ + settings::Set(kZoomButtonsEnabledKey, static_cast(zoomButtonsEnabled)); + [MWMMapViewControlsManager manager].zoomHidden = !zoomButtonsEnabled; +} + ++ (BOOL)compassCalibrationEnabled +{ + bool enabled = true; + UNUSED_VALUE(settings::Get(kCompassCalibrationEnabledKey, enabled)); + return enabled; +} + ++ (void)setCompassCalibrationEnabled:(BOOL)compassCalibrationEnabled +{ + settings::Set(kCompassCalibrationEnabledKey, static_cast(compassCalibrationEnabled)); +} + ++ (BOOL)statisticsEnabled +{ + bool enabled = true; + UNUSED_VALUE(settings::Get(kStatisticsEnabledSettingsKey, enabled)); + return enabled; +} + ++ (void)setStatisticsEnabled:(BOOL)statisticsEnabled +{ + if (statisticsEnabled) + { + [Alohalytics enable]; + } + else + { + [Alohalytics logEvent:@"statisticsDisabled"]; + [Alohalytics disable]; + } + settings::Set(kStatisticsEnabledSettingsKey, static_cast(statisticsEnabled)); +} + ++ (BOOL)autoNightModeEnabled +{ + return ![[NSUserDefaults standardUserDefaults] boolForKey:kUDAutoNightModeOff]; +} + ++ (void)setAutoNightModeEnabled:(BOOL)autoNightModeEnabled +{ + NSUserDefaults * ud = [NSUserDefaults standardUserDefaults]; + [ud setBool:!autoNightModeEnabled forKey:kUDAutoNightModeOff]; + [ud synchronize]; +} + ++ (BOOL)routingDisclaimerApproved +{ + bool enabled = false; + UNUSED_VALUE(settings::Get(kRoutingDisclaimerApprovedKey, enabled)); + return enabled; +} + ++ (void)setRoutingDisclaimerApproved { settings::Set(kRoutingDisclaimerApprovedKey, true); } ++ (NSString *)spotlightLocaleLanguageId +{ + return [[NSUserDefaults standardUserDefaults] stringForKey:kSpotlightLocaleLanguageId]; +} + ++ (void)setSpotlightLocaleLanguageId:(NSString *)spotlightLocaleLanguageId +{ + NSUserDefaults * ud = [NSUserDefaults standardUserDefaults]; + [ud setObject:spotlightLocaleLanguageId forKey:kSpotlightLocaleLanguageId]; + [ud synchronize]; +} + +@end diff --git a/iphone/Maps/Settings/MWMTTSLanguageViewController.h b/iphone/Maps/Settings/MWMTTSLanguageViewController.h new file mode 100644 index 0000000000..a7b6a64ac2 --- /dev/null +++ b/iphone/Maps/Settings/MWMTTSLanguageViewController.h @@ -0,0 +1,5 @@ +#import "MWMTableViewController.h" + +@interface MWMTTSLanguageViewController : MWMTableViewController + +@end diff --git a/iphone/Maps/Settings/MWMTTSLanguageViewController.mm b/iphone/Maps/Settings/MWMTTSLanguageViewController.mm new file mode 100644 index 0000000000..8b1e2b269a --- /dev/null +++ b/iphone/Maps/Settings/MWMTTSLanguageViewController.mm @@ -0,0 +1,41 @@ +#import "MWMTextToSpeech.h" +#import "MWMTTSLanguageViewController.h" +#import "MWMTTSSettingsViewController.h" +#import "SelectableCell.h" +#import "UIColor+MapsMeColor.h" + +static NSString * const kUnwingSegueIdentifier = @"UnwindToTTSSettings"; + +@implementation MWMTTSLanguageViewController + +- (void)viewDidLoad +{ + [super viewDidLoad]; + self.title = L(@"pref_tts_other_section_title"); + self.tableView.separatorColor = [UIColor blackDividers]; +} + +- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(SelectableCell *)sender +{ + if (![segue.identifier isEqualToString:kUnwingSegueIdentifier]) + return; + MWMTTSSettingsViewController * dest = segue.destinationViewController; + NSUInteger const row = [self.tableView indexPathForCell:sender].row; + [dest setAdditionalTTSLanguage:[[MWMTextToSpeech tts] availableLanguages][row]]; +} + +#pragma mark - UITableViewDataSource && UITableViewDelegate + +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section +{ + return [[MWMTextToSpeech tts] availableLanguages].size(); +} + +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath +{ + SelectableCell * cell = (SelectableCell *)[tableView dequeueReusableCellWithIdentifier:[SelectableCell className]]; + cell.titleLabel.text = @([[MWMTextToSpeech tts] availableLanguages][indexPath.row].second.c_str()); + return cell; +} + +@end diff --git a/iphone/Maps/Settings/MWMTTSSettingsViewController.h b/iphone/Maps/Settings/MWMTTSSettingsViewController.h new file mode 100644 index 0000000000..9c364a5247 --- /dev/null +++ b/iphone/Maps/Settings/MWMTTSSettingsViewController.h @@ -0,0 +1,10 @@ +#import "MWMTableViewController.h" + +#include "std/utility.hpp" +#include "std/string.hpp" + +@interface MWMTTSSettingsViewController : MWMTableViewController + +- (void)setAdditionalTTSLanguage:(pair const &)l; + +@end diff --git a/iphone/Maps/Settings/MWMTTSSettingsViewController.mm b/iphone/Maps/Settings/MWMTTSSettingsViewController.mm new file mode 100644 index 0000000000..bc120aee3c --- /dev/null +++ b/iphone/Maps/Settings/MWMTTSSettingsViewController.mm @@ -0,0 +1,201 @@ +#import "MWMTTSSettingsViewController.h" +#import +#import "LinkCell.h" +#import "MWMTextToSpeech.h" +#import "SelectableCell.h" +#import "Statistics.h" +#import "UIColor+MapsMeColor.h" +#import "WebViewController.h" + +#include "LocaleTranslator.h" + +static NSString * kSelectTTSLanguageSegueName = @"TTSLanguage"; + +using namespace locale_translator; + +@interface MWMTTSSettingsViewController () +{ + pair _additionalTTSLanguage; + vector> _languages; +} + +@property(nonatomic) BOOL isLocaleLanguageAbsent; + +@end + +@implementation MWMTTSSettingsViewController + +- (void)viewDidLoad +{ + [super viewDidLoad]; + self.title = L(@"pref_tts_language_title"); + self.tableView.separatorColor = [UIColor blackDividers]; + MWMTextToSpeech * tts = [MWMTextToSpeech tts]; + + _languages.reserve(3); + auto const & v = tts.availableLanguages; + NSAssert(!v.empty(), @"Vector can't be empty!"); + pair const standart = v.front(); + _languages.push_back(standart); + + using namespace tts; + NSString * currentBcp47 = [AVSpeechSynthesisVoice currentLanguageCode]; + string const currentBcp47Str = [currentBcp47 UTF8String]; + string const currentTwineStr = bcp47ToTwineLanguage(currentBcp47); + if (currentBcp47Str != standart.first && !currentBcp47Str.empty()) + { + string const translated = translatedTwine(currentTwineStr); + pair const cur{currentBcp47Str, translated}; + if (translated.empty() || find(v.begin(), v.end(), cur) != v.end()) + _languages.push_back(cur); + else + self.isLocaleLanguageAbsent = YES; + } + + NSString * nsSavedLanguage = [MWMTextToSpeech savedLanguage]; + if (nsSavedLanguage.length) + { + string const savedLanguage = nsSavedLanguage.UTF8String; + if (savedLanguage != currentBcp47Str && savedLanguage != standart.first && + !savedLanguage.empty()) + _languages.emplace_back( + make_pair(savedLanguage, translatedTwine(bcp47ToTwineLanguage(nsSavedLanguage)))); + } +} + +- (IBAction)unwind:(id)sender +{ + size_t const size = _languages.size(); + if (find(_languages.begin(), _languages.end(), _additionalTTSLanguage) != _languages.end()) + { + [self.tableView reloadData]; + return; + } + switch (size) + { + case 1: _languages.push_back(_additionalTTSLanguage); break; + case 2: + if (self.isLocaleLanguageAbsent) + _languages[size - 1] = _additionalTTSLanguage; + else + _languages.push_back(_additionalTTSLanguage); + break; + case 3: _languages[size - 1] = _additionalTTSLanguage; break; + default: NSAssert(false, @"Incorrect language's count"); break; + } + [self.tableView reloadData]; +} + +- (void)setAdditionalTTSLanguage:(pair const &)l +{ + [[MWMTextToSpeech tts] setNotificationsLocale:@(l.first.c_str())]; + _additionalTTSLanguage = l; +} + +#pragma mark - UITableViewDataSource + +- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { return 2; } +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section +{ + if (section == 0) + return _languages.size() + 2; + else + return 1; +} + +- (UITableViewCell *)tableView:(UITableView *)tableView + cellForRowAtIndexPath:(NSIndexPath *)indexPath +{ + if (indexPath.section == 0) + { + if (indexPath.row == 0) + { + SelectableCell * cell = (SelectableCell *)[tableView + dequeueReusableCellWithIdentifier:[SelectableCell className]]; + cell.titleLabel.text = L(@"duration_disabled"); + cell.accessoryType = [MWMTextToSpeech isTTSEnabled] ? UITableViewCellAccessoryNone : UITableViewCellAccessoryCheckmark; + return cell; + } + else + { + NSInteger const row = indexPath.row - 1; + if (row == _languages.size()) + { + LinkCell * cell = + (LinkCell *)[tableView dequeueReusableCellWithIdentifier:[LinkCell className]]; + cell.titleLabel.text = L(@"pref_tts_other_section_title"); + return cell; + } + else + { + SelectableCell * cell = (SelectableCell *)[tableView + dequeueReusableCellWithIdentifier:[SelectableCell className]]; + pair const p = _languages[row]; + cell.titleLabel.text = @(p.second.c_str()); + BOOL const isSelected = + [@(p.first.c_str()) isEqualToString:[MWMTextToSpeech savedLanguage]]; + cell.accessoryType = [MWMTextToSpeech isTTSEnabled] && isSelected + ? UITableViewCellAccessoryCheckmark + : UITableViewCellAccessoryNone; + return cell; + } + } + } + else + { + LinkCell * cell = + (LinkCell *)[tableView dequeueReusableCellWithIdentifier:[LinkCell className]]; + cell.titleLabel.text = L(@"pref_tts_how_to_set_up_voice"); + return cell; + } +} + +- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath +{ + if (indexPath.section == 0) + { + if (indexPath.row == 0) + { + [Statistics logEvent:kStatEventName(kStatSettings, kStatTTS) + withParameters:@{kStatValue : kStatOff}]; + [MWMTextToSpeech setTTSEnabled:NO]; + [tableView reloadSections:[NSIndexSet indexSetWithIndex:0] + withRowAnimation:UITableViewRowAnimationFade]; + } + else + { + [Statistics logEvent:kStatEventName(kStatSettings, kStatTTS) + withParameters:@{kStatValue : kStatOn}]; + [MWMTextToSpeech setTTSEnabled:YES]; + NSInteger const row = indexPath.row - 1; + if (row == _languages.size()) + { + [Statistics logEvent:kStatEventName(kStatTTSSettings, kStatChangeLanguage) + withParameters:@{kStatValue : kStatOther}]; + [self performSegueWithIdentifier:kSelectTTSLanguageSegueName sender:nil]; + } + else + { + [[MWMTextToSpeech tts] setNotificationsLocale:@(_languages[row].first.c_str())]; + [tableView reloadSections:[NSIndexSet indexSetWithIndex:0] + withRowAnimation:UITableViewRowAnimationFade]; + } + } + } + else if (indexPath.section == 1) + { + [Statistics logEvent:kStatEventName(kStatTTSSettings, kStatHelp)]; + NSString * path = + [[NSBundle mainBundle] pathForResource:@"tts-how-to-set-up-voice" ofType:@"html"]; + NSString * html = + [[NSString alloc] initWithContentsOfFile:path encoding:NSUTF8StringEncoding error:nil]; + NSURL * baseURL = [NSURL fileURLWithPath:path]; + WebViewController * vc = + [[WebViewController alloc] initWithHtml:html + baseUrl:baseURL + andTitleOrNil:L(@"pref_tts_how_to_set_up_voice")]; + [self.navigationController pushViewController:vc animated:YES]; + } +} + +@end diff --git a/iphone/Maps/Settings/MWMUnitsController.h b/iphone/Maps/Settings/MWMUnitsController.h new file mode 100644 index 0000000000..9135e1df1e --- /dev/null +++ b/iphone/Maps/Settings/MWMUnitsController.h @@ -0,0 +1,5 @@ +#import "MWMTableViewController.h" + +@interface MWMUnitsController : MWMTableViewController + +@end diff --git a/iphone/Maps/Settings/MWMUnitsController.mm b/iphone/Maps/Settings/MWMUnitsController.mm new file mode 100644 index 0000000000..859b99e12c --- /dev/null +++ b/iphone/Maps/Settings/MWMUnitsController.mm @@ -0,0 +1,57 @@ +#import "MWMUnitsController.h" +#import "MWMSettings.h" +#import "SelectableCell.h" +#import "Statistics.h" + +@interface MWMUnitsController () + +@property(weak, nonatomic) IBOutlet SelectableCell * kilometers; +@property(weak, nonatomic) IBOutlet SelectableCell * miles; +@property(weak, nonatomic) SelectableCell * selectedCell; + +@end + +@implementation MWMUnitsController + +- (void)viewDidLoad +{ + [super viewDidLoad]; + self.title = L(@"measurement_units"); + + switch ([MWMSettings measurementUnits]) + { + case measurement_utils::Units::Metric: self.selectedCell = self.kilometers; break; + case measurement_utils::Units::Imperial: self.selectedCell = self.miles; break; + } +} + +- (void)setSelectedCell:(SelectableCell *)cell +{ + SelectableCell * selectedCell = _selectedCell; + if (selectedCell == cell) + return; + + selectedCell.accessoryType = UITableViewCellAccessoryNone; + cell.accessoryType = UITableViewCellAccessoryCheckmark; + cell.selected = NO; + _selectedCell = cell; + if (cell == self.kilometers) + { + [Statistics logEvent:kStatEventName(kStatSettings, kStatChangeMeasureUnits) + withParameters:@{kStatValue : kStatKilometers}]; + [MWMSettings setMeasurementUnits:measurement_utils::Units::Metric]; + } + else + { + [Statistics logEvent:kStatEventName(kStatSettings, kStatChangeMeasureUnits) + withParameters:@{kStatValue : kStatMiles}]; + [MWMSettings setMeasurementUnits:measurement_utils::Units::Imperial]; + } +} + +- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath +{ + self.selectedCell = [tableView cellForRowAtIndexPath:indexPath]; +} + +@end diff --git a/iphone/Maps/Settings/SelectableCell.h b/iphone/Maps/Settings/SelectableCell.h deleted file mode 100644 index d86d8819d1..0000000000 --- a/iphone/Maps/Settings/SelectableCell.h +++ /dev/null @@ -1,7 +0,0 @@ -#import "MWMTableViewCell.h" - -@interface SelectableCell : MWMTableViewCell - -@property (weak, nonatomic) IBOutlet UILabel * titleLabel; - -@end diff --git a/iphone/Maps/Settings/SelectableCell.mm b/iphone/Maps/Settings/SelectableCell.mm deleted file mode 100644 index 289e5c7b23..0000000000 --- a/iphone/Maps/Settings/SelectableCell.mm +++ /dev/null @@ -1,12 +0,0 @@ -#import "SelectableCell.h" -#import "UIColor+MapsMeColor.h" - -@implementation SelectableCell - -- (void)awakeFromNib -{ - [super awakeFromNib]; - self.backgroundColor = [UIColor white]; -} - -@end diff --git a/iphone/Maps/Settings/SwitchCell.h b/iphone/Maps/Settings/SwitchCell.h deleted file mode 100644 index 8dfb1ad1c4..0000000000 --- a/iphone/Maps/Settings/SwitchCell.h +++ /dev/null @@ -1,17 +0,0 @@ -#import "MWMTableViewCell.h" - -@class SwitchCell; -@protocol SwitchCellDelegate - -- (void)switchCell:(SwitchCell *)cell didChangeValue:(BOOL)value; - -@end - -@interface SwitchCell : MWMTableViewCell - -@property(weak, nonatomic) IBOutlet UILabel * titleLabel; -@property(weak, nonatomic) IBOutlet UISwitch * switchButton; - -@property(weak, nonatomic) id delegate; - -@end diff --git a/iphone/Maps/Settings/SwitchCell.mm b/iphone/Maps/Settings/SwitchCell.mm deleted file mode 100644 index 292ec81b43..0000000000 --- a/iphone/Maps/Settings/SwitchCell.mm +++ /dev/null @@ -1,18 +0,0 @@ -#import "SwitchCell.h" -#import "UIColor+MapsMeColor.h" - -@implementation SwitchCell - -- (void)awakeFromNib -{ - [super awakeFromNib]; - [self.switchButton addTarget:self action:@selector(switchChanged:) forControlEvents:UIControlEventValueChanged]; - self.backgroundColor = [UIColor white]; -} - -- (void)switchChanged:(UISwitch *)sender -{ - [self.delegate switchCell:self didChangeValue:sender.on]; -} - -@end -- cgit v1.2.3 From 98123085dc3677f1d036acf2df0b105ca12751c2 Mon Sep 17 00:00:00 2001 From: Ilya Grechuhin Date: Thu, 15 Dec 2016 16:15:44 +0300 Subject: [swift] [ios] Added Swift support. --- iphone/Maps/Bridging-Header.h | 9 ++++ iphone/Maps/Maps.xcodeproj/project.pbxproj | 70 ++++++++++++++++++++++++++++++ 2 files changed, 79 insertions(+) create mode 100644 iphone/Maps/Bridging-Header.h (limited to 'iphone/Maps') diff --git a/iphone/Maps/Bridging-Header.h b/iphone/Maps/Bridging-Header.h new file mode 100644 index 0000000000..1fb8b2c9f8 --- /dev/null +++ b/iphone/Maps/Bridging-Header.h @@ -0,0 +1,9 @@ +// +// Use this file to import your target's public headers that you would like to expose to Swift. +// + +#import + +#import "MWMTableViewCell.h" +#import "UIColor+MapsMeColor.h" +#import "UIFont+MapsMeFonts.h" diff --git a/iphone/Maps/Maps.xcodeproj/project.pbxproj b/iphone/Maps/Maps.xcodeproj/project.pbxproj index 6a50fa59a1..1e8b6908fe 100644 --- a/iphone/Maps/Maps.xcodeproj/project.pbxproj +++ b/iphone/Maps/Maps.xcodeproj/project.pbxproj @@ -2475,6 +2475,7 @@ 28A0AB4B0D9B1048005BE974 /* Maps_Prefix.pch */, 29B97316FDCFA39411CA2CEA /* main.mm */, 34EC27091CB2A7120084FA36 /* fabric_logging.hpp */, + 345050211E028B8000A8DC59 /* Bridging-Header.h */, 34EC27081CB2A7120084FA36 /* fabric_logging_ios.mm */, ); name = "Other Sources"; @@ -4027,6 +4028,7 @@ TargetAttributes = { 1D6058900D05DD3D006BFB54 = { DevelopmentTeam = 3T6FSDE8C7; + LastSwiftMigration = 0820; ProvisioningStyle = Automatic; SystemCapabilities = { com.apple.ApplicationGroups.iOS = { @@ -4048,6 +4050,7 @@ }; 6741A93D1BF340DE002C974C = { DevelopmentTeam = 3T6FSDE8C7; + LastSwiftMigration = 0820; ProvisioningStyle = Automatic; SystemCapabilities = { com.apple.Push = { @@ -4057,6 +4060,7 @@ }; 849CF5E21DE842290024A8A5 = { DevelopmentTeam = 3T6FSDE8C7; + LastSwiftMigration = 0820; ProvisioningStyle = Automatic; }; }; @@ -5514,11 +5518,13 @@ 6741AA551BF340DE002C974C /* Simulator */ = { isa = XCBuildConfiguration; buildSettings = { + CLANG_ENABLE_MODULES = YES; ENABLE_BITCODE = YES; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)/Frameworks/HockeySDK.embeddedframework", ); + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_NAME = "xc dbg"; }; name = Simulator; @@ -5526,11 +5532,13 @@ 6741AA561BF340DE002C974C /* Simulator Release */ = { isa = XCBuildConfiguration; buildSettings = { + CLANG_ENABLE_MODULES = YES; ENABLE_BITCODE = YES; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)/Frameworks/HockeySDK.embeddedframework", ); + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_NAME = "xc rel"; }; name = "Simulator Release"; @@ -5538,11 +5546,13 @@ 6741AA571BF340DE002C974C /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + CLANG_ENABLE_MODULES = YES; ENABLE_BITCODE = YES; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)/Frameworks/HockeySDK.embeddedframework", ); + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_NAME = "xc dbg"; VALID_ARCHS = "arm64 armv7 armv7s i386 x86_64"; }; @@ -5551,11 +5561,13 @@ 6741AA591BF340DE002C974C /* AdHoc */ = { isa = XCBuildConfiguration; buildSettings = { + CLANG_ENABLE_MODULES = YES; ENABLE_BITCODE = YES; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)/Frameworks/HockeySDK.embeddedframework", ); + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_NAME = "xc beta"; }; name = AdHoc; @@ -5563,11 +5575,13 @@ 6741AA5A1BF340DE002C974C /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + CLANG_ENABLE_MODULES = YES; ENABLE_BITCODE = YES; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)/Frameworks/HockeySDK.embeddedframework", ); + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_NAME = "xc rel"; VALID_ARCHS = "arm64 armv7 armv7s i386 x86_64"; }; @@ -5576,11 +5590,13 @@ 6741AA5C1BF340DE002C974C /* Production Full */ = { isa = XCBuildConfiguration; buildSettings = { + CLANG_ENABLE_MODULES = YES; ENABLE_BITCODE = YES; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)/Frameworks/HockeySDK.embeddedframework", ); + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_NAME = "xc pf"; }; name = "Production Full"; @@ -5589,12 +5605,14 @@ isa = XCBuildConfiguration; buildSettings = { BUILD_DIR = "$(BUILD_ROOT)"; + CLANG_ENABLE_MODULES = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; DEVELOPMENT_TEAM = 3T6FSDE8C7; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)/Frameworks/HockeySDK.embeddedframework", ); + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; LIBRARY_SEARCH_PATHS = ( "$(inherited)", "$(OMIM_ROOT)/../omim-iphone-cmake-debug-$(CURRENT_ARCH)/out/debug", @@ -5637,12 +5655,14 @@ isa = XCBuildConfiguration; buildSettings = { BUILD_DIR = "$(BUILD_ROOT)"; + CLANG_ENABLE_MODULES = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; DEVELOPMENT_TEAM = 3T6FSDE8C7; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)/Frameworks/HockeySDK.embeddedframework", ); + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; LIBRARY_SEARCH_PATHS = ( "$(inherited)", "$(OMIM_ROOT)/../omim-iphone-cmake-release-$(CURRENT_ARCH)/out/release", @@ -5685,12 +5705,14 @@ isa = XCBuildConfiguration; buildSettings = { BUILD_DIR = "$(BUILD_ROOT)"; + CLANG_ENABLE_MODULES = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; DEVELOPMENT_TEAM = 3T6FSDE8C7; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)/Frameworks/HockeySDK.embeddedframework", ); + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; LIBRARY_SEARCH_PATHS = ( "$(inherited)", "$(OMIM_ROOT)/../omim-iphone-cmake-debug-$(CURRENT_ARCH)/out/debug", @@ -5733,12 +5755,14 @@ isa = XCBuildConfiguration; buildSettings = { BUILD_DIR = "$(BUILD_ROOT)"; + CLANG_ENABLE_MODULES = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; DEVELOPMENT_TEAM = 3T6FSDE8C7; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)/Frameworks/HockeySDK.embeddedframework", ); + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; LIBRARY_SEARCH_PATHS = ( "$(inherited)", "$(OMIM_ROOT)/../omim-iphone-cmake-release-$(CURRENT_ARCH)/out/release", @@ -5781,12 +5805,14 @@ isa = XCBuildConfiguration; buildSettings = { BUILD_DIR = "$(BUILD_ROOT)"; + CLANG_ENABLE_MODULES = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; DEVELOPMENT_TEAM = 3T6FSDE8C7; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)/Frameworks/HockeySDK.embeddedframework", ); + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; LIBRARY_SEARCH_PATHS = ( "$(inherited)", "$(OMIM_ROOT)/../omim-iphone-cmake-release-$(CURRENT_ARCH)/out/release", @@ -5829,12 +5855,14 @@ isa = XCBuildConfiguration; buildSettings = { BUILD_DIR = "$(BUILD_ROOT)"; + CLANG_ENABLE_MODULES = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; DEVELOPMENT_TEAM = 3T6FSDE8C7; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)/Frameworks/HockeySDK.embeddedframework", ); + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; LIBRARY_SEARCH_PATHS = ( "$(inherited)", "$(OMIM_ROOT)/../omim-iphone-cmake-release-$(CURRENT_ARCH)/out/release", @@ -5908,6 +5936,11 @@ PRODUCT_NAME = "maps.me dbg"; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = "iphonesimulator iphoneos"; + SWIFT_OBJC_BRIDGING_HEADER = "Bridging-Header.h"; + SWIFT_OBJC_INTERFACE_HEADER_NAME = SwiftBridge.h; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 3.0; + SWIFT_WHOLE_MODULE_OPTIMIZATION = YES; TARGETED_DEVICE_FAMILY = "1,2"; VALID_ARCHS = "i386 x86_64"; VERSIONING_SYSTEM = "apple-generic"; @@ -5918,10 +5951,12 @@ isa = XCBuildConfiguration; buildSettings = { BUILD_DIR = "$(BUILD_ROOT)"; + CLANG_ENABLE_MODULES = YES; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)/Frameworks/HockeySDK.embeddedframework", ); + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; LIBRARY_SEARCH_PATHS = ( "$(inherited)", "$(OMIM_ROOT)/../omim-iphone-debug-$(CURRENT_ARCH)/out/debug", @@ -5991,6 +6026,11 @@ PRODUCT_NAME = "maps.me dbg"; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = "iphonesimulator iphoneos"; + SWIFT_OBJC_BRIDGING_HEADER = "Bridging-Header.h"; + SWIFT_OBJC_INTERFACE_HEADER_NAME = SwiftBridge.h; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 3.0; + SWIFT_WHOLE_MODULE_OPTIMIZATION = YES; TARGETED_DEVICE_FAMILY = "1,2"; VALID_ARCHS = "armv7 armv7s arm64"; VERSIONING_SYSTEM = "apple-generic"; @@ -6001,10 +6041,12 @@ isa = XCBuildConfiguration; buildSettings = { BUILD_DIR = "$(BUILD_ROOT)"; + CLANG_ENABLE_MODULES = YES; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)/Frameworks/HockeySDK.embeddedframework", ); + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; LIBRARY_SEARCH_PATHS = ( "$(inherited)", "$(OMIM_ROOT)/../omim-iphone-debug-$(CURRENT_ARCH)/out/debug", @@ -6076,6 +6118,11 @@ PRODUCT_NAME = "maps.me beta"; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = "iphonesimulator iphoneos"; + SWIFT_OBJC_BRIDGING_HEADER = "Bridging-Header.h"; + SWIFT_OBJC_INTERFACE_HEADER_NAME = SwiftBridge.h; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_VERSION = 3.0; + SWIFT_WHOLE_MODULE_OPTIMIZATION = YES; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; VALID_ARCHS = "armv7 armv7s arm64"; @@ -6087,10 +6134,12 @@ isa = XCBuildConfiguration; buildSettings = { BUILD_DIR = "$(BUILD_ROOT)"; + CLANG_ENABLE_MODULES = YES; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)/Frameworks/HockeySDK.embeddedframework", ); + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; LIBRARY_SEARCH_PATHS = ( "$(inherited)", "$(OMIM_ROOT)/../omim-iphone-production-$(CURRENT_ARCH)/out/production", @@ -6162,6 +6211,11 @@ PRODUCT_NAME = maps.me; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = "iphonesimulator iphoneos"; + SWIFT_OBJC_BRIDGING_HEADER = "Bridging-Header.h"; + SWIFT_OBJC_INTERFACE_HEADER_NAME = SwiftBridge.h; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_VERSION = 3.0; + SWIFT_WHOLE_MODULE_OPTIMIZATION = YES; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; VALID_ARCHS = "armv7 armv7s arm64"; @@ -6173,10 +6227,12 @@ isa = XCBuildConfiguration; buildSettings = { BUILD_DIR = "$(BUILD_ROOT)"; + CLANG_ENABLE_MODULES = YES; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)/Frameworks/HockeySDK.embeddedframework", ); + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; LIBRARY_SEARCH_PATHS = ( "$(inherited)", "$(OMIM_ROOT)/../omim-iphone-production-$(CURRENT_ARCH)/out/production", @@ -6249,6 +6305,11 @@ PRODUCT_NAME = "maps.me rel"; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = "iphonesimulator iphoneos"; + SWIFT_OBJC_BRIDGING_HEADER = "Bridging-Header.h"; + SWIFT_OBJC_INTERFACE_HEADER_NAME = SwiftBridge.h; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_VERSION = 3.0; + SWIFT_WHOLE_MODULE_OPTIMIZATION = YES; TARGETED_DEVICE_FAMILY = "1,2"; VALID_ARCHS = "armv7 armv7s arm64"; VERSIONING_SYSTEM = "apple-generic"; @@ -6259,10 +6320,12 @@ isa = XCBuildConfiguration; buildSettings = { BUILD_DIR = "$(BUILD_ROOT)"; + CLANG_ENABLE_MODULES = YES; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)/Frameworks/HockeySDK.embeddedframework", ); + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; LIBRARY_SEARCH_PATHS = ( "$(inherited)", "$(OMIM_ROOT)/../omim-iphone-release-$(CURRENT_ARCH)/out/release", @@ -6336,6 +6399,11 @@ PRODUCT_NAME = "maps.me rel"; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = "iphonesimulator iphoneos"; + SWIFT_OBJC_BRIDGING_HEADER = "Bridging-Header.h"; + SWIFT_OBJC_INTERFACE_HEADER_NAME = SwiftBridge.h; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_VERSION = 3.0; + SWIFT_WHOLE_MODULE_OPTIMIZATION = YES; TARGETED_DEVICE_FAMILY = "1,2"; VALID_ARCHS = "i386 x86_64"; VERSIONING_SYSTEM = "apple-generic"; @@ -6346,10 +6414,12 @@ isa = XCBuildConfiguration; buildSettings = { BUILD_DIR = "$(BUILD_ROOT)"; + CLANG_ENABLE_MODULES = YES; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)/Frameworks/HockeySDK.embeddedframework", ); + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; LIBRARY_SEARCH_PATHS = ( "$(inherited)", "$(OMIM_ROOT)/../omim-iphone-release-$(CURRENT_ARCH)/out/release", -- cgit v1.2.3 From 3b7a716dc7cfa82b2419b677554f01c796ca99de Mon Sep 17 00:00:00 2001 From: Ilya Grechuhin Date: Thu, 15 Dec 2016 16:19:01 +0300 Subject: [swift] [ios] Migrated Settings cells to Swift. --- iphone/Maps/Maps.xcodeproj/project.pbxproj | 69 ++- iphone/Maps/Settings.storyboard | 503 ++++++--------------- iphone/Maps/Settings/Cells/LinkCell.h | 8 - iphone/Maps/Settings/Cells/LinkCell.mm | 12 - iphone/Maps/Settings/Cells/SelectableCell.h | 7 - iphone/Maps/Settings/Cells/SelectableCell.mm | 12 - .../Settings/Cells/SettingsTableViewLinkCell.swift | 29 ++ .../Cells/SettingsTableViewSelectableCell.swift | 19 + .../Cells/SettingsTableViewSwitchCell.swift | 45 ++ iphone/Maps/Settings/Cells/SwitchCell.h | 17 - iphone/Maps/Settings/Cells/SwitchCell.mm | 18 - iphone/Maps/Settings/MWMAboutController.mm | 18 +- .../Settings/MWMMobileInternetViewController.mm | 16 +- iphone/Maps/Settings/MWMNightModeController.mm | 14 +- .../Settings/MWMRecentTrackSettingsController.mm | 20 +- iphone/Maps/Settings/MWMSettingsViewController.mm | 160 ++++--- .../Maps/Settings/MWMTTSLanguageViewController.mm | 16 +- .../Maps/Settings/MWMTTSSettingsViewController.h | 2 +- .../Maps/Settings/MWMTTSSettingsViewController.mm | 34 +- iphone/Maps/Settings/MWMUnitsController.mm | 12 +- 20 files changed, 442 insertions(+), 589 deletions(-) delete mode 100644 iphone/Maps/Settings/Cells/LinkCell.h delete mode 100644 iphone/Maps/Settings/Cells/LinkCell.mm delete mode 100644 iphone/Maps/Settings/Cells/SelectableCell.h delete mode 100644 iphone/Maps/Settings/Cells/SelectableCell.mm create mode 100644 iphone/Maps/Settings/Cells/SettingsTableViewLinkCell.swift create mode 100644 iphone/Maps/Settings/Cells/SettingsTableViewSelectableCell.swift create mode 100644 iphone/Maps/Settings/Cells/SettingsTableViewSwitchCell.swift delete mode 100644 iphone/Maps/Settings/Cells/SwitchCell.h delete mode 100644 iphone/Maps/Settings/Cells/SwitchCell.mm (limited to 'iphone/Maps') diff --git a/iphone/Maps/Maps.xcodeproj/project.pbxproj b/iphone/Maps/Maps.xcodeproj/project.pbxproj index 1e8b6908fe..afa1139e4a 100644 --- a/iphone/Maps/Maps.xcodeproj/project.pbxproj +++ b/iphone/Maps/Maps.xcodeproj/project.pbxproj @@ -129,18 +129,12 @@ 34479C7D1C60C6130065D261 /* MWMFrameworkListener.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34479C781C60C6130065D261 /* MWMFrameworkListener.mm */; }; 344D77B41D1BD7C800DBED70 /* MWMLocationManager.mm in Sources */ = {isa = PBXBuildFile; fileRef = 344D77B31D1BD7C800DBED70 /* MWMLocationManager.mm */; }; 344D77B51D1BD7C800DBED70 /* MWMLocationManager.mm in Sources */ = {isa = PBXBuildFile; fileRef = 344D77B31D1BD7C800DBED70 /* MWMLocationManager.mm */; }; - 345050021E0287C400A8DC59 /* LinkCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34504FFD1E0287C400A8DC59 /* LinkCell.mm */; }; - 345050031E0287C400A8DC59 /* LinkCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34504FFD1E0287C400A8DC59 /* LinkCell.mm */; }; - 345050041E0287C400A8DC59 /* LinkCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34504FFD1E0287C400A8DC59 /* LinkCell.mm */; }; - 345050051E0287C400A8DC59 /* SelectableCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34504FFF1E0287C400A8DC59 /* SelectableCell.mm */; }; - 345050061E0287C400A8DC59 /* SelectableCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34504FFF1E0287C400A8DC59 /* SelectableCell.mm */; }; - 345050071E0287C400A8DC59 /* SelectableCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34504FFF1E0287C400A8DC59 /* SelectableCell.mm */; }; - 345050081E0287C400A8DC59 /* SwitchCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = 345050011E0287C400A8DC59 /* SwitchCell.mm */; }; - 345050091E0287C400A8DC59 /* SwitchCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = 345050011E0287C400A8DC59 /* SwitchCell.mm */; }; - 3450500A1E0287C400A8DC59 /* SwitchCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = 345050011E0287C400A8DC59 /* SwitchCell.mm */; }; 345050121E02887000A8DC59 /* MWMSettingsViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 345050111E02887000A8DC59 /* MWMSettingsViewController.mm */; }; 345050131E02887000A8DC59 /* MWMSettingsViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 345050111E02887000A8DC59 /* MWMSettingsViewController.mm */; }; 345050141E02887000A8DC59 /* MWMSettingsViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 345050111E02887000A8DC59 /* MWMSettingsViewController.mm */; }; + 345050231E028CB500A8DC59 /* SettingsTableViewLinkCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 345050221E028CB400A8DC59 /* SettingsTableViewLinkCell.swift */; }; + 345050241E028CB500A8DC59 /* SettingsTableViewLinkCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 345050221E028CB400A8DC59 /* SettingsTableViewLinkCell.swift */; }; + 345050251E028CB500A8DC59 /* SettingsTableViewLinkCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 345050221E028CB400A8DC59 /* SettingsTableViewLinkCell.swift */; }; 3454E05F1DF00DAE00F40F46 /* banners.txt in Resources */ = {isa = PBXBuildFile; fileRef = 3454E05E1DF00DAE00F40F46 /* banners.txt */; }; 3454E0601DF00DC000F40F46 /* banners.txt in Resources */ = {isa = PBXBuildFile; fileRef = 3454E05E1DF00DAE00F40F46 /* banners.txt */; }; 3454E0611DF00DC100F40F46 /* banners.txt in Resources */ = {isa = PBXBuildFile; fileRef = 3454E05E1DF00DAE00F40F46 /* banners.txt */; }; @@ -433,6 +427,12 @@ 34FED54D1D1D45B900183B1B /* MWMLocationPredictor.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34FED54C1D1D45B900183B1B /* MWMLocationPredictor.mm */; }; 34FED5501D21121000183B1B /* CLLocation+Mercator.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34FED54F1D21121000183B1B /* CLLocation+Mercator.mm */; }; 34FED5511D21121000183B1B /* CLLocation+Mercator.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34FED54F1D21121000183B1B /* CLLocation+Mercator.mm */; }; + 34FFADC81E02991A0061AC4D /* SettingsTableViewSelectableCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34FFADC71E02991A0061AC4D /* SettingsTableViewSelectableCell.swift */; }; + 34FFADC91E02991A0061AC4D /* SettingsTableViewSelectableCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34FFADC71E02991A0061AC4D /* SettingsTableViewSelectableCell.swift */; }; + 34FFADCA1E02991A0061AC4D /* SettingsTableViewSelectableCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34FFADC71E02991A0061AC4D /* SettingsTableViewSelectableCell.swift */; }; + 34FFADCC1E029C550061AC4D /* SettingsTableViewSwitchCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34FFADCB1E029C550061AC4D /* SettingsTableViewSwitchCell.swift */; }; + 34FFADCD1E029C550061AC4D /* SettingsTableViewSwitchCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34FFADCB1E029C550061AC4D /* SettingsTableViewSwitchCell.swift */; }; + 34FFADCE1E029C550061AC4D /* SettingsTableViewSwitchCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34FFADCB1E029C550061AC4D /* SettingsTableViewSwitchCell.swift */; }; 4519503A1B7A3E070085DA05 /* patterns.txt in Resources */ = {isa = PBXBuildFile; fileRef = 451950391B7A3E070085DA05 /* patterns.txt */; }; 452FCA3B1B6A3DF7007019AB /* colors.txt in Resources */ = {isa = PBXBuildFile; fileRef = 452FCA3A1B6A3DF7007019AB /* colors.txt */; }; 46F26C7310F61FD600ECCA39 /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 46F26C7210F61FD600ECCA39 /* OpenGLES.framework */; }; @@ -1550,14 +1550,10 @@ 344BDB021B9069810076DB31 /* MWMSearchTabbedViewProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MWMSearchTabbedViewProtocol.h; sourceTree = ""; }; 344D77B21D1BD7C800DBED70 /* MWMLocationManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMLocationManager.h; sourceTree = ""; }; 344D77B31D1BD7C800DBED70 /* MWMLocationManager.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMLocationManager.mm; sourceTree = ""; }; - 34504FFC1E0287C400A8DC59 /* LinkCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LinkCell.h; sourceTree = ""; }; - 34504FFD1E0287C400A8DC59 /* LinkCell.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = LinkCell.mm; sourceTree = ""; }; - 34504FFE1E0287C400A8DC59 /* SelectableCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SelectableCell.h; sourceTree = ""; }; - 34504FFF1E0287C400A8DC59 /* SelectableCell.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = SelectableCell.mm; sourceTree = ""; }; - 345050001E0287C400A8DC59 /* SwitchCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SwitchCell.h; sourceTree = ""; }; - 345050011E0287C400A8DC59 /* SwitchCell.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = SwitchCell.mm; sourceTree = ""; }; 345050101E02887000A8DC59 /* MWMSettingsViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMSettingsViewController.h; sourceTree = ""; }; 345050111E02887000A8DC59 /* MWMSettingsViewController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMSettingsViewController.mm; sourceTree = ""; }; + 345050211E028B8000A8DC59 /* Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Bridging-Header.h"; sourceTree = ""; }; + 345050221E028CB400A8DC59 /* SettingsTableViewLinkCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SettingsTableViewLinkCell.swift; sourceTree = ""; }; 3454E05E1DF00DAE00F40F46 /* banners.txt */ = {isa = PBXFileReference; lastKnownFileType = text; name = banners.txt; path = ../../data/banners.txt; sourceTree = ""; }; 3456E0201DC0C4030055DF50 /* HockeySDK.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = HockeySDK.framework; path = Frameworks/HockeySDK.embeddedframework/HockeySDK.framework; sourceTree = ""; }; 3456E0251DC0C4500055DF50 /* HockeySDKResources.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = HockeySDKResources.bundle; path = Frameworks/HockeySDK.embeddedframework/Resources/HockeySDKResources.bundle; sourceTree = ""; }; @@ -1727,7 +1723,7 @@ 34ABA62E1C2D58F300FE1BEC /* MWMInputEmailValidator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMInputEmailValidator.h; sourceTree = ""; }; 34ABA62F1C2D58F300FE1BEC /* MWMInputEmailValidator.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMInputEmailValidator.mm; sourceTree = ""; }; 34B104201D6EE45700C8B577 /* MWMUnitsController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMUnitsController.h; sourceTree = ""; }; - 34B104211D6EE45700C8B577 /* MWMUnitsController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMUnitsController.mm; sourceTree = ""; }; + 34B104211D6EE45700C8B577 /* MWMUnitsController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; lineEnding = 0; path = MWMUnitsController.mm; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; 34B104241D6F040E00C8B577 /* MWMAboutController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMAboutController.h; sourceTree = ""; }; 34B104251D6F040E00C8B577 /* MWMAboutController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMAboutController.mm; sourceTree = ""; }; 34B646BB1CEB6FC000E0C7A5 /* MWMEditorAdditionalNameTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMEditorAdditionalNameTableViewCell.h; sourceTree = ""; }; @@ -1852,6 +1848,8 @@ 34FED54E1D21121000183B1B /* CLLocation+Mercator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "CLLocation+Mercator.h"; sourceTree = ""; }; 34FED54F1D21121000183B1B /* CLLocation+Mercator.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = "CLLocation+Mercator.mm"; sourceTree = ""; }; 34FED5521D2123CE00183B1B /* MWMLocationHelpers.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MWMLocationHelpers.h; sourceTree = ""; }; + 34FFADC71E02991A0061AC4D /* SettingsTableViewSelectableCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SettingsTableViewSelectableCell.swift; sourceTree = ""; }; + 34FFADCB1E029C550061AC4D /* SettingsTableViewSwitchCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SettingsTableViewSwitchCell.swift; sourceTree = ""; }; 3D443C9C19E421EE0025C2FC /* sv */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = sv; path = sv.lproj/Localizable.strings; sourceTree = ""; }; 3DDB4BC31DAB98F000F4D021 /* libpartners_api.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libpartners_api.a; path = "../../../omim-xcode-build/Debug-iphonesimulator/libpartners_api.a"; sourceTree = ""; }; 451950391B7A3E070085DA05 /* patterns.txt */ = {isa = PBXFileReference; lastKnownFileType = text; name = patterns.txt; path = ../../data/patterns.txt; sourceTree = ""; }; @@ -2073,7 +2071,7 @@ F65B31F41DD2106700105FDE /* MWMiPadPlacePageLayoutImpl.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMiPadPlacePageLayoutImpl.mm; sourceTree = ""; }; F6671C6A1BA2EFD500548008 /* libFlurry_7.1.0.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libFlurry_7.1.0.a; path = Frameworks/libFlurry_7.1.0.a; sourceTree = ""; }; F668F6541BCD4507002D6FFC /* MWMTTSSettingsViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMTTSSettingsViewController.h; sourceTree = ""; }; - F668F6551BCD4507002D6FFC /* MWMTTSSettingsViewController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMTTSSettingsViewController.mm; sourceTree = ""; }; + F668F6551BCD4507002D6FFC /* MWMTTSSettingsViewController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; lineEnding = 0; path = MWMTTSSettingsViewController.mm; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; F67223751D74800600A3BDA2 /* MWMPlacePagePreviewCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMPlacePagePreviewCell.xib; sourceTree = ""; }; F67517A01D76FC46008FE34F /* MWMPlacePageLayout.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMPlacePageLayout.h; sourceTree = ""; }; F67517A11D76FC46008FE34F /* MWMPlacePageLayout.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMPlacePageLayout.mm; sourceTree = ""; }; @@ -2102,7 +2100,7 @@ F6AD57B91C87039F00CED368 /* MWMEditorCategoryCell.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMEditorCategoryCell.mm; sourceTree = ""; }; F6AD57BC1C870A3C00CED368 /* MWMEditorCategoryCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMEditorCategoryCell.xib; sourceTree = ""; }; F6B2E61D1C3D5F31005562DF /* MWMNightModeController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMNightModeController.h; sourceTree = ""; }; - F6B2E61E1C3D5F31005562DF /* MWMNightModeController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMNightModeController.mm; sourceTree = ""; }; + F6B2E61E1C3D5F31005562DF /* MWMNightModeController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; lineEnding = 0; path = MWMNightModeController.mm; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; F6B870141DDCA03600BE8D94 /* MWMPlacePageEntity.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMPlacePageEntity.h; sourceTree = ""; }; F6B870151DDCA03600BE8D94 /* MWMPlacePageEntity.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMPlacePageEntity.mm; sourceTree = ""; }; F6B8701A1DDCB2F400BE8D94 /* MWMPPPreviewBannerCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMPPPreviewBannerCell.h; sourceTree = ""; }; @@ -2136,7 +2134,7 @@ F6BD33861B62412E00F2CE18 /* MWMNavigationDashboardEntity.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMNavigationDashboardEntity.mm; sourceTree = ""; }; F6BED3761CE3726A008D31E7 /* MWMBookmarkTitleCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMBookmarkTitleCell.xib; sourceTree = ""; }; F6C641AE1C15BBE6008FCAF3 /* MWMRecentTrackSettingsController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMRecentTrackSettingsController.h; sourceTree = ""; }; - F6C641AF1C15BBE6008FCAF3 /* MWMRecentTrackSettingsController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMRecentTrackSettingsController.mm; sourceTree = ""; }; + F6C641AF1C15BBE6008FCAF3 /* MWMRecentTrackSettingsController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; lineEnding = 0; path = MWMRecentTrackSettingsController.mm; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; F6CB215B1AEE704D00FB8963 /* PlacePageInfoCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = PlacePageInfoCell.xib; sourceTree = ""; }; F6CB215E1AEE7A5B00FB8963 /* MWMPlacePageInfoCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMPlacePageInfoCell.h; sourceTree = ""; }; F6CB215F1AEE7A5B00FB8963 /* MWMPlacePageInfoCell.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; lineEnding = 0; path = MWMPlacePageInfoCell.mm; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; @@ -2472,11 +2470,11 @@ 29B97315FDCFA39411CA2CEA /* Other Sources */ = { isa = PBXGroup; children = ( - 28A0AB4B0D9B1048005BE974 /* Maps_Prefix.pch */, - 29B97316FDCFA39411CA2CEA /* main.mm */, - 34EC27091CB2A7120084FA36 /* fabric_logging.hpp */, 345050211E028B8000A8DC59 /* Bridging-Header.h */, 34EC27081CB2A7120084FA36 /* fabric_logging_ios.mm */, + 34EC27091CB2A7120084FA36 /* fabric_logging.hpp */, + 29B97316FDCFA39411CA2CEA /* main.mm */, + 28A0AB4B0D9B1048005BE974 /* Maps_Prefix.pch */, ); name = "Other Sources"; sourceTree = ""; @@ -2735,12 +2733,9 @@ 34504FFB1E0287C400A8DC59 /* Cells */ = { isa = PBXGroup; children = ( - 34504FFC1E0287C400A8DC59 /* LinkCell.h */, - 34504FFD1E0287C400A8DC59 /* LinkCell.mm */, - 34504FFE1E0287C400A8DC59 /* SelectableCell.h */, - 34504FFF1E0287C400A8DC59 /* SelectableCell.mm */, - 345050001E0287C400A8DC59 /* SwitchCell.h */, - 345050011E0287C400A8DC59 /* SwitchCell.mm */, + 345050221E028CB400A8DC59 /* SettingsTableViewLinkCell.swift */, + 34FFADC71E02991A0061AC4D /* SettingsTableViewSelectableCell.swift */, + 34FFADCB1E029C550061AC4D /* SettingsTableViewSwitchCell.swift */, ); path = Cells; sourceTree = ""; @@ -4789,7 +4784,7 @@ 349A13821DEC138C00C7DB60 /* MWMMobileInternetAlert.mm in Sources */, 347FD8851C60B2CE002FB65E /* MWMOpeningHoursTimeSelectorTableViewCell.mm in Sources */, 34EB84581C073DF70004689F /* MWMOpeningHoursEditorViewController.mm in Sources */, - 345050021E0287C400A8DC59 /* LinkCell.mm in Sources */, + 34FFADCC1E029C550061AC4D /* SettingsTableViewSwitchCell.swift in Sources */, F617B4E31D8FDDD5007A1A4E /* MWMBookmarkCell.mm in Sources */, 349A357A1B53D4C9009677EE /* MWMCircularProgress.mm in Sources */, 34B82ADA1B847FFC00180497 /* MWMSearchCell.mm in Sources */, @@ -4819,6 +4814,7 @@ F68FCB851DA7BBA6007CC7D7 /* MWMTaxiPreviewDataSource.mm in Sources */, 34257D151DC9FB0D00DC5BB9 /* MWMSearchFilterViewController.mm in Sources */, 34BC1E561C2ADBD3009BBF51 /* MWMOpeningHoursCommon.mm in Sources */, + 345050231E028CB500A8DC59 /* SettingsTableViewLinkCell.swift in Sources */, F653CE161C71F60200A453F1 /* MWMAddPlaceNavigationBar.mm in Sources */, A32B6D4D1A14980500E54A65 /* iosOGLContextFactory.mm in Sources */, 349C3AEC1D33A933002AC7A9 /* MWMNavigationInfoView.mm in Sources */, @@ -4886,7 +4882,6 @@ 348868EB1D8721650069BBA3 /* MWMSearchNoResults.mm in Sources */, 346B42AB1DD5E3D20094EBEE /* MWMLocationNotFoundAlert.mm in Sources */, 34BBB7231DD0853B0002E025 /* MWMSearchManager+Layout.mm in Sources */, - 345050051E0287C400A8DC59 /* SelectableCell.mm in Sources */, 341F99D91C6B1165001C67B8 /* MWMMapDownloaderPlaceTableViewCell.mm in Sources */, 34A759D01DC795140078C3AE /* MWMWhatsNewProfileBookingController.mm in Sources */, 345FD7E71CEC7D8400F58045 /* MWMEditorAdditionalNamesHeader.mm in Sources */, @@ -4914,9 +4909,9 @@ ED48BBBA17C2B1E2003E7E92 /* CircleView.mm in Sources */, 340E10631B949D1900D975D5 /* MWMSearchBookmarksManager.mm in Sources */, F68FCB8A1DA7BD20007CC7D7 /* MWMTaxiPreviewCell.mm in Sources */, - 345050081E0287C400A8DC59 /* SwitchCell.mm in Sources */, F6E9BF291CE364150050E534 /* MWMEditBookmarkController.mm in Sources */, F65B31F11DD20E9600105FDE /* MWMiPhonePlacePageLayoutImpl.mm in Sources */, + 34FFADC81E02991A0061AC4D /* SettingsTableViewSelectableCell.swift in Sources */, 34A759CA1DC795140078C3AE /* MWMWelcomeController.mm in Sources */, 34D15BA81BD8F93C00C8BCBE /* AddSetTableViewCell.mm in Sources */, F6A218491CA3F26800BE2CC6 /* MWMEditorViralActivityItem.mm in Sources */, @@ -5042,7 +5037,7 @@ 349A13831DEC138C00C7DB60 /* MWMMobileInternetAlert.mm in Sources */, 347FD8861C60B2CE002FB65E /* MWMOpeningHoursTimeSelectorTableViewCell.mm in Sources */, 6741A9EB1BF340DE002C974C /* ContextViews.mm in Sources */, - 345050031E0287C400A8DC59 /* LinkCell.mm in Sources */, + 34FFADCD1E029C550061AC4D /* SettingsTableViewSwitchCell.swift in Sources */, 6741A9EC1BF340DE002C974C /* MWMCircularProgress.mm in Sources */, 342CC5F21C2D7730005F3FE5 /* MWMAuthorizationLoginViewController.mm in Sources */, 6741A9EE1BF340DE002C974C /* MWMSearchCell.mm in Sources */, @@ -5072,6 +5067,7 @@ F6381BF61CD12045004CA943 /* LocaleTranslator.mm in Sources */, 34257D161DC9FB0D00DC5BB9 /* MWMSearchFilterViewController.mm in Sources */, F6D4A73B1CC1267E00BD4E5B /* MWMNoteCell.mm in Sources */, + 345050241E028CB500A8DC59 /* SettingsTableViewLinkCell.swift in Sources */, F68FCB861DA7BBA6007CC7D7 /* MWMTaxiPreviewDataSource.mm in Sources */, 347FD8681C60B2CE002FB65E /* MWMOpeningHoursAddClosedTableViewCell.mm in Sources */, 6741A9FF1BF340DE002C974C /* AddSetVC.mm in Sources */, @@ -5139,7 +5135,6 @@ 341F99D61C6B1165001C67B8 /* MWMMapDownloaderLargeCountryTableViewCell.mm in Sources */, 346B42AC1DD5E3D20094EBEE /* MWMLocationNotFoundAlert.mm in Sources */, 34BBB7241DD0853B0002E025 /* MWMSearchManager+Layout.mm in Sources */, - 345050061E0287C400A8DC59 /* SelectableCell.mm in Sources */, 348C26061D701B9F00813924 /* MWMHelpController.mm in Sources */, 348868EC1D8721650069BBA3 /* MWMSearchNoResults.mm in Sources */, 345FD7E81CEC7D8400F58045 /* MWMEditorAdditionalNamesHeader.mm in Sources */, @@ -5167,9 +5162,9 @@ 6741AA291BF340DE002C974C /* ColorPickerView.mm in Sources */, 6741AA2B1BF340DE002C974C /* CircleView.mm in Sources */, 56D545631C74A41900E3719C /* Framework.cpp in Sources */, - 345050091E0287C400A8DC59 /* SwitchCell.mm in Sources */, F68FCB8B1DA7BD20007CC7D7 /* MWMTaxiPreviewCell.mm in Sources */, F65B31F21DD20E9600105FDE /* MWMiPhonePlacePageLayoutImpl.mm in Sources */, + 34FFADC91E02991A0061AC4D /* SettingsTableViewSelectableCell.swift in Sources */, F6E9BF2A1CE364150050E534 /* MWMEditBookmarkController.mm in Sources */, 6741AA2C1BF340DE002C974C /* MWMSearchBookmarksManager.mm in Sources */, F6A2184A1CA3F26800BE2CC6 /* MWMEditorViralActivityItem.mm in Sources */, @@ -5238,6 +5233,7 @@ 849CF6B41DE842290024A8A5 /* MWMPlacePageActionBar.mm in Sources */, 849CF6B51DE842290024A8A5 /* MWMMigrationView.mm in Sources */, 849CF6B61DE842290024A8A5 /* MWMOpeningHoursDeleteScheduleTableViewCell.mm in Sources */, + 34FFADCA1E02991A0061AC4D /* SettingsTableViewSelectableCell.swift in Sources */, 849CF6B71DE842290024A8A5 /* MWMCuisineEditorViewController.mm in Sources */, 849CF6B81DE842290024A8A5 /* UIButton+Orientation.mm in Sources */, 849CF6B91DE842290024A8A5 /* MWMSearchCommonCell.mm in Sources */, @@ -5268,6 +5264,7 @@ 849CF6D41DE842290024A8A5 /* MWMRouterSavedState.mm in Sources */, 849CF6D51DE842290024A8A5 /* MWMTableViewController.mm in Sources */, 849CF6D61DE842290024A8A5 /* MWMTTSLanguageViewController.mm in Sources */, + 345050251E028CB500A8DC59 /* SettingsTableViewLinkCell.swift in Sources */, 849CF6D71DE842290024A8A5 /* UISwitch+RuntimeAttributes.m in Sources */, 849CF6D81DE842290024A8A5 /* MWMSegue.mm in Sources */, 849CF6D91DE842290024A8A5 /* Framework.cpp in Sources */, @@ -5277,7 +5274,6 @@ 849CF6DD1DE842290024A8A5 /* MWMWhatsNewNavigationController.mm in Sources */, 849CF6DE1DE842290024A8A5 /* MWMRoutePointLayout.mm in Sources */, 849CF6DF1DE842290024A8A5 /* MWMAuthorizationCommon.mm in Sources */, - 3450500A1E0287C400A8DC59 /* SwitchCell.mm in Sources */, 849CF6E01DE842290024A8A5 /* MWMSearchHistoryClearCell.mm in Sources */, 849CF6E11DE842290024A8A5 /* MWMDownloaderDialogHeader.mm in Sources */, 849CF6E21DE842290024A8A5 /* MWMSearchTableView.mm in Sources */, @@ -5300,6 +5296,7 @@ 849CF6F31DE842290024A8A5 /* MWMButton.mm in Sources */, 849CF6F51DE842290024A8A5 /* MWMPlacePageLayout.mm in Sources */, 849CF6F61DE842290024A8A5 /* MWMNavigationDashboardEntity.mm in Sources */, + 34FFADCE1E029C550061AC4D /* SettingsTableViewSwitchCell.swift in Sources */, 849CF6F71DE842290024A8A5 /* MWMPlacePageInfoCell.mm in Sources */, 849CF6F81DE842290024A8A5 /* MWMSearchHistoryManager.mm in Sources */, 849CF6F91DE842290024A8A5 /* CALayer+RuntimeAttributes.mm in Sources */, @@ -5359,7 +5356,6 @@ 849CF72E1DE842290024A8A5 /* MWMSearchHistoryMyPositionCell.mm in Sources */, 341966881E000CDD00F96327 /* MWMWhatsNewTrafficController.mm in Sources */, 849CF72F1DE842290024A8A5 /* MWMInputValidator.mm in Sources */, - 345050041E0287C400A8DC59 /* LinkCell.mm in Sources */, 849CF7301DE842290024A8A5 /* MWMActionBarButton.mm in Sources */, 849CF7311DE842290024A8A5 /* MWMKeyboard.mm in Sources */, 849CF7331DE842290024A8A5 /* MWMInputValidatorFactory.mm in Sources */, @@ -5402,7 +5398,6 @@ 849CF7561DE842290024A8A5 /* MWMRoutingDisclaimerAlert.mm in Sources */, 849CF7571DE842290024A8A5 /* MWMMigrationViewController.mm in Sources */, 849CF7581DE842290024A8A5 /* MWMDownloadTransitMapAlert.mm in Sources */, - 345050071E0287C400A8DC59 /* SelectableCell.mm in Sources */, 849CF7591DE842290024A8A5 /* MWMMapDownloaderDefaultDataSource.mm in Sources */, 849CF75B1DE842290024A8A5 /* MWMSearchBookmarksCell.mm in Sources */, 849CF75C1DE842290024A8A5 /* MWMNavigationView.mm in Sources */, diff --git a/iphone/Maps/Settings.storyboard b/iphone/Maps/Settings.storyboard index 674d23df9a..ddf5124ab1 100644 --- a/iphone/Maps/Settings.storyboard +++ b/iphone/Maps/Settings.storyboard @@ -1,11 +1,11 @@ - + - + @@ -21,11 +21,11 @@ - + - + @@ -60,19 +51,16 @@ - - - - - + + - + @@ -84,21 +72,12 @@ - - - - - @@ -111,15 +90,12 @@ - - - - - + + - + @@ -132,19 +108,11 @@ - - - - - - - - @@ -156,15 +124,12 @@ - - - - + - + @@ -177,19 +142,11 @@ - - - - - - - - @@ -201,15 +158,12 @@ - - - - + - + @@ -222,19 +176,11 @@ - - - - - - - - @@ -246,15 +192,12 @@ - - - - + - + @@ -266,21 +209,12 @@ - - - - - @@ -293,15 +227,12 @@ - - - - - + + - + @@ -313,21 +244,12 @@ - - - - - @@ -340,15 +262,12 @@ - - - - - + + - + @@ -361,19 +280,11 @@ - - - - - - - - @@ -385,15 +296,12 @@ - - - - + - + @@ -406,19 +314,11 @@ - - - - - - - - @@ -430,15 +330,12 @@ - - - - + - + @@ -451,19 +348,11 @@ - - - - - - - - @@ -475,20 +364,17 @@ - - - - + - - + + @@ -499,21 +385,12 @@ - - - - - @@ -526,16 +403,13 @@ - - - - - + + - - + + @@ -547,19 +421,11 @@ - - - - - - - - @@ -571,16 +437,13 @@ - - - - + - - + + @@ -592,19 +455,11 @@ - - - - - - - - @@ -616,16 +471,13 @@ - - - - + - - + + @@ -636,21 +488,12 @@ - - - - - @@ -663,60 +506,59 @@ - - - - - + + - - + + - + + - + + - - - - + + - - + + + + - + + + - - - - + + @@ -793,11 +642,11 @@ - + - + - - - - + - + - + - - - - + - + - + - - - - + @@ -921,11 +761,11 @@ - + - + - - - - + - + - + - - - - + - + - + - - - - + - + - + - - - - + - + - + - - - - + - + - + - - - - + @@ -1149,7 +971,7 @@ - + @@ -1174,14 +996,11 @@ - - - - + - + @@ -1189,28 +1008,31 @@ + - - - + + + + + + - - - - + + @@ -1238,7 +1060,7 @@ - + @@ -1263,11 +1085,8 @@ - - - - + @@ -1295,11 +1114,11 @@ - + - + - - - - + - + - - - @@ -1438,11 +1251,11 @@ - + - + - - - - + - + - - - - + - + - - - - + - + - - - - + - + - - - - + - + - + - +