forked from organicmaps/organicmaps
[cleanup] [ios] Fixed dot syntax usage.
This commit is contained in:
parent
163acfeca9
commit
cc80acaaac
102 changed files with 429 additions and 412 deletions
|
@ -36,7 +36,8 @@
|
|||
{
|
||||
if (text.length == 0)
|
||||
return;
|
||||
[self.delegate addSetVC:self didAddSetWithIndex:static_cast<int>(GetFramework().AddCategory([text UTF8String]))];
|
||||
[self.delegate addSetVC:self
|
||||
didAddSetWithIndex:static_cast<int>(GetFramework().AddCategory(text.UTF8String))];
|
||||
[self.navigationController popViewControllerAnimated:YES];
|
||||
}
|
||||
|
||||
|
|
|
@ -21,10 +21,10 @@ extern NSString * const kBookmarkCategoryDeletedNotification =
|
|||
self.title = L(@"bookmarks");
|
||||
|
||||
self.tableView.allowsSelectionDuringEditing = YES;
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self
|
||||
selector:@selector(newCategoryAdded)
|
||||
name:@"KML file added"
|
||||
object:nil];
|
||||
[NSNotificationCenter.defaultCenter addObserver:self
|
||||
selector:@selector(newCategoryAdded)
|
||||
name:@"KML file added"
|
||||
object:nil];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
@ -40,11 +40,11 @@ extern NSString * const kBookmarkCategoryDeletedNotification =
|
|||
{
|
||||
m_hint = [[UIView alloc] initWithFrame:rect];
|
||||
m_hint.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
|
||||
m_hint.backgroundColor = [UIColor clearColor];
|
||||
m_hint.backgroundColor = UIColor.clearColor;
|
||||
|
||||
UILabel * label = [[UILabel alloc] initWithFrame:rect];
|
||||
label.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
|
||||
label.backgroundColor = [UIColor clearColor];
|
||||
label.backgroundColor = UIColor.clearColor;
|
||||
bool const showDetailedHint = !GetFramework().GetBmCategoriesCount();
|
||||
label.text = showDetailedHint ? L(@"bookmarks_usage_hint")
|
||||
: L(@"bookmarks_usage_hint_import_only");
|
||||
|
@ -174,7 +174,7 @@ extern NSString * const kBookmarkCategoryDeletedNotification =
|
|||
BookmarkCategory * cat = GetFramework().GetBmCategory([self.tableView indexPathForCell:cell].row);
|
||||
if (cat)
|
||||
{
|
||||
cat->SetName([txt UTF8String]);
|
||||
cat->SetName(txt.UTF8String);
|
||||
cat->SaveToKMLFile();
|
||||
}
|
||||
}
|
||||
|
@ -235,7 +235,8 @@ extern NSString * const kBookmarkCategoryDeletedNotification =
|
|||
if (editingStyle == UITableViewCellEditingStyleDelete)
|
||||
{
|
||||
[Statistics logEvent:kStatEventName(kStatPlacePage, kStatRemove)];
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:kBookmarkCategoryDeletedNotification object:@(indexPath.row)];
|
||||
[NSNotificationCenter.defaultCenter postNotificationName:kBookmarkCategoryDeletedNotification
|
||||
object:@(indexPath.row)];
|
||||
Framework & f = GetFramework();
|
||||
f.DeleteBmCategory(indexPath.row);
|
||||
[self.tableView deleteRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationFade];
|
||||
|
@ -308,7 +309,7 @@ extern NSString * const kBookmarkCategoryDeletedNotification =
|
|||
|
||||
-(void)dealloc
|
||||
{
|
||||
[[NSNotificationCenter defaultCenter] removeObserver:self];
|
||||
[NSNotificationCenter.defaultCenter removeObserver:self];
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
@ -247,12 +247,12 @@ extern NSString * const kBookmarkDeletedNotification = @"BookmarkDeletedNotifica
|
|||
NSMutableString * kmzFile = [NSMutableString stringWithString:filePath];
|
||||
[kmzFile replaceCharactersInRange:NSMakeRange([filePath length] - 1, 1) withString:@"z"];
|
||||
|
||||
if (CreateZipFromPathDeflatedAndDefaultCompression([filePath UTF8String], [kmzFile UTF8String]))
|
||||
if (CreateZipFromPathDeflatedAndDefaultCompression(filePath.UTF8String, kmzFile.UTF8String))
|
||||
[self sendBookmarksWithExtension:@".kmz" andType:@"application/vnd.google-earth.kmz" andFile:kmzFile andCategory:catName];
|
||||
else
|
||||
[self sendBookmarksWithExtension:@".kml" andType:@"application/vnd.google-earth.kml+xml" andFile:filePath andCategory:catName];
|
||||
|
||||
(void)my::DeleteFileX([kmzFile UTF8String]);
|
||||
(void)my::DeleteFileX(kmzFile.UTF8String);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -288,7 +288,8 @@ extern NSString * const kBookmarkDeletedNotification = @"BookmarkDeletedNotifica
|
|||
{
|
||||
auto bac = BookmarkAndCategory(static_cast<size_t>(indexPath.row), m_categoryIndex);
|
||||
NSValue * value = [NSValue valueWithBytes:&bac objCType:@encode(BookmarkAndCategory)];
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:kBookmarkDeletedNotification object:value];
|
||||
[NSNotificationCenter.defaultCenter postNotificationName:kBookmarkDeletedNotification
|
||||
object:value];
|
||||
cat->DeleteUserMark(indexPath.row);
|
||||
[NSNotificationCenter.defaultCenter postNotificationName:kBookmarksChangedNotification
|
||||
object:nil
|
||||
|
@ -361,7 +362,7 @@ extern NSString * const kBookmarkDeletedNotification = @"BookmarkDeletedNotifica
|
|||
{
|
||||
// Update edited category name
|
||||
BookmarkCategory * cat = GetFramework().GetBmCategory(m_categoryIndex);
|
||||
char const * newCharName = [newName UTF8String];
|
||||
char const * newCharName = newName.UTF8String;
|
||||
if (cat->GetName() != newCharName)
|
||||
{
|
||||
cat->SetName(newCharName);
|
||||
|
|
|
@ -74,7 +74,7 @@
|
|||
|
||||
- (void)setBackgroundColor:(UIColor *)color forState:(UIControlState)state
|
||||
{
|
||||
[self setBackgroundColor:[UIColor clearColor]];
|
||||
[self setBackgroundColor:UIColor.clearColor];
|
||||
[self setBackgroundImage:[UIImage imageWithColor:color] forState:state];
|
||||
}
|
||||
|
||||
|
|
|
@ -142,7 +142,7 @@ UIColor * color(SEL cmd)
|
|||
|
||||
- (UIColor *)opposite
|
||||
{
|
||||
NSString * key = [[(isNightMode ? day : night) allKeysForObject:self] firstObject];
|
||||
NSString * key = [(isNightMode ? day : night) allKeysForObject:self].firstObject;
|
||||
return key == nil ? nil : (isNightMode ? night : day)[key];
|
||||
}
|
||||
|
||||
|
|
|
@ -279,7 +279,7 @@
|
|||
|
||||
@implementation UINavigationController (Autorotate)
|
||||
|
||||
- (BOOL)shouldAutorotate { return [[self.viewControllers lastObject] shouldAutorotate]; }
|
||||
- (BOOL)shouldAutorotate { return [self.viewControllers.lastObject shouldAutorotate]; }
|
||||
@end
|
||||
|
||||
@implementation UIViewController (Autorotate)
|
||||
|
@ -331,7 +331,7 @@
|
|||
|
||||
if (isIOS8)
|
||||
{
|
||||
auto app = [UIApplication sharedApplication];
|
||||
auto app = UIApplication.sharedApplication;
|
||||
if ([app canOpenURL:url])
|
||||
[app openURL:url];
|
||||
return;
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
self = [super initWithFrame:frame];
|
||||
if (self)
|
||||
{
|
||||
self.circleColor = color;
|
||||
_circleColor = color;
|
||||
self.opaque = NO;
|
||||
}
|
||||
return self;
|
||||
|
@ -25,14 +25,14 @@
|
|||
{
|
||||
CGContextRef ctx = UIGraphicsGetCurrentContext();
|
||||
CGContextAddEllipseInRect(ctx, rect);
|
||||
CGContextSetFillColor(ctx, CGColorGetComponents([self.circleColor CGColor]));
|
||||
CGContextSetFillColor(ctx, CGColorGetComponents(self.circleColor.CGColor));
|
||||
CGContextFillPath(ctx);
|
||||
}
|
||||
|
||||
+ (UIView *)createViewWithCircleDiameter:(CGFloat)diameter andColor:(UIColor *)color
|
||||
{
|
||||
UIView * circleView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, diameter, diameter)];
|
||||
circleView.backgroundColor = [UIColor clearColor];
|
||||
circleView.backgroundColor = UIColor.clearColor;
|
||||
CircleView * circle = [[self alloc] initWithFrame:CGRectMake(0.5, 0.5, diameter - 1, diameter - 1) andColor:color];
|
||||
[circleView addSubview:circle];
|
||||
return circleView;
|
||||
|
|
|
@ -43,7 +43,7 @@ static Tcolor const g_color [] =
|
|||
UIViewAutoresizingFlexibleTopMargin|UIViewAutoresizingFlexibleBottomMargin;
|
||||
|
||||
UILabel * header = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, customWidth, HEADERHEIGHT)];
|
||||
header.backgroundColor = [UIColor clearColor];
|
||||
header.backgroundColor = UIColor.clearColor;
|
||||
header.text = L(@"bookmark_color");
|
||||
header.font = [UIFont fontWithName:@"Helvetica" size:20];
|
||||
header.textAlignment = NSTextAlignmentCenter;
|
||||
|
|
|
@ -19,7 +19,8 @@
|
|||
doneBlock:(MWMVoidBlock)done
|
||||
cancelBlock:(MWMVoidBlock)cancel
|
||||
{
|
||||
MWMAddPlaceNavigationBar * navBar = [[[NSBundle mainBundle] loadNibNamed:self.className owner:nil options:nil] firstObject];
|
||||
MWMAddPlaceNavigationBar * navBar =
|
||||
[NSBundle.mainBundle loadNibNamed:self.className owner:nil options:nil].firstObject;
|
||||
navBar.width = superview.width;
|
||||
navBar.doneBlock = done;
|
||||
navBar.cancelBlock = cancel;
|
||||
|
|
|
@ -50,8 +50,8 @@ CGFloat const kTopOffset = 25.;
|
|||
self = [super init];
|
||||
if (self)
|
||||
{
|
||||
[[NSBundle mainBundle] loadNibNamed:[[self class] className] owner:self options:nil];
|
||||
self.superview = view;
|
||||
[NSBundle.mainBundle loadNibNamed:[[self class] className] owner:self options:nil];
|
||||
_superview = view;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
|
|
@ -7,14 +7,14 @@
|
|||
- (void)viewDidLoad
|
||||
{
|
||||
[super viewDidLoad];
|
||||
self.navigationBar.tintColor = [UIColor whiteColor];
|
||||
self.navigationBar.tintColor = UIColor.whiteColor;
|
||||
}
|
||||
|
||||
- (UIStatusBarStyle)preferredStatusBarStyle
|
||||
{
|
||||
if ([MWMToast affectsStatusBar])
|
||||
return [MWMToast preferredStatusBarStyle];
|
||||
setStatusBarBackgroundColor([UIColor clearColor]);
|
||||
setStatusBarBackgroundColor(UIColor.clearColor);
|
||||
return [UIColor isNightMode] ? UIStatusBarStyleLightContent : UIStatusBarStyleDefault;
|
||||
}
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
{
|
||||
if ([MWMToast affectsStatusBar])
|
||||
return [MWMToast preferredStatusBarStyle];
|
||||
setStatusBarBackgroundColor([UIColor clearColor]);
|
||||
setStatusBarBackgroundColor(UIColor.clearColor);
|
||||
return UIStatusBarStyleLightContent;
|
||||
}
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ static NSString * const kAlertControllerNibIdentifier = @"MWMAlertViewController
|
|||
{
|
||||
self = [super initWithNibName:kAlertControllerNibIdentifier bundle:nil];
|
||||
if (self)
|
||||
self.ownerViewController = viewController;
|
||||
_ownerViewController = viewController;
|
||||
return self;
|
||||
}
|
||||
|
||||
|
@ -49,7 +49,7 @@ static NSString * const kAlertControllerNibIdentifier = @"MWMAlertViewController
|
|||
|
||||
#pragma mark - Actions
|
||||
|
||||
- (void)presentRateAlert { [self displayAlert:MWMAlert.rateAlert]; }
|
||||
- (void)presentRateAlert { [self displayAlert:[MWMAlert rateAlert]]; }
|
||||
- (void)presentLocationAlert
|
||||
{
|
||||
if (![MapViewController controller].welcomePageController)
|
||||
|
@ -61,10 +61,10 @@ static NSString * const kAlertControllerNibIdentifier = @"MWMAlertViewController
|
|||
[self displayAlert:[MWMAlert point2PointAlertWithOkBlock:okBlock needToRebuild:needToRebuild]];
|
||||
}
|
||||
|
||||
- (void)presentFacebookAlert { [self displayAlert:MWMAlert.facebookAlert]; }
|
||||
- (void)presentFacebookAlert { [self displayAlert:[MWMAlert facebookAlert]]; }
|
||||
- (void)presentLocationServiceNotSupportedAlert
|
||||
{
|
||||
[self displayAlert:MWMAlert.locationServiceNotSupportedAlert];
|
||||
[self displayAlert:[MWMAlert locationServiceNotSupportedAlert]];
|
||||
}
|
||||
|
||||
- (void)presentLocationNotFoundAlertWithOkBlock:(nonnull MWMVoidBlock)okBlock
|
||||
|
@ -120,7 +120,7 @@ static NSString * const kAlertControllerNibIdentifier = @"MWMAlertViewController
|
|||
[self displayAlert:[MWMAlert routingDisclaimerAlertWithOkBlock:block]];
|
||||
}
|
||||
|
||||
- (void)presentDisabledLocationAlert { [self displayAlert:MWMAlert.disabledLocationAlert]; }
|
||||
- (void)presentDisabledLocationAlert { [self displayAlert:[MWMAlert disabledLocationAlert]]; }
|
||||
- (void)presentAlert:(routing::IRouter::ResultCode)type
|
||||
{
|
||||
[self displayAlert:[MWMAlert alert:type]];
|
||||
|
@ -244,7 +244,7 @@ static NSString * const kAlertControllerNibIdentifier = @"MWMAlertViewController
|
|||
alert.alpha = 1.;
|
||||
alert.transform = CGAffineTransformIdentity;
|
||||
}];
|
||||
[MapsAppDelegate.theApp.window endEditing:YES];
|
||||
[[MapsAppDelegate theApp].window endEditing:YES];
|
||||
}
|
||||
|
||||
- (void)closeAlert:(nullable MWMVoidBlock)completion
|
||||
|
|
|
@ -157,13 +157,13 @@
|
|||
- (void)close:(MWMVoidBlock)completion { [self.alertController closeAlert:completion]; }
|
||||
- (void)setNeedsCloseAlertAfterEnterBackground
|
||||
{
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self
|
||||
selector:@selector(applicationDidEnterBackground)
|
||||
name:UIApplicationDidEnterBackgroundNotification
|
||||
object:nil];
|
||||
[NSNotificationCenter.defaultCenter addObserver:self
|
||||
selector:@selector(applicationDidEnterBackground)
|
||||
name:UIApplicationDidEnterBackgroundNotification
|
||||
object:nil];
|
||||
}
|
||||
|
||||
- (void)dealloc { [[NSNotificationCenter defaultCenter] removeObserver:self]; }
|
||||
- (void)dealloc { [NSNotificationCenter.defaultCenter removeObserver:self]; }
|
||||
- (void)applicationDidEnterBackground
|
||||
{
|
||||
// Should close alert when application entered background.
|
||||
|
@ -192,7 +192,7 @@
|
|||
view.frame = ownerViewController.view.bounds;
|
||||
[ownerViewController.view addSubview:view];
|
||||
[self addControllerViewToWindow];
|
||||
auto const orientation = [[UIApplication sharedApplication] statusBarOrientation];
|
||||
auto const orientation = UIApplication.sharedApplication.statusBarOrientation;
|
||||
[self rotate:orientation duration:0.0];
|
||||
[view addSubview:self];
|
||||
self.frame = view.bounds;
|
||||
|
|
|
@ -393,8 +393,8 @@ static NSString * const kDefaultAlertNibName = @"MWMDefaultAlert";
|
|||
statisticsEvent:(nonnull NSString *)statisticsEvent
|
||||
{
|
||||
[Statistics logEvent:statisticsEvent withParameters:@{kStatAction : kStatOpen}];
|
||||
MWMDefaultAlert * alert = [
|
||||
[[NSBundle mainBundle] loadNibNamed:kDefaultAlertNibName owner:self options:nil] firstObject];
|
||||
MWMDefaultAlert * alert =
|
||||
[NSBundle.mainBundle loadNibNamed:kDefaultAlertNibName owner:self options:nil].firstObject;
|
||||
alert.titleLabel.text = title;
|
||||
alert.messageLabel.text = message;
|
||||
if (!message)
|
||||
|
|
|
@ -93,7 +93,9 @@ CGFloat const kAnimationDuration = .05;
|
|||
+ (instancetype)alertWithCountries:(storage::TCountriesVec const &)countries
|
||||
{
|
||||
NSAssert(!countries.empty(), @"countries can not be empty.");
|
||||
MWMDownloadTransitMapAlert * alert = [[[NSBundle mainBundle] loadNibNamed:kDownloadTransitMapAlertNibName owner:nil options:nil] firstObject];
|
||||
MWMDownloadTransitMapAlert * alert =
|
||||
[NSBundle.mainBundle loadNibNamed:kDownloadTransitMapAlertNibName owner:nil options:nil]
|
||||
.firstObject;
|
||||
|
||||
alert->m_countries = countries;
|
||||
[alert configure];
|
||||
|
|
|
@ -20,7 +20,9 @@ static NSString * const kDownloaderDialogHeaderNibName = @"MWMDownloaderDialogHe
|
|||
|
||||
+ (instancetype)headerForOwnerAlert:(MWMDownloadTransitMapAlert *)alert
|
||||
{
|
||||
MWMDownloaderDialogHeader * header = [[[NSBundle mainBundle] loadNibNamed:kDownloaderDialogHeaderNibName owner:nil options:nil] firstObject];
|
||||
MWMDownloaderDialogHeader * header =
|
||||
[NSBundle.mainBundle loadNibNamed:kDownloaderDialogHeaderNibName owner:nil options:nil]
|
||||
.firstObject;
|
||||
header.ownerAlert = alert;
|
||||
return header;
|
||||
}
|
||||
|
|
|
@ -20,9 +20,8 @@ static NSString * const kStatisticsEvent = @"Facebook Alert";
|
|||
+ (MWMFacebookAlert *)alert
|
||||
{
|
||||
[Statistics logEvent:kStatisticsEvent withParameters:@{kStatAction : kStatOpen}];
|
||||
MWMFacebookAlert * alert = [[[NSBundle mainBundle] loadNibNamed:kFacebookAlertNibName
|
||||
owner:self
|
||||
options:nil] firstObject];
|
||||
MWMFacebookAlert * alert =
|
||||
[NSBundle.mainBundle loadNibNamed:kFacebookAlertNibName owner:self options:nil].firstObject;
|
||||
return alert;
|
||||
}
|
||||
|
||||
|
@ -33,8 +32,8 @@ static NSString * const kStatisticsEvent = @"Facebook Alert";
|
|||
[Statistics logEvent:kStatisticsEvent withParameters:@{kStatAction : kStatApply}];
|
||||
[Alohalytics logEvent:kFacebookInviteEventName withValue:@"shareTap"];
|
||||
[self close:nil];
|
||||
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:kUDAlreadySharedKey];
|
||||
[[NSUserDefaults standardUserDefaults] synchronize];
|
||||
[NSUserDefaults.standardUserDefaults setBool:YES forKey:kUDAlreadySharedKey];
|
||||
[NSUserDefaults.standardUserDefaults synchronize];
|
||||
|
||||
FBSDKAppInviteContent * const content = [[FBSDKAppInviteContent alloc] init];
|
||||
content.appLinkURL = [NSURL URLWithString:kFacebookAppName];
|
||||
|
|
|
@ -17,7 +17,8 @@ static NSString * const kStatisticsEvent = @"Location Alert";
|
|||
+ (instancetype)alert
|
||||
{
|
||||
[Statistics logEvent:kStatisticsEvent withParameters:@{kStatAction : kStatOpen}];
|
||||
MWMLocationAlert * alert = [[[NSBundle mainBundle] loadNibNamed:kLocationAlertNibName owner:nil options:nil] firstObject];
|
||||
MWMLocationAlert * alert =
|
||||
[NSBundle.mainBundle loadNibNamed:kLocationAlertNibName owner:nil options:nil].firstObject;
|
||||
[alert setNeedsCloseAlertAfterEnterBackground];
|
||||
return alert;
|
||||
}
|
||||
|
@ -27,7 +28,7 @@ static NSString * const kStatisticsEvent = @"Location Alert";
|
|||
[Statistics logEvent:kStatisticsEvent withParameters:@{kStatAction : kStatApply}];
|
||||
[self close:^{
|
||||
NSURL * url = [NSURL URLWithString:UIApplicationOpenSettingsURLString];
|
||||
UIApplication * a = [UIApplication sharedApplication];
|
||||
UIApplication * a = UIApplication.sharedApplication;
|
||||
if ([a canOpenURL:url])
|
||||
[a openURL:url];
|
||||
}];
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
+ (nonnull instancetype)alert
|
||||
{
|
||||
return [[[NSBundle mainBundle] loadNibNamed:[self className] owner:nil options:nil] firstObject];
|
||||
return [NSBundle.mainBundle loadNibNamed:[self className] owner:nil options:nil].firstObject;
|
||||
}
|
||||
|
||||
- (IBAction)shareTap
|
||||
|
|
|
@ -12,7 +12,8 @@ extern NSString * const kMap2GoogleLoginSegue;
|
|||
|
||||
+ (instancetype)alert
|
||||
{
|
||||
MWMOsmAuthAlert * alert = [[[NSBundle mainBundle] loadNibNamed:[self className] owner:nil options:nil] firstObject];
|
||||
MWMOsmAuthAlert * alert =
|
||||
[NSBundle.mainBundle loadNibNamed:[self className] owner:nil options:nil].firstObject;
|
||||
return alert;
|
||||
}
|
||||
|
||||
|
|
|
@ -14,9 +14,7 @@
|
|||
+ (instancetype)alertWithBlock:(MWMStringBlock)block
|
||||
{
|
||||
MWMPlaceDoesntExistAlert * alert =
|
||||
[[[NSBundle mainBundle] loadNibNamed:[self className]
|
||||
owner:nil
|
||||
options:nil] firstObject];
|
||||
[NSBundle.mainBundle loadNibNamed:[self className] owner:nil options:nil].firstObject;
|
||||
alert.block = block;
|
||||
[MWMKeyboard addObserver:alert];
|
||||
return alert;
|
||||
|
|
|
@ -22,8 +22,7 @@ NSString * const kStatisticsEvent = @"Mobile Internet Settings Alert";
|
|||
{
|
||||
[Statistics logEvent:kStatisticsEvent withParameters:@{kStatAction : kStatOpen}];
|
||||
MWMMobileInternetAlert * alert =
|
||||
[[[NSBundle mainBundle] loadNibNamed:[self className] owner:nil options:nil]
|
||||
firstObject];
|
||||
[NSBundle.mainBundle loadNibNamed:[self className] owner:nil options:nil].firstObject;
|
||||
alert.completionBlock = block;
|
||||
return alert;
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@ static NSString * const kStatisticsEvent = @"Rate Alert";
|
|||
{
|
||||
[Statistics logEvent:kStatisticsEvent withParameters:@{kStatAction : kStatOpen}];
|
||||
MWMRateAlert * alert =
|
||||
[[[NSBundle mainBundle] loadNibNamed:kRateAlertNibName owner:self options:nil] firstObject];
|
||||
[NSBundle.mainBundle loadNibNamed:kRateAlertNibName owner:self options:nil].firstObject;
|
||||
[alert configureButtons];
|
||||
return alert;
|
||||
}
|
||||
|
@ -116,10 +116,10 @@ static NSString * const kStatisticsEvent = @"Rate Alert";
|
|||
}];
|
||||
if (tag == 5)
|
||||
{
|
||||
[[UIApplication sharedApplication] rateVersionFrom:@"ios_pro_popup"];
|
||||
[UIApplication.sharedApplication rateVersionFrom:@"ios_pro_popup"];
|
||||
[Alohalytics logEvent:kRateAlertEventName withValue:@"fiveStar"];
|
||||
[self close:^{
|
||||
auto ud = [NSUserDefaults standardUserDefaults];
|
||||
auto ud = NSUserDefaults.standardUserDefaults;
|
||||
[ud setBool:YES forKey:kUDAlreadyRatedKey];
|
||||
[ud synchronize];
|
||||
}];
|
||||
|
@ -140,17 +140,17 @@ static NSString * const kStatisticsEvent = @"Rate Alert";
|
|||
if ([MWMMailViewController canSendMail])
|
||||
{
|
||||
NSString * device = [AppInfo sharedInfo].deviceName;
|
||||
NSString * languageCode = [[NSLocale preferredLanguages] firstObject];
|
||||
NSString * languageCode = NSLocale.preferredLanguages.firstObject;
|
||||
NSString * language = [[NSLocale localeWithLocaleIdentifier:kLocaleUsedInSupportEmails]
|
||||
displayNameForKey:NSLocaleLanguageCode
|
||||
value:languageCode];
|
||||
NSString * locale = [[NSLocale currentLocale] objectForKey:NSLocaleCountryCode];
|
||||
NSString * locale = [NSLocale.currentLocale objectForKey:NSLocaleCountryCode];
|
||||
NSString * country = [[NSLocale localeWithLocaleIdentifier:kLocaleUsedInSupportEmails]
|
||||
displayNameForKey:NSLocaleCountryCode
|
||||
value:locale];
|
||||
NSString * bundleVersion = AppInfo.sharedInfo.bundleVersion;
|
||||
NSString * text = [NSString stringWithFormat:@"\n\n\n\n- %@ (%@)\n- MAPS.ME %@\n- %@/%@",
|
||||
device, [UIDevice currentDevice].systemVersion,
|
||||
device, UIDevice.currentDevice.systemVersion,
|
||||
bundleVersion, language, country];
|
||||
MWMMailViewController * mailController = [[MWMMailViewController alloc] init];
|
||||
mailController.mailComposeDelegate = self;
|
||||
|
@ -158,7 +158,7 @@ static NSString * const kStatisticsEvent = @"Rate Alert";
|
|||
@(self.selectedTag)]];
|
||||
[mailController setToRecipients:@[ kRateEmail ]];
|
||||
[mailController setMessageBody:text isHTML:NO];
|
||||
mailController.navigationBar.tintColor = [UIColor blackColor];
|
||||
mailController.navigationBar.tintColor = UIColor.blackColor;
|
||||
[alertController.ownerViewController presentViewController:mailController
|
||||
animated:YES
|
||||
completion:nil];
|
||||
|
|
|
@ -20,9 +20,7 @@ static NSString * const kStatisticsEvent = @"Routing Disclaimer Alert";
|
|||
{
|
||||
[Statistics logEvent:kStatisticsEvent withParameters:@{kStatAction : kStatOpen}];
|
||||
MWMRoutingDisclaimerAlert * alert =
|
||||
[[[NSBundle mainBundle] loadNibNamed:[self className]
|
||||
owner:nil
|
||||
options:nil] firstObject];
|
||||
[NSBundle.mainBundle loadNibNamed:[self className] owner:nil options:nil].firstObject;
|
||||
NSString * message = [NSString stringWithFormat:@"%@\n\n%@\n\n%@\n\n%@\n\n%@",
|
||||
L(@"dialog_routing_disclaimer_priority"),
|
||||
L(@"dialog_routing_disclaimer_precision"),
|
||||
|
|
|
@ -22,9 +22,8 @@ NSString * const kStatisticsEvent = @"Search No Results Alert";
|
|||
+ (instancetype)alert
|
||||
{
|
||||
[Statistics logEvent:kStatisticsEvent withParameters:@{kStatAction : kStatOpen}];
|
||||
MWMSearchNoResultsAlert * alert = [
|
||||
[[NSBundle mainBundle] loadNibNamed:[self className] owner:nil options:nil]
|
||||
firstObject];
|
||||
MWMSearchNoResultsAlert * alert =
|
||||
[NSBundle.mainBundle loadNibNamed:[self className] owner:nil options:nil].firstObject;
|
||||
return alert;
|
||||
}
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ NSUInteger const kWordsPerSecond = 3;
|
|||
+ (BOOL)affectsStatusBar { return [self toast].rootView.superview != nil; }
|
||||
+ (UIStatusBarStyle)preferredStatusBarStyle
|
||||
{
|
||||
setStatusBarBackgroundColor([UIColor clearColor]);
|
||||
setStatusBarBackgroundColor(UIColor.clearColor);
|
||||
return [UIColor isNightMode] ? UIStatusBarStyleLightContent : UIStatusBarStyleDefault;
|
||||
}
|
||||
|
||||
|
@ -51,7 +51,7 @@ NSUInteger const kWordsPerSecond = 3;
|
|||
self = [super init];
|
||||
if (self)
|
||||
{
|
||||
[[NSBundle mainBundle] loadNibNamed:[[self class] className] owner:self options:nil];
|
||||
[NSBundle.mainBundle loadNibNamed:[[self class] className] owner:self options:nil];
|
||||
self.rootView.translatesAutoresizingMaskIntoConstraints = NO;
|
||||
}
|
||||
return self;
|
||||
|
|
|
@ -56,10 +56,10 @@ CGFloat angleWithProgress(CGFloat progress) { return 2.0 * M_PI * progress - M_P
|
|||
- (void)setupColors
|
||||
{
|
||||
self.colors = [NSMutableDictionary dictionary];
|
||||
UIColor * progressColor = [_spinnerBackgroundColor isEqual:[UIColor clearColor]]
|
||||
? [UIColor whiteColor]
|
||||
UIColor * progressColor = [_spinnerBackgroundColor isEqual:UIColor.clearColor]
|
||||
? UIColor.whiteColor
|
||||
: [UIColor linkBlue];
|
||||
UIColor * clearColor = [UIColor clearColor];
|
||||
UIColor * clearColor = UIColor.clearColor;
|
||||
[self setSpinnerColoring:MWMImageColoringGray];
|
||||
[self setColor:clearColor forState:MWMCircularProgressStateNormal];
|
||||
[self setColor:clearColor forState:MWMCircularProgressStateSelected];
|
||||
|
@ -227,7 +227,7 @@ CGFloat angleWithProgress(CGFloat progress) { return 2.0 * M_PI * progress - M_P
|
|||
switch (self.state)
|
||||
{
|
||||
case MWMCircularProgressStateProgress: return [UIColor pressBackground];
|
||||
default: return [UIColor clearColor];
|
||||
default: return UIColor.clearColor;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ void SetOSMUserNameWithCredentials(osm::TKeySecret const & keySecret)
|
|||
ServerApi06 const api {OsmOAuth::ServerAuth(keySecret)};
|
||||
try
|
||||
{
|
||||
NSUserDefaults * ud = [NSUserDefaults standardUserDefaults];
|
||||
NSUserDefaults * ud = NSUserDefaults.standardUserDefaults;
|
||||
[ud setObject:@(api.GetUserPreferences().m_displayName.c_str()) forKey:kOSMUserName];
|
||||
[ud synchronize];
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ void SetOSMUserNameWithCredentials(osm::TKeySecret const & keySecret)
|
|||
|
||||
void SetEmptyOSMUserName()
|
||||
{
|
||||
NSUserDefaults * ud = [NSUserDefaults standardUserDefaults];
|
||||
NSUserDefaults * ud = NSUserDefaults.standardUserDefaults;
|
||||
[ud setObject:nil forKey:kOSMUserName];
|
||||
[ud synchronize];
|
||||
}
|
||||
|
@ -43,28 +43,23 @@ UIColor * AuthorizationButtonTextColor(AuthorizationButtonType type)
|
|||
{
|
||||
switch (type)
|
||||
{
|
||||
case AuthorizationButtonType::AuthorizationButtonTypeGoogle:
|
||||
return [UIColor blackColor];
|
||||
case AuthorizationButtonType::AuthorizationButtonTypeFacebook:
|
||||
return [UIColor whiteColor];
|
||||
case AuthorizationButtonType::AuthorizationButtonTypeOSM:
|
||||
return [UIColor white];
|
||||
case AuthorizationButtonType::AuthorizationButtonTypeGoogle: return UIColor.blackColor;
|
||||
case AuthorizationButtonType::AuthorizationButtonTypeFacebook: return UIColor.whiteColor;
|
||||
case AuthorizationButtonType::AuthorizationButtonTypeOSM: return [UIColor white];
|
||||
}
|
||||
return [UIColor clearColor];
|
||||
return UIColor.clearColor;
|
||||
}
|
||||
|
||||
UIColor * AuthorizationButtonBackgroundColor(AuthorizationButtonType type)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case AuthorizationButtonType::AuthorizationButtonTypeGoogle:
|
||||
return [UIColor whiteColor];
|
||||
case AuthorizationButtonType::AuthorizationButtonTypeFacebook:
|
||||
return [UIColor colorWithRed:72. / 255. green:97. / 255. blue:163. / 255. alpha:1.];
|
||||
case AuthorizationButtonType::AuthorizationButtonTypeOSM:
|
||||
return [UIColor linkBlue];
|
||||
case AuthorizationButtonType::AuthorizationButtonTypeGoogle: return UIColor.whiteColor;
|
||||
case AuthorizationButtonType::AuthorizationButtonTypeFacebook:
|
||||
return [UIColor colorWithRed:72. / 255. green:97. / 255. blue:163. / 255. alpha:1.];
|
||||
case AuthorizationButtonType::AuthorizationButtonTypeOSM: return [UIColor linkBlue];
|
||||
}
|
||||
return [UIColor clearColor];
|
||||
return UIColor.clearColor;
|
||||
}
|
||||
|
||||
void AuthorizationConfigButton(UIButton * btn, AuthorizationButtonType type)
|
||||
|
@ -82,7 +77,7 @@ void AuthorizationConfigButton(UIButton * btn, AuthorizationButtonType type)
|
|||
|
||||
void AuthorizationStoreCredentials(osm::TKeySecret const & keySecret)
|
||||
{
|
||||
NSUserDefaults * ud = [NSUserDefaults standardUserDefaults];
|
||||
NSUserDefaults * ud = NSUserDefaults.standardUserDefaults;
|
||||
if (keySecret.first.empty() || keySecret.second.empty())
|
||||
{
|
||||
[ud removeObjectForKey:kOSMRequestToken];
|
||||
|
@ -100,7 +95,7 @@ void AuthorizationStoreCredentials(osm::TKeySecret const & keySecret)
|
|||
|
||||
BOOL AuthorizationHaveCredentials()
|
||||
{
|
||||
NSUserDefaults * ud = [NSUserDefaults standardUserDefaults];
|
||||
NSUserDefaults * ud = NSUserDefaults.standardUserDefaults;
|
||||
NSString * requestToken = [ud stringForKey:kOSMRequestToken];
|
||||
NSString * requestSecret = [ud stringForKey:kOSMRequestSecret];
|
||||
return requestToken && requestSecret;
|
||||
|
@ -108,7 +103,7 @@ BOOL AuthorizationHaveCredentials()
|
|||
|
||||
osm::TKeySecret AuthorizationGetCredentials()
|
||||
{
|
||||
NSUserDefaults * ud = [NSUserDefaults standardUserDefaults];
|
||||
NSUserDefaults * ud = NSUserDefaults.standardUserDefaults;
|
||||
NSString * requestToken = [ud stringForKey:kOSMRequestToken];
|
||||
NSString * requestSecret = [ud stringForKey:kOSMRequestSecret];
|
||||
if (requestToken && requestSecret)
|
||||
|
@ -118,19 +113,19 @@ osm::TKeySecret AuthorizationGetCredentials()
|
|||
|
||||
void AuthorizationSetNeedCheck(BOOL needCheck)
|
||||
{
|
||||
NSUserDefaults * ud = [NSUserDefaults standardUserDefaults];
|
||||
NSUserDefaults * ud = NSUserDefaults.standardUserDefaults;
|
||||
[ud setBool:needCheck forKey:kAuthNeedCheck];
|
||||
[ud synchronize];
|
||||
}
|
||||
|
||||
BOOL AuthorizationIsNeedCheck()
|
||||
{
|
||||
return [[NSUserDefaults standardUserDefaults] boolForKey:kAuthNeedCheck];
|
||||
return [NSUserDefaults.standardUserDefaults boolForKey:kAuthNeedCheck];
|
||||
}
|
||||
|
||||
NSString * OSMUserName()
|
||||
{
|
||||
return [[NSUserDefaults standardUserDefaults] stringForKey:kOSMUserName];
|
||||
return [NSUserDefaults.standardUserDefaults stringForKey:kOSMUserName];
|
||||
}
|
||||
|
||||
} // namespace osm_auth_ios
|
||||
|
|
|
@ -70,8 +70,8 @@ using namespace osm_auth_ios;
|
|||
|
||||
if (!isConnected)
|
||||
{
|
||||
self.loginGoogleButton.layer.borderColor = [UIColor clearColor].CGColor;
|
||||
self.loginFacebookButton.layer.borderColor = [UIColor clearColor].CGColor;
|
||||
self.loginGoogleButton.layer.borderColor = UIColor.clearColor.CGColor;
|
||||
self.loginFacebookButton.layer.borderColor = UIColor.clearColor.CGColor;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -145,7 +145,7 @@ NSString * getVerifier(NSString * urlString)
|
|||
withParameters:@{
|
||||
kStatIsSuccess : kStatNo,
|
||||
kStatErrorData : @(ex.what()),
|
||||
kStatType : self.authTypeAsString
|
||||
kStatType : [self authTypeAsString]
|
||||
}];
|
||||
}
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
|
@ -154,7 +154,7 @@ NSString * getVerifier(NSString * urlString)
|
|||
{
|
||||
osm_auth_ios::AuthorizationStoreCredentials(ks);
|
||||
[Statistics logEvent:@"Editor_Auth_request_result"
|
||||
withParameters:@{kStatIsSuccess : kStatYes, kStatType : self.authTypeAsString}];
|
||||
withParameters:@{kStatIsSuccess : kStatYes, kStatType : [self authTypeAsString]}];
|
||||
UIViewController * svc = nil;
|
||||
for (UIViewController * vc in self.navigationController.viewControllers)
|
||||
{
|
||||
|
|
|
@ -29,7 +29,7 @@ static NSString * const kKeyPath = @"subviews";
|
|||
if (self)
|
||||
{
|
||||
self.controller = controller;
|
||||
[[NSBundle mainBundle] loadNibNamed:@"MWMAPIBarView" owner:self options:nil];
|
||||
[NSBundle.mainBundle loadNibNamed:@"MWMAPIBarView" owner:self options:nil];
|
||||
|
||||
self.timeFormatter = [[NSDateFormatter alloc] init];
|
||||
self.timeFormatter.dateStyle = NSDateFormatterNoStyle;
|
||||
|
@ -59,7 +59,7 @@ static NSString * const kKeyPath = @"subviews";
|
|||
guard.m_controller.Clear();
|
||||
self.isVisible = NO;
|
||||
NSURL * url = [NSURL URLWithString:@(f.GetApiDataHolder().GetGlobalBackUrl().c_str())];
|
||||
[[UIApplication sharedApplication] openURL:url];
|
||||
[UIApplication.sharedApplication openURL:url];
|
||||
}
|
||||
|
||||
#pragma mark - Properties
|
||||
|
|
|
@ -81,7 +81,7 @@ extern NSString * const kAlohalyticsTapEventKey;
|
|||
isDirectionViewUnderStatusBar ||
|
||||
isMenuViewUnderStatusBar || isAddPlaceUnderStatusBar;
|
||||
|
||||
setStatusBarBackgroundColor(isSomethingUnderStatusBar ? [UIColor clearColor]
|
||||
setStatusBarBackgroundColor(isSomethingUnderStatusBar ? UIColor.clearColor
|
||||
: [UIColor statusBarBackground]);
|
||||
return isSomethingUnderStatusBar || isNightMode ? UIStatusBarStyleLightContent
|
||||
: UIStatusBarStyleDefault;
|
||||
|
|
|
@ -57,7 +57,7 @@ NSArray<UIImage *> * animationImages(NSString * animationTemplate, NSUInteger im
|
|||
self = [super init];
|
||||
if (self)
|
||||
{
|
||||
[[NSBundle mainBundle] loadNibNamed:kMWMSideButtonsViewNibName owner:self options:nil];
|
||||
[NSBundle.mainBundle loadNibNamed:kMWMSideButtonsViewNibName owner:self options:nil];
|
||||
[view addSubview:self.sideView];
|
||||
[self.sideView setNeedsLayout];
|
||||
self.zoomSwipeEnabled = NO;
|
||||
|
|
|
@ -50,7 +50,8 @@ CGFloat const kButtonsBottomOffset = 6;
|
|||
|
||||
- (void)layoutXPosition:(BOOL)hidden
|
||||
{
|
||||
if ([UIApplication sharedApplication].userInterfaceLayoutDirection == UIUserInterfaceLayoutDirectionRightToLeft)
|
||||
if (UIApplication.sharedApplication.userInterfaceLayoutDirection ==
|
||||
UIUserInterfaceLayoutDirectionRightToLeft)
|
||||
{
|
||||
if (hidden)
|
||||
self.maxX = 0;
|
||||
|
|
|
@ -87,7 +87,7 @@ using Observers = NSHashTable<Observer>;
|
|||
{
|
||||
NSString * title = nil;
|
||||
if ([MWMRouter isTaxi])
|
||||
title = self.taxiDataSource.isTaxiInstalled ? L(@"taxi_order") : L(@"install_app");
|
||||
title = [self.taxiDataSource isTaxiInstalled] ? L(@"taxi_order") : L(@"install_app");
|
||||
else
|
||||
title = L(@"p2p_start");
|
||||
|
||||
|
@ -271,12 +271,12 @@ using Observers = NSHashTable<Observer>;
|
|||
|
||||
+ (void)addObserver:(id<MWMNavigationDashboardObserver>)observer
|
||||
{
|
||||
[[MWMNavigationDashboardManager manager].observers addObject:observer];
|
||||
[[self manager].observers addObject:observer];
|
||||
}
|
||||
|
||||
+ (void)removeObserver:(id<MWMNavigationDashboardObserver>)observer
|
||||
{
|
||||
[[MWMNavigationDashboardManager manager].observers removeObject:observer];
|
||||
[[self manager].observers removeObject:observer];
|
||||
}
|
||||
|
||||
#pragma mark - MWMNavigationDashboardObserver
|
||||
|
@ -300,7 +300,7 @@ using Observers = NSHashTable<Observer>;
|
|||
|
||||
+ (void)updateNavigationInfoAvailableArea:(CGRect)frame
|
||||
{
|
||||
[[MWMNavigationDashboardManager manager] updateNavigationInfoAvailableArea:frame];
|
||||
[[self manager] updateNavigationInfoAvailableArea:frame];
|
||||
}
|
||||
|
||||
- (void)updateNavigationInfoAvailableArea:(CGRect)frame { _navigationInfoView.frame = frame; }
|
||||
|
@ -311,8 +311,8 @@ using Observers = NSHashTable<Observer>;
|
|||
if (!_etaAttributes)
|
||||
{
|
||||
_etaAttributes = @{
|
||||
NSForegroundColorAttributeName : UIColor.blackPrimaryText,
|
||||
NSFontAttributeName : UIFont.medium17
|
||||
NSForegroundColorAttributeName : [UIColor blackPrimaryText],
|
||||
NSFontAttributeName : [UIFont medium17]
|
||||
};
|
||||
}
|
||||
return _etaAttributes;
|
||||
|
|
|
@ -64,8 +64,8 @@
|
|||
MWMCircularProgressStateProgress, MWMCircularProgressStateSpinner,
|
||||
MWMCircularProgressStateCompleted}];
|
||||
|
||||
[progress setSpinnerBackgroundColor:[UIColor clearColor]];
|
||||
[progress setColor:[UIColor whiteColor]
|
||||
[progress setSpinnerBackgroundColor:UIColor.clearColor];
|
||||
[progress setColor:UIColor.whiteColor
|
||||
forStates:{MWMCircularProgressStateProgress, MWMCircularProgressStateSpinner}];
|
||||
|
||||
progress.delegate = self;
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
if (!_pageControl)
|
||||
{
|
||||
_pageControl = [[UIPageControl alloc] init];
|
||||
_pageControl.backgroundColor = [UIColor clearColor];
|
||||
_pageControl.backgroundColor = UIColor.clearColor;
|
||||
[self.superview addSubview:_pageControl];
|
||||
}
|
||||
return _pageControl;
|
||||
|
@ -200,7 +200,7 @@ using namespace taxi;
|
|||
case MWMRoutePreviewTaxiCellTypeUber: url = [NSURL URLWithString:@"uber://"]; break;
|
||||
case MWMRoutePreviewTaxiCellTypeYandex: url = [NSURL URLWithString:@"yandextaxi://"]; break;
|
||||
}
|
||||
return [[UIApplication sharedApplication] canOpenURL:url];
|
||||
return [UIApplication.sharedApplication canOpenURL:url];
|
||||
}
|
||||
|
||||
- (void)taxiURL:(MWMURLBlock)block
|
||||
|
|
|
@ -18,6 +18,6 @@ string bcp47ToTwineLanguage(NSString const * bcp47LangName)
|
|||
return "zh-Hant"; // Chinese traditional
|
||||
|
||||
// Taking two first symbols of a language name. For example ru-RU -> ru
|
||||
return [[bcp47LangName substringToIndex:2] UTF8String];
|
||||
return [bcp47LangName substringToIndex:2].UTF8String;
|
||||
}
|
||||
} // namespace locale_translator
|
||||
|
|
|
@ -16,14 +16,18 @@
|
|||
|
||||
[self updatePlaceholderVisibility];
|
||||
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(textDidChange:)
|
||||
name:UITextViewTextDidChangeNotification object:self];
|
||||
[NSNotificationCenter.defaultCenter addObserver:self
|
||||
selector:@selector(textDidChange:)
|
||||
name:UITextViewTextDidChangeNotification
|
||||
object:self];
|
||||
self.clipsToBounds = YES;
|
||||
}
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
[[NSNotificationCenter defaultCenter] removeObserver:self name:UITextViewTextDidChangeNotification object:nil];
|
||||
[NSNotificationCenter.defaultCenter removeObserver:self
|
||||
name:UITextViewTextDidChangeNotification
|
||||
object:nil];
|
||||
}
|
||||
|
||||
- (UILabel *)placeholderView
|
||||
|
@ -32,7 +36,7 @@
|
|||
{
|
||||
_placeholderView = [[UILabel alloc] initWithFrame:self.bounds];
|
||||
_placeholderView.opaque = NO;
|
||||
_placeholderView.backgroundColor = [UIColor clearColor];
|
||||
_placeholderView.backgroundColor = UIColor.clearColor;
|
||||
_placeholderView.textColor = [UIColor lightGrayColor];
|
||||
_placeholderView.textAlignment = self.textAlignment;
|
||||
_placeholderView.userInteractionEnabled = NO;
|
||||
|
|
|
@ -217,8 +217,7 @@ BOOL gIsFirstMyPositionMode = YES;
|
|||
|
||||
#pragma mark - ViewController lifecycle
|
||||
|
||||
- (void)dealloc { [[NSNotificationCenter defaultCenter] removeObserver:self]; }
|
||||
|
||||
- (void)dealloc { [NSNotificationCenter.defaultCenter removeObserver:self]; }
|
||||
- (void)viewWillTransitionToSize:(CGSize)size
|
||||
withTransitionCoordinator:(id<UIViewControllerTransitionCoordinator>)coordinator
|
||||
{
|
||||
|
@ -238,9 +237,9 @@ BOOL gIsFirstMyPositionMode = YES;
|
|||
- (void)viewWillAppear:(BOOL)animated
|
||||
{
|
||||
[super viewWillAppear:animated];
|
||||
[[NSNotificationCenter defaultCenter] removeObserver:self
|
||||
name:UIDeviceOrientationDidChangeNotification
|
||||
object:nil];
|
||||
[NSNotificationCenter.defaultCenter removeObserver:self
|
||||
name:UIDeviceOrientationDidChangeNotification
|
||||
object:nil];
|
||||
|
||||
if (![MWMRouter isRoutingActive])
|
||||
self.controlsManager.menuState = self.controlsManager.menuRestoreState;
|
||||
|
@ -298,7 +297,7 @@ BOOL gIsFirstMyPositionMode = YES;
|
|||
|
||||
- (void)showViralAlertIfNeeded
|
||||
{
|
||||
NSUserDefaults * ud = [NSUserDefaults standardUserDefaults];
|
||||
NSUserDefaults * ud = NSUserDefaults.standardUserDefaults;
|
||||
|
||||
using namespace osm_auth_ios;
|
||||
if (!AuthorizationIsNeedCheck() || [ud objectForKey:kUDViralAlertWasShown] ||
|
||||
|
@ -382,7 +381,7 @@ BOOL gIsFirstMyPositionMode = YES;
|
|||
{
|
||||
using namespace osm_auth_ios;
|
||||
|
||||
auto const & featureID = self.controlsManager.featureHolder.featureId;
|
||||
auto const & featureID = [self.controlsManager.featureHolder featureId];
|
||||
|
||||
[Statistics logEvent:kStatEditorEditStart
|
||||
withParameters:@{
|
||||
|
|
|
@ -64,34 +64,34 @@ void InitLocalizedStrings()
|
|||
{
|
||||
Framework & f = GetFramework();
|
||||
// Texts on the map screen when map is not downloaded or is downloading
|
||||
f.AddString("country_status_added_to_queue", [L(@"country_status_added_to_queue") UTF8String]);
|
||||
f.AddString("country_status_downloading", [L(@"country_status_downloading") UTF8String]);
|
||||
f.AddString("country_status_download", [L(@"country_status_download") UTF8String]);
|
||||
f.AddString("country_status_added_to_queue", L(@"country_status_added_to_queue").UTF8String);
|
||||
f.AddString("country_status_downloading", L(@"country_status_downloading").UTF8String);
|
||||
f.AddString("country_status_download", L(@"country_status_download").UTF8String);
|
||||
f.AddString("country_status_download_without_routing",
|
||||
[L(@"country_status_download_without_routing") UTF8String]);
|
||||
f.AddString("country_status_download_failed", [L(@"country_status_download_failed") UTF8String]);
|
||||
f.AddString("cancel", [L(@"cancel") UTF8String]);
|
||||
f.AddString("try_again", [L(@"try_again") UTF8String]);
|
||||
L(@"country_status_download_without_routing").UTF8String);
|
||||
f.AddString("country_status_download_failed", L(@"country_status_download_failed").UTF8String);
|
||||
f.AddString("cancel", L(@"cancel").UTF8String);
|
||||
f.AddString("try_again", L(@"try_again").UTF8String);
|
||||
// Default texts for bookmarks added in C++ code (by URL Scheme API)
|
||||
f.AddString("placepage_unknown_place", [L(@"placepage_unknown_place") UTF8String]);
|
||||
f.AddString("my_places", [L(@"my_places") UTF8String]);
|
||||
f.AddString("my_position", [L(@"my_position") UTF8String]);
|
||||
f.AddString("routes", [L(@"routes") UTF8String]);
|
||||
f.AddString("placepage_unknown_place", L(@"placepage_unknown_place").UTF8String);
|
||||
f.AddString("my_places", L(@"my_places").UTF8String);
|
||||
f.AddString("my_position", L(@"my_position").UTF8String);
|
||||
f.AddString("routes", L(@"routes").UTF8String);
|
||||
f.AddString("wifi", L(@"wifi").UTF8String);
|
||||
|
||||
f.AddString("routing_failed_unknown_my_position",
|
||||
[L(@"routing_failed_unknown_my_position") UTF8String]);
|
||||
L(@"routing_failed_unknown_my_position").UTF8String);
|
||||
f.AddString("routing_failed_has_no_routing_file",
|
||||
[L(@"routing_failed_has_no_routing_file") UTF8String]);
|
||||
L(@"routing_failed_has_no_routing_file").UTF8String);
|
||||
f.AddString("routing_failed_start_point_not_found",
|
||||
[L(@"routing_failed_start_point_not_found") UTF8String]);
|
||||
L(@"routing_failed_start_point_not_found").UTF8String);
|
||||
f.AddString("routing_failed_dst_point_not_found",
|
||||
[L(@"routing_failed_dst_point_not_found") UTF8String]);
|
||||
L(@"routing_failed_dst_point_not_found").UTF8String);
|
||||
f.AddString("routing_failed_cross_mwm_building",
|
||||
[L(@"routing_failed_cross_mwm_building") UTF8String]);
|
||||
f.AddString("routing_failed_route_not_found", [L(@"routing_failed_route_not_found") UTF8String]);
|
||||
f.AddString("routing_failed_internal_error", [L(@"routing_failed_internal_error") UTF8String]);
|
||||
f.AddString("place_page_booking_rating", [L(@"place_page_booking_rating") UTF8String]);
|
||||
L(@"routing_failed_cross_mwm_building").UTF8String);
|
||||
f.AddString("routing_failed_route_not_found", L(@"routing_failed_route_not_found").UTF8String);
|
||||
f.AddString("routing_failed_internal_error", L(@"routing_failed_internal_error").UTF8String);
|
||||
f.AddString("place_page_booking_rating", L(@"place_page_booking_rating").UTF8String);
|
||||
}
|
||||
|
||||
void InitCrashTrackers()
|
||||
|
@ -119,7 +119,7 @@ void ConfigCrashTrackers()
|
|||
|
||||
void OverrideUserAgent()
|
||||
{
|
||||
[[NSUserDefaults standardUserDefaults] registerDefaults:@{
|
||||
[NSUserDefaults.standardUserDefaults registerDefaults:@{
|
||||
@"UserAgent" : @"Mozilla/5.0 (iPhone; CPU iPhone OS 10_3 like Mac OS X) AppleWebKit/603.1.30 "
|
||||
@"(KHTML, like Gecko) Version/10.0 Mobile/14E269 Safari/602.1"
|
||||
}];
|
||||
|
@ -146,7 +146,7 @@ using namespace osm_auth_ios;
|
|||
|
||||
+ (MapsAppDelegate *)theApp
|
||||
{
|
||||
return (MapsAppDelegate *)[UIApplication sharedApplication].delegate;
|
||||
return (MapsAppDelegate *)UIApplication.sharedApplication.delegate;
|
||||
}
|
||||
|
||||
#pragma mark - Notifications
|
||||
|
@ -198,7 +198,7 @@ using namespace osm_auth_ios;
|
|||
Framework & f = GetFramework();
|
||||
if (m_geoURL)
|
||||
{
|
||||
if (f.ShowMapForURL([m_geoURL UTF8String]))
|
||||
if (f.ShowMapForURL(m_geoURL.UTF8String))
|
||||
{
|
||||
[Statistics logEvent:kStatEventName(kStatApplication, kStatImport)
|
||||
withParameters:@{kStatValue : m_scheme}];
|
||||
|
@ -277,10 +277,10 @@ using namespace osm_auth_ios;
|
|||
}
|
||||
else if (m_fileURL)
|
||||
{
|
||||
if (!f.AddBookmarksFile([m_fileURL UTF8String]))
|
||||
if (!f.AddBookmarksFile(m_fileURL.UTF8String))
|
||||
[self showLoadFileAlertIsSuccessful:NO];
|
||||
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:@"KML file added" object:nil];
|
||||
[NSNotificationCenter.defaultCenter postNotificationName:@"KML file added" object:nil];
|
||||
[self showLoadFileAlertIsSuccessful:YES];
|
||||
[Statistics logEvent:kStatEventName(kStatApplication, kStatImport)
|
||||
withParameters:@{kStatValue : kStatKML}];
|
||||
|
@ -291,7 +291,7 @@ using namespace osm_auth_ios;
|
|||
NSString * pasteboard = [[UIPasteboard generalPasteboard].string copy];
|
||||
if (pasteboard && pasteboard.length)
|
||||
{
|
||||
if (f.ShowMapForURL([pasteboard UTF8String]))
|
||||
if (f.ShowMapForURL(pasteboard.UTF8String))
|
||||
{
|
||||
[self showMap];
|
||||
[UIPasteboard generalPasteboard].string = @"";
|
||||
|
@ -319,7 +319,7 @@ using namespace osm_auth_ios;
|
|||
|
||||
self.standbyCounter = 0;
|
||||
NSTimeInterval const minimumBackgroundFetchIntervalInSeconds = 6 * 60 * 60;
|
||||
[[UIApplication sharedApplication]
|
||||
[UIApplication.sharedApplication
|
||||
setMinimumBackgroundFetchInterval:minimumBackgroundFetchIntervalInSeconds];
|
||||
[MWMMyTarget startAdServerForbiddenCheckTimer];
|
||||
[self updateApplicationIconBadgeNumber];
|
||||
|
@ -576,7 +576,7 @@ using namespace osm_auth_ios;
|
|||
if (![topVc isKindOfClass:[MWMViewController class]])
|
||||
return;
|
||||
|
||||
NSUserDefaults * ud = [NSUserDefaults standardUserDefaults];
|
||||
NSUserDefaults * ud = NSUserDefaults.standardUserDefaults;
|
||||
if ([ud boolForKey:kUDTrackWarningAlertWasShown])
|
||||
return;
|
||||
|
||||
|
@ -643,7 +643,7 @@ using namespace osm_auth_ios;
|
|||
|
||||
- (void)dealloc
|
||||
{
|
||||
[[NSNotificationCenter defaultCenter] removeObserver:self];
|
||||
[NSNotificationCenter.defaultCenter removeObserver:self];
|
||||
// Global cleanup
|
||||
DeleteFramework();
|
||||
}
|
||||
|
@ -677,7 +677,7 @@ using namespace osm_auth_ios;
|
|||
kStatConnection : connectionType
|
||||
}];
|
||||
|
||||
auto device = [UIDevice currentDevice];
|
||||
auto device = UIDevice.currentDevice;
|
||||
device.batteryMonitoringEnabled = YES;
|
||||
auto charging = kStatUnknown;
|
||||
auto const state = device.batteryState;
|
||||
|
@ -701,11 +701,11 @@ using namespace osm_auth_ios;
|
|||
--m_activeDownloadsCounter;
|
||||
if (m_activeDownloadsCounter <= 0)
|
||||
{
|
||||
[UIApplication sharedApplication].networkActivityIndicatorVisible = NO;
|
||||
UIApplication.sharedApplication.networkActivityIndicatorVisible = NO;
|
||||
m_activeDownloadsCounter = 0;
|
||||
if ([UIApplication sharedApplication].applicationState == UIApplicationStateBackground)
|
||||
if (UIApplication.sharedApplication.applicationState == UIApplicationStateBackground)
|
||||
{
|
||||
[[UIApplication sharedApplication] endBackgroundTask:m_backgroundTask];
|
||||
[UIApplication.sharedApplication endBackgroundTask:m_backgroundTask];
|
||||
m_backgroundTask = UIBackgroundTaskInvalid;
|
||||
}
|
||||
}
|
||||
|
@ -714,7 +714,7 @@ using namespace osm_auth_ios;
|
|||
- (void)enableDownloadIndicator
|
||||
{
|
||||
++m_activeDownloadsCounter;
|
||||
[UIApplication sharedApplication].networkActivityIndicatorVisible = YES;
|
||||
UIApplication.sharedApplication.networkActivityIndicatorVisible = YES;
|
||||
}
|
||||
|
||||
+ (NSDictionary *)navigationBarTextAttributes
|
||||
|
@ -859,7 +859,7 @@ using namespace osm_auth_ios;
|
|||
- (void)updateApplicationIconBadgeNumber
|
||||
{
|
||||
auto const number = [self badgeNumber];
|
||||
[UIApplication sharedApplication].applicationIconBadgeNumber = number;
|
||||
UIApplication.sharedApplication.applicationIconBadgeNumber = number;
|
||||
[[MWMBottomMenuViewController controller] updateBadgeVisible:number != 0];
|
||||
}
|
||||
|
||||
|
@ -905,7 +905,7 @@ using namespace osm_auth_ios;
|
|||
- (void)setStandbyCounter:(NSInteger)standbyCounter
|
||||
{
|
||||
_standbyCounter = MAX(0, standbyCounter);
|
||||
[UIApplication sharedApplication].idleTimerDisabled = (_standbyCounter != 0);
|
||||
UIApplication.sharedApplication.idleTimerDisabled = (_standbyCounter != 0);
|
||||
}
|
||||
|
||||
#pragma mark - Alert logic
|
||||
|
@ -914,8 +914,8 @@ using namespace osm_auth_ios;
|
|||
{
|
||||
[MWMSettings setStatisticsEnabled:YES];
|
||||
NSString * currentVersion =
|
||||
[[NSBundle mainBundle] objectForInfoDictionaryKey:(NSString *)kCFBundleVersionKey];
|
||||
NSUserDefaults * standartDefaults = [NSUserDefaults standardUserDefaults];
|
||||
[NSBundle.mainBundle objectForInfoDictionaryKey:(NSString *)kCFBundleVersionKey];
|
||||
NSUserDefaults * standartDefaults = NSUserDefaults.standardUserDefaults;
|
||||
[standartDefaults setObject:currentVersion forKey:kUDFirstVersionKey];
|
||||
[standartDefaults setInteger:1 forKey:kUDSessionsCountKey];
|
||||
[standartDefaults setObject:NSDate.date forKey:kUDLastLaunchDateKey];
|
||||
|
@ -926,7 +926,7 @@ using namespace osm_auth_ios;
|
|||
|
||||
- (void)incrementSessionCount
|
||||
{
|
||||
NSUserDefaults * standartDefaults = [NSUserDefaults standardUserDefaults];
|
||||
NSUserDefaults * standartDefaults = NSUserDefaults.standardUserDefaults;
|
||||
NSUInteger sessionCount = [standartDefaults integerForKey:kUDSessionsCountKey];
|
||||
NSUInteger const kMaximumSessionCountForShowingShareAlert = 50;
|
||||
if (sessionCount > kMaximumSessionCountForShowingShareAlert)
|
||||
|
@ -960,7 +960,7 @@ using namespace osm_auth_ios;
|
|||
[[MWMAlertViewController activeAlertController] presentRateAlert];
|
||||
else
|
||||
[[MWMAlertViewController activeAlertController] presentFacebookAlert];
|
||||
[[NSUserDefaults standardUserDefaults]
|
||||
[NSUserDefaults.standardUserDefaults
|
||||
setObject:NSDate.date
|
||||
forKey:isRate ? kUDLastRateRequestDate : kUDLastShareRequstDate];
|
||||
}
|
||||
|
@ -971,7 +971,7 @@ using namespace osm_auth_ios;
|
|||
- (BOOL)shouldShowFacebookAlert
|
||||
{
|
||||
NSUInteger const kMaximumSessionCountForShowingShareAlert = 50;
|
||||
NSUserDefaults const * const standartDefaults = [NSUserDefaults standardUserDefaults];
|
||||
NSUserDefaults const * const standartDefaults = NSUserDefaults.standardUserDefaults;
|
||||
if ([standartDefaults boolForKey:kUDAlreadySharedKey])
|
||||
return NO;
|
||||
|
||||
|
@ -1007,7 +1007,7 @@ using namespace osm_auth_ios;
|
|||
- (BOOL)shouldShowRateAlert
|
||||
{
|
||||
NSUInteger const kMaximumSessionCountForShowingAlert = 21;
|
||||
NSUserDefaults const * const standartDefaults = [NSUserDefaults standardUserDefaults];
|
||||
NSUserDefaults const * const standartDefaults = NSUserDefaults.standardUserDefaults;
|
||||
if ([standartDefaults boolForKey:kUDAlreadyRatedKey])
|
||||
return NO;
|
||||
|
||||
|
@ -1041,8 +1041,8 @@ using namespace osm_auth_ios;
|
|||
- (BOOL)userIsNew
|
||||
{
|
||||
NSString * currentVersion =
|
||||
[[NSBundle mainBundle] objectForInfoDictionaryKey:(NSString *)kCFBundleVersionKey];
|
||||
NSString * firstVersion = [[NSUserDefaults standardUserDefaults] stringForKey:kUDFirstVersionKey];
|
||||
[NSBundle.mainBundle objectForInfoDictionaryKey:(NSString *)kCFBundleVersionKey];
|
||||
NSString * firstVersion = [NSUserDefaults.standardUserDefaults stringForKey:kUDFirstVersionKey];
|
||||
if (!firstVersion.length || firstVersionIsLessThanSecond(firstVersion, currentVersion))
|
||||
return NO;
|
||||
|
||||
|
@ -1055,7 +1055,7 @@ using namespace osm_auth_ios;
|
|||
return 0;
|
||||
|
||||
NSDate * now = NSDate.date;
|
||||
NSCalendar * calendar = [NSCalendar currentCalendar];
|
||||
NSCalendar * calendar = NSCalendar.currentCalendar;
|
||||
[calendar rangeOfUnit:NSCalendarUnitDay startDate:&fromDate interval:NULL forDate:fromDate];
|
||||
[calendar rangeOfUnit:NSCalendarUnitDay startDate:&now interval:NULL forDate:now];
|
||||
NSDateComponents * difference =
|
||||
|
|
|
@ -66,7 +66,7 @@ using namespace storage;
|
|||
+ (instancetype)dialogForController:(MapViewController *)controller
|
||||
{
|
||||
MWMMapDownloadDialog * dialog =
|
||||
[[NSBundle mainBundle] loadNibNamed:[self className] owner:nil options:nil].firstObject;
|
||||
[NSBundle.mainBundle loadNibNamed:[self className] owner:nil options:nil].firstObject;
|
||||
dialog.autoresizingMask = UIViewAutoresizingFlexibleHeight;
|
||||
dialog.controller = controller;
|
||||
dialog.size = kInitialDialogSize;
|
||||
|
|
|
@ -124,14 +124,14 @@ NSDictionary * const kDeviceNamesWithMetalDriver = @{
|
|||
if ([carrier.isoCountryCode length]) // if device can access sim card info
|
||||
_countryCode = [carrier.isoCountryCode uppercaseString];
|
||||
else // else, getting system country code
|
||||
_countryCode = [[[NSLocale currentLocale] objectForKey:NSLocaleCountryCode] uppercaseString];
|
||||
_countryCode = [[NSLocale.currentLocale objectForKey:NSLocaleCountryCode] uppercaseString];
|
||||
|
||||
std::string codeString;
|
||||
if (settings::Get(kCountryCodeKey, codeString)) // if country code stored in settings
|
||||
{
|
||||
if (carrier.isoCountryCode) // if device can access sim card info
|
||||
settings::Set(kCountryCodeKey,
|
||||
std::string([_countryCode UTF8String])); // then save new code instead
|
||||
std::string(_countryCode.UTF8String)); // then save new code instead
|
||||
else
|
||||
_countryCode =
|
||||
@(codeString.c_str()); // if device can NOT access sim card info then using saved code
|
||||
|
@ -140,7 +140,7 @@ NSDictionary * const kDeviceNamesWithMetalDriver = @{
|
|||
{
|
||||
if (_countryCode)
|
||||
settings::Set(kCountryCodeKey,
|
||||
std::string([_countryCode UTF8String])); // saving code first time
|
||||
std::string(_countryCode.UTF8String)); // saving code first time
|
||||
else
|
||||
_countryCode = @"";
|
||||
}
|
||||
|
@ -159,9 +159,9 @@ NSDictionary * const kDeviceNamesWithMetalDriver = @{
|
|||
}
|
||||
else // if id not stored in settings
|
||||
{
|
||||
_uniqueId = [[UIDevice currentDevice].identifierForVendor UUIDString];
|
||||
_uniqueId = [UIDevice.currentDevice.identifierForVendor UUIDString];
|
||||
if (_uniqueId) // then saving in settings
|
||||
settings::Set(kUniqueIdKey, std::string([_uniqueId UTF8String]));
|
||||
settings::Set(kUniqueIdKey, std::string(_uniqueId.UTF8String));
|
||||
}
|
||||
}
|
||||
return _uniqueId;
|
||||
|
@ -170,14 +170,14 @@ NSDictionary * const kDeviceNamesWithMetalDriver = @{
|
|||
- (NSString *)bundleVersion
|
||||
{
|
||||
if (!_bundleVersion)
|
||||
_bundleVersion = [[NSBundle mainBundle] infoDictionary][@"CFBundleShortVersionString"];
|
||||
_bundleVersion = NSBundle.mainBundle.infoDictionary[@"CFBundleShortVersionString"];
|
||||
return _bundleVersion;
|
||||
}
|
||||
|
||||
- (NSString *)buildNumber
|
||||
{
|
||||
if (!_buildNumber)
|
||||
_buildNumber = [[NSBundle mainBundle] infoDictionary][@"CFBundleVersion"];
|
||||
_buildNumber = NSBundle.mainBundle.infoDictionary[@"CFBundleVersion"];
|
||||
return _buildNumber;
|
||||
}
|
||||
|
||||
|
@ -194,7 +194,7 @@ NSDictionary * const kDeviceNamesWithMetalDriver = @{
|
|||
|
||||
- (NSString *)languageId
|
||||
{
|
||||
NSArray * languages = [NSLocale preferredLanguages];
|
||||
NSArray * languages = NSLocale.preferredLanguages;
|
||||
return languages.count == 0 ? nil : languages[0];
|
||||
}
|
||||
|
||||
|
@ -264,7 +264,7 @@ NSDictionary * const kDeviceNamesWithMetalDriver = @{
|
|||
if (UI_USER_INTERFACE_IDIOM() != UIUserInterfaceIdiomPhone)
|
||||
return NO;
|
||||
NSURL * telURL = [NSURL URLWithString:@"tel://"];
|
||||
if (![[UIApplication sharedApplication] canOpenURL:telURL])
|
||||
if (![UIApplication.sharedApplication canOpenURL:telURL])
|
||||
return NO;
|
||||
NSString * networkCode =
|
||||
[[CTTelephonyNetworkInfo alloc] init].subscriberCellularProvider.mobileNetworkCode;
|
||||
|
|
|
@ -32,7 +32,7 @@ using Observers = NSHashTable<Observer>;
|
|||
if (self)
|
||||
{
|
||||
_observers = [Observers weakObjectsHashTable];
|
||||
NSNotificationCenter * nc = [NSNotificationCenter defaultCenter];
|
||||
NSNotificationCenter * nc = NSNotificationCenter.defaultCenter;
|
||||
[nc addObserver:self
|
||||
selector:@selector(keyboardWillShow:)
|
||||
name:UIKeyboardWillShowNotification
|
||||
|
@ -46,7 +46,7 @@ using Observers = NSHashTable<Observer>;
|
|||
return self;
|
||||
}
|
||||
|
||||
- (void)dealloc { [[NSNotificationCenter defaultCenter] removeObserver:self]; }
|
||||
- (void)dealloc { [NSNotificationCenter.defaultCenter removeObserver:self]; }
|
||||
+ (CGFloat)keyboardHeight { return [self manager].keyboardHeight; }
|
||||
#pragma mark - Add/Remove Observers
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ static inline BOOL firstVersionIsLessThanSecond(NSString * first, NSString * sec
|
|||
|
||||
static inline BOOL isIOSVersionLessThan(NSString * version)
|
||||
{
|
||||
return firstVersionIsLessThanSecond([UIDevice currentDevice].systemVersion, version);
|
||||
return firstVersionIsLessThanSecond(UIDevice.currentDevice.systemVersion, version);
|
||||
}
|
||||
|
||||
static inline BOOL isIOSVersionLessThan(NSUInteger version)
|
||||
|
@ -32,7 +32,7 @@ static BOOL const isIOS8 = isIOSVersionLessThan(9);
|
|||
|
||||
static inline BOOL isInterfaceRightToLeft()
|
||||
{
|
||||
return [UIApplication sharedApplication].userInterfaceLayoutDirection ==
|
||||
return UIApplication.sharedApplication.userInterfaceLayoutDirection ==
|
||||
UIUserInterfaceLayoutDirectionRightToLeft;
|
||||
}
|
||||
|
||||
|
@ -50,14 +50,14 @@ static inline BOOL equalScreenDimensions(CGFloat left, CGFloat right)
|
|||
|
||||
static inline CGFloat statusBarHeight()
|
||||
{
|
||||
CGSize const statusBarSize = [UIApplication sharedApplication].statusBarFrame.size;
|
||||
CGSize const statusBarSize = UIApplication.sharedApplication.statusBarFrame.size;
|
||||
return MIN(statusBarSize.height, statusBarSize.width);
|
||||
}
|
||||
|
||||
static inline void setStatusBarBackgroundColor(UIColor * color)
|
||||
{
|
||||
UIView * statusBar =
|
||||
[[UIApplication sharedApplication] valueForKeyPath:@"statusBarWindow.statusBar"];
|
||||
[UIApplication.sharedApplication valueForKeyPath:@"statusBarWindow.statusBar"];
|
||||
if ([statusBar respondsToSelector:@selector(setBackgroundColor:)])
|
||||
statusBar.backgroundColor = color;
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@ static int gStorageSubscriptionId = kNotSubscribed;
|
|||
|
||||
+ (void)markEventAsAlreadyFired:(NSString *)event
|
||||
{
|
||||
NSUserDefaults * defaults = [NSUserDefaults standardUserDefaults];
|
||||
NSUserDefaults * defaults = NSUserDefaults.standardUserDefaults;
|
||||
[defaults setBool:YES forKey:event];
|
||||
[defaults synchronize];
|
||||
}
|
||||
|
@ -30,7 +30,7 @@ static int gStorageSubscriptionId = kNotSubscribed;
|
|||
// This notification is called exactly once upon a whole life time of the app.
|
||||
+ (void)applicationDidEnterBackgroundOnlyOnceInAnAppLifeTimeAtTheEndOfVeryFirstSession:(NSNotification *)notification
|
||||
{
|
||||
[[NSNotificationCenter defaultCenter] removeObserver:[MWMCustomFacebookEvents class]];
|
||||
[NSNotificationCenter.defaultCenter removeObserver:[MWMCustomFacebookEvents class]];
|
||||
NSInteger const seconds = [Alohalytics totalSecondsSpentInTheApp];
|
||||
if (seconds >= kFirstSessionLengthInSeconds)
|
||||
[FBSDKAppEvents logEvent:kFirstSessionIsLongerThanXMinutesEvent
|
||||
|
@ -40,7 +40,7 @@ static int gStorageSubscriptionId = kNotSubscribed;
|
|||
|
||||
+ (void)optimizeExpenses
|
||||
{
|
||||
NSUserDefaults * defaults = [NSUserDefaults standardUserDefaults];
|
||||
NSUserDefaults * defaults = NSUserDefaults.standardUserDefaults;
|
||||
BOOL const isFirstSession = [Alohalytics isFirstSession];
|
||||
if (isFirstSession)
|
||||
{
|
||||
|
@ -54,16 +54,21 @@ static int gStorageSubscriptionId = kNotSubscribed;
|
|||
// This one is fired when user spent more than kFirstSessionLengthInSeconds in the first session.
|
||||
if (isFirstSession && ![defaults boolForKey:kFirstSessionIsLongerThanXMinutesEvent])
|
||||
{
|
||||
[[NSNotificationCenter defaultCenter] addObserver:[MWMCustomFacebookEvents class]
|
||||
selector:@selector(applicationDidEnterBackgroundOnlyOnceInAnAppLifeTimeAtTheEndOfVeryFirstSession:)
|
||||
name:UIApplicationDidEnterBackgroundNotification
|
||||
object:nil];
|
||||
[NSNotificationCenter.defaultCenter
|
||||
addObserver:[MWMCustomFacebookEvents class]
|
||||
selector:
|
||||
@selector(
|
||||
applicationDidEnterBackgroundOnlyOnceInAnAppLifeTimeAtTheEndOfVeryFirstSession:
|
||||
)
|
||||
name:UIApplicationDidEnterBackgroundNotification
|
||||
object:nil];
|
||||
[MWMCustomFacebookEvents markEventAsAlreadyFired:kFirstSessionIsLongerThanXMinutesEvent];
|
||||
}
|
||||
// This event is fired when user launched app again in between kNextLaunchMinHoursInterval and kNextLaunchMaxHoursInterval.
|
||||
if (![defaults boolForKey:kNextLaunchAfterHoursInterval])
|
||||
{
|
||||
NSInteger const hoursFromFirstLaunch = (-[[Alohalytics firstLaunchDate] timeIntervalSinceNow]) / 3600;
|
||||
NSInteger const hoursFromFirstLaunch =
|
||||
(-[Alohalytics firstLaunchDate].timeIntervalSinceNow) / 3600;
|
||||
if (hoursFromFirstLaunch >= kNextLaunchMinHoursInterval)
|
||||
{
|
||||
[FBSDKAppEvents logEvent:kNextLaunchAfterHoursInterval];
|
||||
|
|
|
@ -91,7 +91,7 @@ void checkFlurryLogStatus(FlurryEventRecordStatus status)
|
|||
- (NSMutableDictionary *)addDefaultAttributesToParameters:(NSDictionary *)parameters
|
||||
{
|
||||
NSMutableDictionary * params = [parameters mutableCopy];
|
||||
BOOL isLandscape = UIDeviceOrientationIsLandscape([UIDevice currentDevice].orientation);
|
||||
BOOL isLandscape = UIDeviceOrientationIsLandscape(UIDevice.currentDevice.orientation);
|
||||
params[kStatOrientation] = isLandscape ? kStatLandscape : kStatPortrait;
|
||||
AppInfo * info = [AppInfo sharedInfo];
|
||||
params[kStatCountry] = info.countryCode;
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
self = [super initWithNibName:nil bundle:nil];
|
||||
if (self)
|
||||
{
|
||||
self.m_url = url;
|
||||
_m_url = url;
|
||||
if (title)
|
||||
self.navigationItem.title = title;
|
||||
}
|
||||
|
@ -19,10 +19,11 @@
|
|||
self = [super initWithNibName:nil bundle:nil];
|
||||
if (self)
|
||||
{
|
||||
htmlText = [htmlText stringByReplacingOccurrencesOfString:@"<body>" withString:@"<body><font face=\"helvetica\">"];
|
||||
htmlText = [htmlText stringByReplacingOccurrencesOfString:@"</body>" withString:@"</font></body>"];
|
||||
self.m_htmlText = htmlText;
|
||||
self.m_url = url;
|
||||
auto html = [htmlText stringByReplacingOccurrencesOfString:@"<body>"
|
||||
withString:@"<body><font face=\"helvetica\">"];
|
||||
html = [html stringByReplacingOccurrencesOfString:@"</body>" withString:@"</font></body>"];
|
||||
_m_htmlText = html;
|
||||
_m_url = url;
|
||||
if (title)
|
||||
self.navigationItem.title = title;
|
||||
}
|
||||
|
@ -35,7 +36,7 @@
|
|||
UIWebView * webView = [[UIWebView alloc] initWithFrame:frame];
|
||||
webView.autoresizesSubviews = YES;
|
||||
webView.autoresizingMask = (UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth);
|
||||
webView.backgroundColor = [UIColor whiteColor];
|
||||
webView.backgroundColor = UIColor.whiteColor;
|
||||
webView.delegate = self;
|
||||
|
||||
if (self.m_htmlText)
|
||||
|
@ -52,7 +53,7 @@
|
|||
&& ![inRequest.URL.scheme isEqualToString:@"applewebdata"]) // do not try to open local links in Safari
|
||||
{
|
||||
NSURL * url = [inRequest URL];
|
||||
[[UIApplication sharedApplication] openURL:url];
|
||||
[UIApplication.sharedApplication openURL:url];
|
||||
return NO;
|
||||
}
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ static inline NSString * formattedSpeedAndAltitude(CLLocation * location)
|
|||
[result appendString:[NSString stringWithFormat:@"%@ %@", @"\xE2\x96\xB2", @(measurement_utils::FormatAltitude(location.altitude).c_str())]];
|
||||
|
||||
// Speed is actual only for just received location
|
||||
if (location.speed > 0. && [location.timestamp timeIntervalSinceNow] >= -2.0)
|
||||
if (location.speed > 0. && location.timestamp.timeIntervalSinceNow >= -2.0)
|
||||
{
|
||||
if (result.length)
|
||||
[result appendString:@" "];
|
||||
|
|
|
@ -133,12 +133,12 @@ NSString * const kLocationPermissionRequestedKey = @"kLocationPermissionRequeste
|
|||
|
||||
BOOL isPermissionRequested()
|
||||
{
|
||||
return [[NSUserDefaults standardUserDefaults] boolForKey:kLocationPermissionRequestedKey];
|
||||
return [NSUserDefaults.standardUserDefaults boolForKey:kLocationPermissionRequestedKey];
|
||||
}
|
||||
|
||||
void setPermissionRequested()
|
||||
{
|
||||
NSUserDefaults * ud = [NSUserDefaults standardUserDefaults];
|
||||
NSUserDefaults * ud = NSUserDefaults.standardUserDefaults;
|
||||
[ud setBool:YES forKey:kLocationPermissionRequestedKey];
|
||||
[ud synchronize];
|
||||
}
|
||||
|
@ -183,7 +183,7 @@ void setPermissionRequested()
|
|||
|
||||
- (void)dealloc
|
||||
{
|
||||
[[NSNotificationCenter defaultCenter] removeObserver:self];
|
||||
[NSNotificationCenter.defaultCenter removeObserver:self];
|
||||
self.locationManager.delegate = nil;
|
||||
}
|
||||
+ (void)start { [self manager].started = YES; }
|
||||
|
@ -371,8 +371,7 @@ void setPermissionRequested()
|
|||
|
||||
- (void)orientationChanged
|
||||
{
|
||||
self.locationManager.headingOrientation =
|
||||
(CLDeviceOrientation)[UIDevice currentDevice].orientation;
|
||||
self.locationManager.headingOrientation = (CLDeviceOrientation)UIDevice.currentDevice.orientation;
|
||||
}
|
||||
|
||||
- (void)batteryStateChangedNotification:(NSNotification *)notification
|
||||
|
@ -405,7 +404,7 @@ void setPermissionRequested()
|
|||
|
||||
- (void)refreshGeoModeSettings
|
||||
{
|
||||
UIDeviceBatteryState const state = [UIDevice currentDevice].batteryState;
|
||||
UIDeviceBatteryState const state = UIDevice.currentDevice.batteryState;
|
||||
BOOL const isCharging =
|
||||
(state == UIDeviceBatteryStateCharging || state == UIDeviceBatteryStateFull);
|
||||
GeoModeSettings const settings = kGeoSettings.at(self.geoMode);
|
||||
|
@ -462,7 +461,7 @@ void setPermissionRequested()
|
|||
{
|
||||
if (_started == started)
|
||||
return;
|
||||
NSNotificationCenter * notificationCenter = [NSNotificationCenter defaultCenter];
|
||||
NSNotificationCenter * notificationCenter = NSNotificationCenter.defaultCenter;
|
||||
if (started)
|
||||
{
|
||||
_started = [self start];
|
||||
|
|
|
@ -28,7 +28,7 @@ void CallPartnersApi(platform::PartnersApiFn fn, bool force)
|
|||
}
|
||||
|
||||
auto checkAndApply = ^bool {
|
||||
NSUserDefaults * ud = [NSUserDefaults standardUserDefaults];
|
||||
NSUserDefaults * ud = NSUserDefaults.standardUserDefaults;
|
||||
NSDate * policyDate = [ud objectForKey:kNetworkingPolicyTimeStamp];
|
||||
if ([policyDate compare:[NSDate date]] == NSOrderedDescending)
|
||||
{
|
||||
|
@ -57,7 +57,7 @@ void CallPartnersApi(platform::PartnersApiFn fn, bool force)
|
|||
|
||||
void SetStage(np::Stage state)
|
||||
{
|
||||
NSUserDefaults * ud = [NSUserDefaults standardUserDefaults];
|
||||
NSUserDefaults * ud = NSUserDefaults.standardUserDefaults;
|
||||
NSDate * policyDate = nil;
|
||||
switch (state)
|
||||
{
|
||||
|
@ -72,7 +72,7 @@ void SetStage(np::Stage state)
|
|||
|
||||
np::Stage GetStage()
|
||||
{
|
||||
NSUserDefaults * ud = [NSUserDefaults standardUserDefaults];
|
||||
NSUserDefaults * ud = NSUserDefaults.standardUserDefaults;
|
||||
NSDate * policyDate = [ud objectForKey:kNetworkingPolicyTimeStamp];
|
||||
if ([policyDate isEqualToDate:NSDate.distantFuture])
|
||||
return np::Stage::Always;
|
||||
|
@ -90,7 +90,7 @@ bool CanUseNetwork()
|
|||
case ct::CONNECTION_WIFI: return true;
|
||||
case ct::CONNECTION_WWAN:
|
||||
{
|
||||
NSUserDefaults * ud = [NSUserDefaults standardUserDefaults];
|
||||
NSUserDefaults * ud = NSUserDefaults.standardUserDefaults;
|
||||
NSDate * policyDate = [ud objectForKey:kNetworkingPolicyTimeStamp];
|
||||
return [policyDate compare:[NSDate date]] == NSOrderedDescending;
|
||||
}
|
||||
|
|
|
@ -99,7 +99,7 @@ using namespace storage;
|
|||
{
|
||||
if (!countryId || countryId.length == 0)
|
||||
return NO;
|
||||
NSUserDefaults * ud = [NSUserDefaults standardUserDefaults];
|
||||
NSUserDefaults * ud = NSUserDefaults.standardUserDefaults;
|
||||
NSDictionary<NSString *, NSDate *> * flags = [ud objectForKey:kFlagsKey];
|
||||
NSDate * lastShowDate = flags[countryId];
|
||||
return !lastShowDate ||
|
||||
|
@ -109,7 +109,7 @@ using namespace storage;
|
|||
|
||||
- (void)markNotificationShownForCountryId:(NSString *)countryId
|
||||
{
|
||||
NSUserDefaults * ud = [NSUserDefaults standardUserDefaults];
|
||||
NSUserDefaults * ud = NSUserDefaults.standardUserDefaults;
|
||||
NSMutableDictionary<NSString *, NSDate *> * flags = [[ud objectForKey:kFlagsKey] mutableCopy];
|
||||
if (!flags)
|
||||
flags = [NSMutableDictionary dictionary];
|
||||
|
@ -157,11 +157,11 @@ using namespace storage;
|
|||
UIBackgroundFetchResult result = UIBackgroundFetchResultNoData;
|
||||
|
||||
BOOL const inBackground =
|
||||
[UIApplication sharedApplication].applicationState == UIApplicationStateBackground;
|
||||
UIApplication.sharedApplication.applicationState == UIApplicationStateBackground;
|
||||
BOOL const onWiFi = (Platform::ConnectionStatus() == Platform::EConnectionType::CONNECTION_WIFI);
|
||||
if (inBackground && onWiFi)
|
||||
{
|
||||
CLLocation * lastLocation = [locations lastObject];
|
||||
CLLocation * lastLocation = locations.lastObject;
|
||||
auto const & mercator = lastLocation.mercator;
|
||||
auto & f = GetFramework();
|
||||
auto const & countryInfoGetter = f.GetCountryInfoGetter();
|
||||
|
@ -179,7 +179,7 @@ using namespace storage;
|
|||
notification.userInfo =
|
||||
@{kDownloadMapActionKey : kDownloadMapActionName, kDownloadMapCountryId : countryId};
|
||||
|
||||
UIApplication * application = [UIApplication sharedApplication];
|
||||
UIApplication * application = UIApplication.sharedApplication;
|
||||
[application presentLocalNotificationNow:notification];
|
||||
|
||||
[Alohalytics logEvent:@"suggestedToDownloadMissingMapForCurrentLocation"
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
#import "MWMPushNotifications.h"
|
||||
#import "MWMCommon.h"
|
||||
#import <Crashlytics/Crashlytics.h>
|
||||
#import <Pushwoosh/PushNotificationManager.h>
|
||||
#import <UserNotifications/UserNotifications.h>
|
||||
#import "MWMCommon.h"
|
||||
#import "Statistics.h"
|
||||
|
||||
#import "3party/Alohalytics/src/alohalytics_objc.h"
|
||||
|
@ -62,12 +63,12 @@ NSString * const kPushDeviceTokenLogEvent = @"iOSPushDeviceToken";
|
|||
+ (BOOL)handleURLPush:(NSDictionary *)userInfo
|
||||
{
|
||||
auto app = UIApplication.sharedApplication;
|
||||
NSLog(@"Handle url push");
|
||||
NSLog(@"User info: %@", userInfo);
|
||||
CLS_LOG(@"Handle url push");
|
||||
CLS_LOG(@"User info: %@", userInfo);
|
||||
if (app.applicationState != UIApplicationStateInactive)
|
||||
return NO;
|
||||
NSString * openLink = userInfo[@"openURL"];
|
||||
NSLog(@"Push's url: %@", openLink);
|
||||
CLS_LOG(@"Push's url: %@", openLink);
|
||||
if (!openLink)
|
||||
return NO;
|
||||
NSURL * url = [NSURL URLWithString:openLink];
|
||||
|
|
|
@ -134,7 +134,7 @@ void logPointEvent(MWMRoutePoint * point, NSString * eventType)
|
|||
}
|
||||
|
||||
[taxiDataSource taxiURL:^(NSURL * url) {
|
||||
[[UIApplication sharedApplication] openURL:url];
|
||||
[UIApplication.sharedApplication openURL:url];
|
||||
}];
|
||||
}
|
||||
|
||||
|
@ -484,7 +484,7 @@ void logPointEvent(MWMRoutePoint * point, NSString * eventType)
|
|||
[self clearAltitudeImagesData];
|
||||
rm.CloseRouting(removeRoutePoints);
|
||||
[MWMThemeManager setAutoUpdates:NO];
|
||||
[MapsAppDelegate.theApp showAlertIfRequired];
|
||||
[[MapsAppDelegate theApp] showAlertIfRequired];
|
||||
}
|
||||
|
||||
- (void)updateFollowingInfo
|
||||
|
|
|
@ -123,7 +123,7 @@ NSString * const kSpotlightLocaleLanguageId = @"SpotlightLocaleLanguageId";
|
|||
|
||||
+ (MWMTheme)theme
|
||||
{
|
||||
auto ud = [NSUserDefaults standardUserDefaults];
|
||||
auto ud = NSUserDefaults.standardUserDefaults;
|
||||
if (![ud boolForKey:kUDAutoNightModeOff])
|
||||
return MWMThemeAuto;
|
||||
return static_cast<MWMTheme>([ud integerForKey:kThemeMode]);
|
||||
|
@ -133,7 +133,7 @@ NSString * const kSpotlightLocaleLanguageId = @"SpotlightLocaleLanguageId";
|
|||
{
|
||||
if ([self theme] == theme)
|
||||
return;
|
||||
auto ud = [NSUserDefaults standardUserDefaults];
|
||||
auto ud = NSUserDefaults.standardUserDefaults;
|
||||
[ud setInteger:theme forKey:kThemeMode];
|
||||
BOOL const autoOff = theme != MWMThemeAuto;
|
||||
[ud setBool:autoOff forKey:kUDAutoNightModeOff];
|
||||
|
@ -150,12 +150,12 @@ NSString * const kSpotlightLocaleLanguageId = @"SpotlightLocaleLanguageId";
|
|||
+ (void)setRoutingDisclaimerApproved { settings::Set(kRoutingDisclaimerApprovedKey, true); }
|
||||
+ (NSString *)spotlightLocaleLanguageId
|
||||
{
|
||||
return [[NSUserDefaults standardUserDefaults] stringForKey:kSpotlightLocaleLanguageId];
|
||||
return [NSUserDefaults.standardUserDefaults stringForKey:kSpotlightLocaleLanguageId];
|
||||
}
|
||||
|
||||
+ (void)setSpotlightLocaleLanguageId:(NSString *)spotlightLocaleLanguageId
|
||||
{
|
||||
NSUserDefaults * ud = [NSUserDefaults standardUserDefaults];
|
||||
NSUserDefaults * ud = NSUserDefaults.standardUserDefaults;
|
||||
[ud setObject:spotlightLocaleLanguageId forKey:kSpotlightLocaleLanguageId];
|
||||
[ud synchronize];
|
||||
}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#import <AVFoundation/AVFoundation.h>
|
||||
#import <Crashlytics/Crashlytics.h>
|
||||
#import "MWMCommon.h"
|
||||
#import "MWMRouter.h"
|
||||
#import "MWMTextToSpeech+CPP.h"
|
||||
|
@ -23,7 +24,7 @@ std::vector<std::pair<string, string>> availableLanguages()
|
|||
NSArray<AVSpeechSynthesisVoice *> * voices = [AVSpeechSynthesisVoice speechVoices];
|
||||
std::vector<std::pair<string, string>> native;
|
||||
for (AVSpeechSynthesisVoice * v in voices)
|
||||
native.emplace_back(make_pair(bcp47ToTwineLanguage(v.language), [v.language UTF8String]));
|
||||
native.emplace_back(make_pair(bcp47ToTwineLanguage(v.language), v.language.UTF8String));
|
||||
|
||||
using namespace routing::turns::sound;
|
||||
std::vector<std::pair<string, string>> result;
|
||||
|
@ -74,8 +75,9 @@ using Observers = NSHashTable<Observer>;
|
|||
|
||||
+ (void)applicationDidBecomeActive
|
||||
{
|
||||
[MWMTextToSpeech tts].speechSynthesizer = nil;
|
||||
[MWMTextToSpeech tts].speechVoice = nil;
|
||||
auto tts = [self tts];
|
||||
tts.speechSynthesizer = nil;
|
||||
tts.speechVoice = nil;
|
||||
}
|
||||
|
||||
- (instancetype)initTTS
|
||||
|
@ -94,7 +96,7 @@ using Observers = NSHashTable<Observer>;
|
|||
preferedLanguageBcp47 = [AVSpeechSynthesisVoice currentLanguageCode];
|
||||
|
||||
std::pair<string, string> const lan =
|
||||
make_pair([preferedLanguageBcp47 UTF8String],
|
||||
make_pair(preferedLanguageBcp47.UTF8String,
|
||||
tts::translatedTwine(bcp47ToTwineLanguage(preferedLanguageBcp47)));
|
||||
|
||||
if (find(_availableLanguages.begin(), _availableLanguages.end(), lan) !=
|
||||
|
@ -131,25 +133,25 @@ using Observers = NSHashTable<Observer>;
|
|||
{
|
||||
[Statistics logEvent:kStatEventName(kStatTTSSettings, kStatChangeLanguage)
|
||||
withParameters:@{kStatValue : locale}];
|
||||
NSUserDefaults * ud = [NSUserDefaults standardUserDefaults];
|
||||
NSUserDefaults * ud = NSUserDefaults.standardUserDefaults;
|
||||
[ud setObject:locale forKey:kUserDefaultsTTSLanguageBcp47];
|
||||
[ud synchronize];
|
||||
[self createVoice:locale];
|
||||
}
|
||||
|
||||
- (BOOL)isValid { return _speechSynthesizer != nil && _speechVoice != nil; }
|
||||
+ (BOOL)isTTSEnabled { return [[NSUserDefaults standardUserDefaults] boolForKey:kIsTTSEnabled]; }
|
||||
+ (BOOL)isTTSEnabled { return [NSUserDefaults.standardUserDefaults boolForKey:kIsTTSEnabled]; }
|
||||
+ (void)setTTSEnabled:(BOOL)enabled
|
||||
{
|
||||
if ([self isTTSEnabled] == enabled)
|
||||
return;
|
||||
auto tts = [self tts];
|
||||
if (!enabled)
|
||||
[[self tts] setActive:NO];
|
||||
NSUserDefaults * ud = [NSUserDefaults standardUserDefaults];
|
||||
[tts setActive:NO];
|
||||
NSUserDefaults * ud = NSUserDefaults.standardUserDefaults;
|
||||
[ud setBool:enabled forKey:kIsTTSEnabled];
|
||||
[ud synchronize];
|
||||
|
||||
auto tts = [MWMTextToSpeech tts];
|
||||
[tts onTTSStatusUpdated];
|
||||
if (enabled)
|
||||
[tts setActive:YES];
|
||||
|
@ -160,7 +162,7 @@ using Observers = NSHashTable<Observer>;
|
|||
if (![[self class] isTTSEnabled] || self.active == active)
|
||||
return;
|
||||
if (active && ![self isValid])
|
||||
[self createVoice:[MWMTextToSpeech savedLanguage]];
|
||||
[self createVoice:[[self class] savedLanguage]];
|
||||
[self setAudioSessionActive:active];
|
||||
[MWMRouter enableTurnNotifications:active];
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
|
@ -171,7 +173,7 @@ using Observers = NSHashTable<Observer>;
|
|||
- (BOOL)active { return [[self class] isTTSEnabled] && [MWMRouter areTurnNotificationsEnabled]; }
|
||||
+ (NSString *)savedLanguage
|
||||
{
|
||||
return [[NSUserDefaults standardUserDefaults] stringForKey:kUserDefaultsTTSLanguageBcp47];
|
||||
return [NSUserDefaults.standardUserDefaults stringForKey:kUserDefaultsTTSLanguageBcp47];
|
||||
}
|
||||
|
||||
- (void)createVoice:(NSString *)locale
|
||||
|
@ -228,7 +230,7 @@ using Observers = NSHashTable<Observer>;
|
|||
|
||||
- (void)speakOneString:(NSString *)textToSpeak
|
||||
{
|
||||
NSLog(@"Speak text: %@", textToSpeak);
|
||||
CLS_LOG(@"Speak text: %@", textToSpeak);
|
||||
AVSpeechUtterance * utterance = [AVSpeechUtterance speechUtteranceWithString:textToSpeak];
|
||||
utterance.voice = self.speechVoice;
|
||||
utterance.rate = self.speechRate;
|
||||
|
@ -241,7 +243,7 @@ using Observers = NSHashTable<Observer>;
|
|||
return;
|
||||
|
||||
if (self.active && ![self isValid])
|
||||
[self createVoice:[MWMTextToSpeech savedLanguage]];
|
||||
[self createVoice:[[self class] savedLanguage]];
|
||||
|
||||
if (!self.active || ![self isValid])
|
||||
return;
|
||||
|
@ -277,12 +279,12 @@ using Observers = NSHashTable<Observer>;
|
|||
|
||||
+ (void)addObserver:(id<MWMTextToSpeechObserver>)observer
|
||||
{
|
||||
[[MWMTextToSpeech tts].observers addObject:observer];
|
||||
[[self tts].observers addObject:observer];
|
||||
}
|
||||
|
||||
+ (void)removeObserver:(id<MWMTextToSpeechObserver>)observer
|
||||
{
|
||||
[[MWMTextToSpeech tts].observers removeObject:observer];
|
||||
[[self tts].observers removeObject:observer];
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
@ -1779,7 +1779,7 @@
|
|||
340474EC1E08199D00C92850 /* MWMMyTargetDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMMyTargetDelegate.h; sourceTree = "<group>"; };
|
||||
340474EE1E08199D00C92850 /* MyTrackerSDK.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = MyTrackerSDK.framework; sourceTree = "<group>"; };
|
||||
340475151E081A4600C92850 /* AppInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppInfo.h; sourceTree = "<group>"; };
|
||||
340475161E081A4600C92850 /* AppInfo.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = AppInfo.mm; sourceTree = "<group>"; };
|
||||
340475161E081A4600C92850 /* AppInfo.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; lineEnding = 0; path = AppInfo.mm; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
|
||||
340475181E081A4600C92850 /* MWMKeyboard.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMKeyboard.h; sourceTree = "<group>"; };
|
||||
340475191E081A4600C92850 /* MWMKeyboard.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMKeyboard.mm; sourceTree = "<group>"; };
|
||||
3404751A1E081A4600C92850 /* MWMKeyboardObserver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMKeyboardObserver.h; sourceTree = "<group>"; };
|
||||
|
@ -1905,7 +1905,7 @@
|
|||
3454D7A21E07F045004AF2AD /* UIButton+RuntimeAttributes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIButton+RuntimeAttributes.h"; sourceTree = "<group>"; };
|
||||
3454D7A31E07F045004AF2AD /* UIButton+RuntimeAttributes.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = "UIButton+RuntimeAttributes.mm"; sourceTree = "<group>"; };
|
||||
3454D7A41E07F045004AF2AD /* UIColor+MapsMeColor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIColor+MapsMeColor.h"; sourceTree = "<group>"; };
|
||||
3454D7A51E07F045004AF2AD /* UIColor+MapsMeColor.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = "UIColor+MapsMeColor.mm"; sourceTree = "<group>"; };
|
||||
3454D7A51E07F045004AF2AD /* UIColor+MapsMeColor.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; lineEnding = 0; path = "UIColor+MapsMeColor.mm"; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
|
||||
3454D7A61E07F045004AF2AD /* UIFont+MapsMeFonts.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIFont+MapsMeFonts.h"; sourceTree = "<group>"; };
|
||||
3454D7A71E07F045004AF2AD /* UIFont+MapsMeFonts.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = "UIFont+MapsMeFonts.mm"; sourceTree = "<group>"; };
|
||||
3454D7A81E07F045004AF2AD /* UIImage+RGBAData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIImage+RGBAData.h"; sourceTree = "<group>"; };
|
||||
|
@ -1913,7 +1913,7 @@
|
|||
3454D7AA1E07F045004AF2AD /* UIImageView+Coloring.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIImageView+Coloring.h"; sourceTree = "<group>"; };
|
||||
3454D7AB1E07F045004AF2AD /* UIImageView+Coloring.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = "UIImageView+Coloring.mm"; sourceTree = "<group>"; };
|
||||
3454D7AC1E07F045004AF2AD /* UIKitCategories.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIKitCategories.h; sourceTree = "<group>"; };
|
||||
3454D7AD1E07F045004AF2AD /* UIKitCategories.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = UIKitCategories.mm; sourceTree = "<group>"; };
|
||||
3454D7AD1E07F045004AF2AD /* UIKitCategories.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; lineEnding = 0; path = UIKitCategories.mm; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
|
||||
3454D7AE1E07F045004AF2AD /* UILabel+RuntimeAttributes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UILabel+RuntimeAttributes.h"; sourceTree = "<group>"; };
|
||||
3454D7AF1E07F045004AF2AD /* UILabel+RuntimeAttributes.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = "UILabel+RuntimeAttributes.mm"; sourceTree = "<group>"; };
|
||||
3454D7B01E07F045004AF2AD /* UISwitch+RuntimeAttributes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UISwitch+RuntimeAttributes.h"; sourceTree = "<group>"; };
|
||||
|
@ -1928,7 +1928,7 @@
|
|||
34574A651E3B85F80061E839 /* ThemeManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ThemeManager.swift; sourceTree = "<group>"; };
|
||||
3457C4241F680F1900028233 /* String+BoundingRect.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "String+BoundingRect.swift"; sourceTree = "<group>"; };
|
||||
3462258C1DDC5DB9001E8752 /* MWMSearchNoResultsAlert.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMSearchNoResultsAlert.h; sourceTree = "<group>"; };
|
||||
3462258D1DDC5DBA001E8752 /* MWMSearchNoResultsAlert.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMSearchNoResultsAlert.mm; sourceTree = "<group>"; };
|
||||
3462258D1DDC5DBA001E8752 /* MWMSearchNoResultsAlert.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; lineEnding = 0; path = MWMSearchNoResultsAlert.mm; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
|
||||
346225901DDC5FBA001E8752 /* MWMSearchNoResultsAlert.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMSearchNoResultsAlert.xib; sourceTree = "<group>"; };
|
||||
3463BA631DE81DB90082417F /* MWMTrafficButtonViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMTrafficButtonViewController.h; sourceTree = "<group>"; };
|
||||
3463BA641DE81DB90082417F /* MWMTrafficButtonViewController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMTrafficButtonViewController.mm; sourceTree = "<group>"; };
|
||||
|
@ -1979,7 +1979,7 @@
|
|||
34845DB51E166084003D55B9 /* Common.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Common.swift; sourceTree = "<group>"; };
|
||||
3486B5031E27948F0069C126 /* MWMMyPositionMode.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MWMMyPositionMode.h; sourceTree = "<group>"; };
|
||||
3486B5051E27A4B50069C126 /* LocalNotificationManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LocalNotificationManager.h; sourceTree = "<group>"; };
|
||||
3486B5061E27A4B50069C126 /* LocalNotificationManager.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = LocalNotificationManager.mm; sourceTree = "<group>"; };
|
||||
3486B5061E27A4B50069C126 /* LocalNotificationManager.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; lineEnding = 0; path = LocalNotificationManager.mm; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
|
||||
3486B50A1E27A4C50069C126 /* MWMPushNotifications.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MWMPushNotifications.h; sourceTree = "<group>"; };
|
||||
3486B50B1E27A6DA0069C126 /* MWMPushNotifications.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMPushNotifications.mm; sourceTree = "<group>"; };
|
||||
3486B5101E27AD3B0069C126 /* Framework.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Framework.cpp; sourceTree = "<group>"; };
|
||||
|
@ -2011,7 +2011,7 @@
|
|||
349993F81F388F970064CFBE /* RouteManageriPadPresentationController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RouteManageriPadPresentationController.swift; sourceTree = "<group>"; };
|
||||
349993F91F388F970064CFBE /* RouteManageriPhonePresentationController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RouteManageriPhonePresentationController.swift; sourceTree = "<group>"; };
|
||||
349A137F1DEC138C00C7DB60 /* MWMMobileInternetAlert.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMMobileInternetAlert.h; sourceTree = "<group>"; };
|
||||
349A13801DEC138C00C7DB60 /* MWMMobileInternetAlert.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMMobileInternetAlert.mm; sourceTree = "<group>"; };
|
||||
349A13801DEC138C00C7DB60 /* MWMMobileInternetAlert.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; lineEnding = 0; path = MWMMobileInternetAlert.mm; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
|
||||
349A13811DEC138C00C7DB60 /* MWMMobileInternetAlert.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMMobileInternetAlert.xib; sourceTree = "<group>"; };
|
||||
349A35751B53D4C9009677EE /* MWMCircularProgress.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMCircularProgress.h; sourceTree = "<group>"; };
|
||||
349A35761B53D4C9009677EE /* MWMCircularProgress.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMCircularProgress.mm; sourceTree = "<group>"; };
|
||||
|
@ -2312,15 +2312,15 @@
|
|||
F6150E4F1EFA7352000B955D /* MWUGCCommentsController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWUGCCommentsController.mm; sourceTree = "<group>"; };
|
||||
F6150E501EFA7352000B955D /* MWUGCCommentsController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWUGCCommentsController.xib; sourceTree = "<group>"; };
|
||||
F61579321AC2CE9A0032D8E9 /* MWMRateAlert.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMRateAlert.h; sourceTree = "<group>"; };
|
||||
F61579331AC2CE9A0032D8E9 /* MWMRateAlert.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMRateAlert.mm; sourceTree = "<group>"; };
|
||||
F61579331AC2CE9A0032D8E9 /* MWMRateAlert.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; lineEnding = 0; path = MWMRateAlert.mm; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
|
||||
F61579351AC2CEB60032D8E9 /* MWMRateAlert.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMRateAlert.xib; sourceTree = "<group>"; };
|
||||
F623DA6A1C9C2731006A3436 /* opening_hours_how_to_edit.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; name = opening_hours_how_to_edit.html; path = ../../data/opening_hours_how_to_edit.html; sourceTree = "<group>"; };
|
||||
F626D52C1C3E6CAA00C17D15 /* MWMTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMTableViewCell.h; sourceTree = "<group>"; };
|
||||
F626D52D1C3E6CAA00C17D15 /* MWMTableViewCell.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMTableViewCell.mm; sourceTree = "<group>"; };
|
||||
F63774E61B59375E00BCF54D /* MWMRoutingDisclaimerAlert.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMRoutingDisclaimerAlert.xib; sourceTree = "<group>"; };
|
||||
F63774E81B59376F00BCF54D /* MWMRoutingDisclaimerAlert.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMRoutingDisclaimerAlert.h; sourceTree = "<group>"; };
|
||||
F63774E91B59376F00BCF54D /* MWMRoutingDisclaimerAlert.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMRoutingDisclaimerAlert.mm; sourceTree = "<group>"; };
|
||||
F6381BF41CD12045004CA943 /* LocaleTranslator.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = LocaleTranslator.mm; sourceTree = "<group>"; };
|
||||
F63774E91B59376F00BCF54D /* MWMRoutingDisclaimerAlert.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; lineEnding = 0; path = MWMRoutingDisclaimerAlert.mm; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
|
||||
F6381BF41CD12045004CA943 /* LocaleTranslator.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; lineEnding = 0; path = LocaleTranslator.mm; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
|
||||
F63AF5041EA6162400A1DB98 /* FilterTypeCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FilterTypeCell.swift; sourceTree = "<group>"; };
|
||||
F63AF5091EA6213F00A1DB98 /* FilterRatingCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FilterRatingCell.swift; sourceTree = "<group>"; };
|
||||
F63AF50D1EA6215100A1DB98 /* FilterPriceCategoryCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FilterPriceCategoryCell.swift; sourceTree = "<group>"; };
|
||||
|
@ -2329,7 +2329,7 @@
|
|||
F64324791EF82AD9009296F9 /* UGCSelectImpressionCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UGCSelectImpressionCell.swift; sourceTree = "<group>"; };
|
||||
F643247D1EF82B21009296F9 /* UGCSelectImpressionCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = UGCSelectImpressionCell.xib; sourceTree = "<group>"; };
|
||||
F64D9C9D1C899C350063FA30 /* MWMEditorViralAlert.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMEditorViralAlert.h; sourceTree = "<group>"; };
|
||||
F64D9C9E1C899C350063FA30 /* MWMEditorViralAlert.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMEditorViralAlert.mm; sourceTree = "<group>"; };
|
||||
F64D9C9E1C899C350063FA30 /* MWMEditorViralAlert.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; lineEnding = 0; path = MWMEditorViralAlert.mm; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
|
||||
F64D9CA11C899C760063FA30 /* MWMEditorViralAlert.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMEditorViralAlert.xib; sourceTree = "<group>"; };
|
||||
F64F19811AB81A00006EAF7E /* MWMAlertViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMAlertViewController.h; sourceTree = "<group>"; };
|
||||
F64F19821AB81A00006EAF7E /* MWMAlertViewController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMAlertViewController.mm; sourceTree = "<group>"; };
|
||||
|
@ -2337,22 +2337,22 @@
|
|||
F64F19851AB81A00006EAF7E /* MWMAlert.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMAlert.h; sourceTree = "<group>"; };
|
||||
F64F19861AB81A00006EAF7E /* MWMAlert.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMAlert.mm; sourceTree = "<group>"; };
|
||||
F64F198A1AB81A00006EAF7E /* MWMDefaultAlert.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMDefaultAlert.h; sourceTree = "<group>"; };
|
||||
F64F198B1AB81A00006EAF7E /* MWMDefaultAlert.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMDefaultAlert.mm; sourceTree = "<group>"; };
|
||||
F64F198B1AB81A00006EAF7E /* MWMDefaultAlert.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; lineEnding = 0; path = MWMDefaultAlert.mm; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
|
||||
F64F198C1AB81A00006EAF7E /* MWMDefaultAlert.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMDefaultAlert.xib; sourceTree = "<group>"; };
|
||||
F64F19961AB81A00006EAF7E /* MWMDownloadTransitMapAlert.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMDownloadTransitMapAlert.h; sourceTree = "<group>"; };
|
||||
F64F19971AB81A00006EAF7E /* MWMDownloadTransitMapAlert.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMDownloadTransitMapAlert.mm; sourceTree = "<group>"; };
|
||||
F64F19971AB81A00006EAF7E /* MWMDownloadTransitMapAlert.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; lineEnding = 0; path = MWMDownloadTransitMapAlert.mm; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
|
||||
F64F19981AB81A00006EAF7E /* MWMDownloadTransitMapAlert.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMDownloadTransitMapAlert.xib; sourceTree = "<group>"; };
|
||||
F64F4B6B1B46A51F0081A24A /* MWMDownloaderDialogCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMDownloaderDialogCell.h; sourceTree = "<group>"; };
|
||||
F64F4B6C1B46A51F0081A24A /* MWMDownloaderDialogCell.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMDownloaderDialogCell.mm; sourceTree = "<group>"; };
|
||||
F64F4B6E1B46A5380081A24A /* MWMDownloaderDialogCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMDownloaderDialogCell.xib; sourceTree = "<group>"; };
|
||||
F64F4B701B4A41D40081A24A /* MWMDownloaderDialogHeader.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMDownloaderDialogHeader.xib; sourceTree = "<group>"; };
|
||||
F64F4B721B4A45FD0081A24A /* MWMDownloaderDialogHeader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMDownloaderDialogHeader.h; sourceTree = "<group>"; };
|
||||
F64F4B731B4A45FD0081A24A /* MWMDownloaderDialogHeader.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMDownloaderDialogHeader.mm; sourceTree = "<group>"; };
|
||||
F64F4B731B4A45FD0081A24A /* MWMDownloaderDialogHeader.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; lineEnding = 0; path = MWMDownloaderDialogHeader.mm; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
|
||||
F652B2E91C6DE8E500D20C8C /* MWMDropDown.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMDropDown.xib; sourceTree = "<group>"; };
|
||||
F653CE0F1C6DEB5A00A453F1 /* MWMDropDown.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMDropDown.h; sourceTree = "<group>"; };
|
||||
F653CE101C6DEB5A00A453F1 /* MWMDropDown.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMDropDown.mm; sourceTree = "<group>"; };
|
||||
F653CE141C71F60200A453F1 /* MWMAddPlaceNavigationBar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMAddPlaceNavigationBar.h; sourceTree = "<group>"; };
|
||||
F653CE151C71F60200A453F1 /* MWMAddPlaceNavigationBar.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMAddPlaceNavigationBar.mm; sourceTree = "<group>"; };
|
||||
F653CE151C71F60200A453F1 /* MWMAddPlaceNavigationBar.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; lineEnding = 0; path = MWMAddPlaceNavigationBar.mm; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
|
||||
F653CE171C71F62400A453F1 /* MWMAddPlaceNavigationBar.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMAddPlaceNavigationBar.xib; sourceTree = "<group>"; };
|
||||
F6558D9F1E642CC0002203AE /* MWMFacilitiesController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMFacilitiesController.h; sourceTree = "<group>"; };
|
||||
F6558DA01E642CC0002203AE /* MWMFacilitiesController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMFacilitiesController.mm; sourceTree = "<group>"; };
|
||||
|
@ -2386,13 +2386,13 @@
|
|||
F6B97B251CD0CA990009B612 /* MWMBookmarkNameCell.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMBookmarkNameCell.mm; sourceTree = "<group>"; };
|
||||
F6B97B281CD0CB170009B612 /* MWMBookmarkNameCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMBookmarkNameCell.xib; sourceTree = "<group>"; };
|
||||
F6BBF2C41B4FFB72000CF8E2 /* MWMLocationAlert.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMLocationAlert.h; sourceTree = "<group>"; };
|
||||
F6BBF2C51B4FFB72000CF8E2 /* MWMLocationAlert.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMLocationAlert.mm; sourceTree = "<group>"; };
|
||||
F6BBF2C51B4FFB72000CF8E2 /* MWMLocationAlert.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; lineEnding = 0; path = MWMLocationAlert.mm; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
|
||||
F6BBF2C71B4FFB8C000CF8E2 /* MWMLocationAlert.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMLocationAlert.xib; sourceTree = "<group>"; };
|
||||
F6BC1E501ACBF98600EF0360 /* MWMFacebookAlert.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMFacebookAlert.h; sourceTree = "<group>"; };
|
||||
F6BC1E511ACBF98600EF0360 /* MWMFacebookAlert.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMFacebookAlert.mm; sourceTree = "<group>"; };
|
||||
F6BC1E511ACBF98600EF0360 /* MWMFacebookAlert.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; lineEnding = 0; path = MWMFacebookAlert.mm; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
|
||||
F6BC1E531ACBF9AB00EF0360 /* MWMFacebookAlert.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMFacebookAlert.xib; sourceTree = "<group>"; };
|
||||
F6BD1D1E1CA412920047B8E8 /* MWMOsmAuthAlert.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMOsmAuthAlert.h; sourceTree = "<group>"; };
|
||||
F6BD1D1F1CA412920047B8E8 /* MWMOsmAuthAlert.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMOsmAuthAlert.mm; sourceTree = "<group>"; };
|
||||
F6BD1D1F1CA412920047B8E8 /* MWMOsmAuthAlert.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; lineEnding = 0; path = MWMOsmAuthAlert.mm; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
|
||||
F6BD1D221CA412E30047B8E8 /* MWMOsmAuthAlert.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMOsmAuthAlert.xib; sourceTree = "<group>"; };
|
||||
F6BD33851B62412E00F2CE18 /* MWMNavigationDashboardEntity.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMNavigationDashboardEntity.h; sourceTree = "<group>"; };
|
||||
F6BD33861B62412E00F2CE18 /* MWMNavigationDashboardEntity.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMNavigationDashboardEntity.mm; sourceTree = "<group>"; };
|
||||
|
@ -2452,11 +2452,11 @@
|
|||
F6E2FC371E097B9F0083EBEC /* MWMCuisineEditorViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMCuisineEditorViewController.h; sourceTree = "<group>"; };
|
||||
F6E2FC381E097B9F0083EBEC /* MWMCuisineEditorViewController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMCuisineEditorViewController.mm; sourceTree = "<group>"; };
|
||||
F6E2FC401E097B9F0083EBEC /* MWMEditorAdditionalNamesHeader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMEditorAdditionalNamesHeader.h; sourceTree = "<group>"; };
|
||||
F6E2FC411E097B9F0083EBEC /* MWMEditorAdditionalNamesHeader.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMEditorAdditionalNamesHeader.mm; sourceTree = "<group>"; };
|
||||
F6E2FC411E097B9F0083EBEC /* MWMEditorAdditionalNamesHeader.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; lineEnding = 0; path = MWMEditorAdditionalNamesHeader.mm; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
|
||||
F6E2FC421E097B9F0083EBEC /* MWMEditorAdditionalNamesHeader.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMEditorAdditionalNamesHeader.xib; sourceTree = "<group>"; };
|
||||
F6E2FC491E097B9F0083EBEC /* MWMEditorCommon.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMEditorCommon.h; sourceTree = "<group>"; };
|
||||
F6E2FC4A1E097B9F0083EBEC /* MWMEditorNotesFooter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMEditorNotesFooter.h; sourceTree = "<group>"; };
|
||||
F6E2FC4B1E097B9F0083EBEC /* MWMEditorNotesFooter.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMEditorNotesFooter.mm; sourceTree = "<group>"; };
|
||||
F6E2FC4B1E097B9F0083EBEC /* MWMEditorNotesFooter.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; lineEnding = 0; path = MWMEditorNotesFooter.mm; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
|
||||
F6E2FC4C1E097B9F0083EBEC /* MWMEditorNotesFooter.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMEditorNotesFooter.xib; sourceTree = "<group>"; };
|
||||
F6E2FC561E097B9F0083EBEC /* MWMEditorViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMEditorViewController.h; sourceTree = "<group>"; };
|
||||
F6E2FC571E097B9F0083EBEC /* MWMEditorViewController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; lineEnding = 0; path = MWMEditorViewController.mm; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
|
||||
|
@ -2507,7 +2507,7 @@
|
|||
F6E2FC8D1E097B9F0083EBEC /* MWMMigrationViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMMigrationViewController.h; sourceTree = "<group>"; };
|
||||
F6E2FC8E1E097B9F0083EBEC /* MWMMigrationViewController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMMigrationViewController.mm; sourceTree = "<group>"; };
|
||||
F6E2FC941E097B9F0083EBEC /* MWMDirectionView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMDirectionView.h; sourceTree = "<group>"; };
|
||||
F6E2FC951E097B9F0083EBEC /* MWMDirectionView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMDirectionView.mm; sourceTree = "<group>"; };
|
||||
F6E2FC951E097B9F0083EBEC /* MWMDirectionView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; lineEnding = 0; path = MWMDirectionView.mm; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
|
||||
F6E2FC961E097B9F0083EBEC /* MWMDirectionView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMDirectionView.xib; sourceTree = "<group>"; };
|
||||
F6E2FC971E097B9F0083EBEC /* MWMPlacePageData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMPlacePageData.h; sourceTree = "<group>"; };
|
||||
F6E2FC981E097B9F0083EBEC /* MWMPlacePageData.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMPlacePageData.mm; sourceTree = "<group>"; };
|
||||
|
@ -2518,7 +2518,7 @@
|
|||
F6E2FC9F1E097B9F0083EBEC /* MWMActionBarButton.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMActionBarButton.mm; sourceTree = "<group>"; };
|
||||
F6E2FCA01E097B9F0083EBEC /* MWMActionBarButton.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMActionBarButton.xib; sourceTree = "<group>"; };
|
||||
F6E2FCA11E097B9F0083EBEC /* MWMPlacePageActionBar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMPlacePageActionBar.h; sourceTree = "<group>"; };
|
||||
F6E2FCA21E097B9F0083EBEC /* MWMPlacePageActionBar.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMPlacePageActionBar.mm; sourceTree = "<group>"; };
|
||||
F6E2FCA21E097B9F0083EBEC /* MWMPlacePageActionBar.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; lineEnding = 0; path = MWMPlacePageActionBar.mm; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
|
||||
F6E2FCA31E097B9F0083EBEC /* MWMPlacePageActionBar.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMPlacePageActionBar.xib; sourceTree = "<group>"; };
|
||||
F6E2FCAA1E097B9F0083EBEC /* MWMBookmarkCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMBookmarkCell.h; sourceTree = "<group>"; };
|
||||
F6E2FCAB1E097B9F0083EBEC /* MWMBookmarkCell.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMBookmarkCell.mm; sourceTree = "<group>"; };
|
||||
|
@ -2536,7 +2536,7 @@
|
|||
F6E2FCB91E097B9F0083EBEC /* MWMOpeningHoursLayoutHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMOpeningHoursLayoutHelper.h; sourceTree = "<group>"; };
|
||||
F6E2FCBA1E097B9F0083EBEC /* MWMOpeningHoursLayoutHelper.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; lineEnding = 0; path = MWMOpeningHoursLayoutHelper.mm; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
|
||||
F6E2FCBB1E097B9F0083EBEC /* MWMPlacePageOpeningHoursCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMPlacePageOpeningHoursCell.h; sourceTree = "<group>"; };
|
||||
F6E2FCBC1E097B9F0083EBEC /* MWMPlacePageOpeningHoursCell.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMPlacePageOpeningHoursCell.mm; sourceTree = "<group>"; };
|
||||
F6E2FCBC1E097B9F0083EBEC /* MWMPlacePageOpeningHoursCell.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; lineEnding = 0; path = MWMPlacePageOpeningHoursCell.mm; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
|
||||
F6E2FCBD1E097B9F0083EBEC /* MWMPlacePageOpeningHoursCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMPlacePageOpeningHoursCell.xib; sourceTree = "<group>"; };
|
||||
F6E2FCBE1E097B9F0083EBEC /* MWMPlacePageOpeningHoursDayView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMPlacePageOpeningHoursDayView.h; sourceTree = "<group>"; };
|
||||
F6E2FCBF1E097B9F0083EBEC /* MWMPlacePageOpeningHoursDayView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMPlacePageOpeningHoursDayView.mm; sourceTree = "<group>"; };
|
||||
|
@ -2589,7 +2589,7 @@
|
|||
F6E2FCFA1E097B9F0083EBEC /* MWMSearchManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMSearchManager.h; sourceTree = "<group>"; };
|
||||
F6E2FCFB1E097B9F0083EBEC /* MWMSearchManager.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMSearchManager.mm; sourceTree = "<group>"; };
|
||||
F6E2FCFC1E097B9F0083EBEC /* MWMSearchNoResults.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMSearchNoResults.h; sourceTree = "<group>"; };
|
||||
F6E2FCFD1E097B9F0083EBEC /* MWMSearchNoResults.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMSearchNoResults.mm; sourceTree = "<group>"; };
|
||||
F6E2FCFD1E097B9F0083EBEC /* MWMSearchNoResults.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; lineEnding = 0; path = MWMSearchNoResults.mm; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
|
||||
F6E2FCFE1E097B9F0083EBEC /* MWMSearchNoResults.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMSearchNoResults.xib; sourceTree = "<group>"; };
|
||||
F6E2FCFF1E097B9F0083EBEC /* MWMSearchTextField.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMSearchTextField.h; sourceTree = "<group>"; };
|
||||
F6E2FD001E097B9F0083EBEC /* MWMSearchTextField.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMSearchTextField.mm; sourceTree = "<group>"; };
|
||||
|
@ -2617,7 +2617,7 @@
|
|||
F6E2FD221E097BA00083EBEC /* MWMSearchTabbedViewLayout.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMSearchTabbedViewLayout.mm; sourceTree = "<group>"; };
|
||||
F6E2FD231E097BA00083EBEC /* MWMSearchTabbedViewProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMSearchTabbedViewProtocol.h; sourceTree = "<group>"; };
|
||||
F6E2FD251E097BA00083EBEC /* MWMSearchTabButtonsView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMSearchTabButtonsView.h; sourceTree = "<group>"; };
|
||||
F6E2FD261E097BA00083EBEC /* MWMSearchTabButtonsView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMSearchTabButtonsView.mm; sourceTree = "<group>"; };
|
||||
F6E2FD261E097BA00083EBEC /* MWMSearchTabButtonsView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; lineEnding = 0; path = MWMSearchTabButtonsView.mm; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
|
||||
F6E2FD271E097BA00083EBEC /* MWMSearchTabButtonsView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMSearchTabButtonsView.xib; sourceTree = "<group>"; };
|
||||
F6E2FD291E097BA00083EBEC /* MWMSearchCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMSearchCell.h; sourceTree = "<group>"; };
|
||||
F6E2FD2A1E097BA00083EBEC /* MWMSearchCell.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMSearchCell.mm; sourceTree = "<group>"; };
|
||||
|
@ -2669,9 +2669,9 @@
|
|||
FA64D9A813F975AD00350ECF /* types.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = types.txt; path = ../../data/types.txt; sourceTree = SOURCE_ROOT; };
|
||||
FA85F632145DDDC20090E1A0 /* packed_polygons.bin */ = {isa = PBXFileReference; lastKnownFileType = archive.macbinary; name = packed_polygons.bin; path = ../../data/packed_polygons.bin; sourceTree = SOURCE_ROOT; };
|
||||
FAA614B6155F16950031C345 /* AddSetVC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AddSetVC.h; path = Bookmarks/AddSetVC.h; sourceTree = SOURCE_ROOT; };
|
||||
FAA614B7155F16950031C345 /* AddSetVC.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = AddSetVC.mm; path = Bookmarks/AddSetVC.mm; sourceTree = SOURCE_ROOT; };
|
||||
FAA614B7155F16950031C345 /* AddSetVC.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; lineEnding = 0; name = AddSetVC.mm; path = Bookmarks/AddSetVC.mm; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
|
||||
FAAEA7D0161BD26600CCD661 /* synonyms.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = synonyms.txt; path = ../../data/synonyms.txt; sourceTree = "<group>"; };
|
||||
FAAEA7D3161D8D3100CCD661 /* BookmarksRootVC.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = BookmarksRootVC.mm; path = Bookmarks/BookmarksRootVC.mm; sourceTree = SOURCE_ROOT; };
|
||||
FAAEA7D3161D8D3100CCD661 /* BookmarksRootVC.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; lineEnding = 0; name = BookmarksRootVC.mm; path = Bookmarks/BookmarksRootVC.mm; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
|
||||
FAAEA7D4161D8D3100CCD661 /* BookmarksRootVC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BookmarksRootVC.h; path = Bookmarks/BookmarksRootVC.h; sourceTree = SOURCE_ROOT; };
|
||||
FAAFD696139D9BE2000AE70C /* categories.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = categories.txt; path = ../../data/categories.txt; sourceTree = SOURCE_ROOT; };
|
||||
FAF30A94173AB23900818BF6 /* 07_roboto_medium.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = 07_roboto_medium.ttf; path = ../../data/07_roboto_medium.ttf; sourceTree = "<group>"; };
|
||||
|
|
|
@ -122,8 +122,8 @@ std::unordered_set<TCountryId> updatingCountries;
|
|||
|
||||
+ (instancetype)instanceWithPurpose:(Framework::DoAfterUpdate)todo
|
||||
{
|
||||
MWMAutoupdateController * controller = [[MWMAutoupdateController alloc] initWithNibName:[self className]
|
||||
bundle:[NSBundle mainBundle]];
|
||||
MWMAutoupdateController * controller =
|
||||
[[MWMAutoupdateController alloc] initWithNibName:[self className] bundle:NSBundle.mainBundle];
|
||||
controller.todo = todo;
|
||||
auto view = static_cast<MWMAutoupdateView *>(controller.view);
|
||||
view.delegate = controller;
|
||||
|
|
|
@ -76,7 +76,7 @@ typedef NS_ENUM(NSUInteger, MWMBottomMenuViewCell) {
|
|||
return self;
|
||||
}
|
||||
|
||||
- (void)dealloc { [[NSNotificationCenter defaultCenter] removeObserver:self]; }
|
||||
- (void)dealloc { [NSNotificationCenter.defaultCenter removeObserver:self]; }
|
||||
- (void)viewDidLoad
|
||||
{
|
||||
[super viewDidLoad];
|
||||
|
|
|
@ -8,9 +8,11 @@
|
|||
|
||||
namespace
|
||||
{
|
||||
auto compareStrings = ^NSComparisonResult(NSString * s1, NSString * s2)
|
||||
{
|
||||
return [s1 compare:s2 options:NSCaseInsensitiveSearch range:{0, s1.length} locale:[NSLocale currentLocale]];
|
||||
auto compareStrings = ^NSComparisonResult(NSString * s1, NSString * s2) {
|
||||
return [s1 compare:s2
|
||||
options:NSCaseInsensitiveSearch
|
||||
range:{ 0, s1.length }
|
||||
locale:NSLocale.currentLocale];
|
||||
};
|
||||
|
||||
auto compareLocalNames = ^NSComparisonResult(NSString * s1, NSString * s2)
|
||||
|
|
|
@ -724,7 +724,7 @@ using namespace storage;
|
|||
{
|
||||
if ([MWMToast affectsStatusBar])
|
||||
return [MWMToast preferredStatusBarStyle];
|
||||
setStatusBarBackgroundColor([UIColor clearColor]);
|
||||
setStatusBarBackgroundColor(UIColor.clearColor);
|
||||
return UIStatusBarStyleLightContent;
|
||||
}
|
||||
|
||||
|
|
|
@ -62,7 +62,7 @@ CGFloat const kErrorLabelDefaultTopSpace = 4.;
|
|||
attributes:@{NSForegroundColorAttributeName : [UIColor blackHintText]}];
|
||||
self.errorLabel.text = errorMessage;
|
||||
self.textField.keyboardType = keyboardType;
|
||||
self.textField.backgroundColor = [UIColor clearColor];
|
||||
self.textField.backgroundColor = UIColor.clearColor;
|
||||
self.isValid = isValid;
|
||||
self.textField.autocapitalizationType = capitalization;
|
||||
[self processValidation];
|
||||
|
|
|
@ -53,7 +53,7 @@ vector<string> SliceKeys(vector<pair<string, string>> const & v)
|
|||
{
|
||||
if ([MWMToast affectsStatusBar])
|
||||
return [MWMToast preferredStatusBarStyle];
|
||||
setStatusBarBackgroundColor([UIColor clearColor]);
|
||||
setStatusBarBackgroundColor(UIColor.clearColor);
|
||||
return UIStatusBarStyleLightContent;
|
||||
}
|
||||
|
||||
|
|
|
@ -14,8 +14,8 @@
|
|||
|
||||
+ (instancetype)header:(MWMVoidBlock)toggleBlock
|
||||
{
|
||||
MWMEditorAdditionalNamesHeader * h = [[[NSBundle mainBundle] loadNibNamed:[self className] owner:nil options:nil]
|
||||
firstObject];
|
||||
MWMEditorAdditionalNamesHeader * h =
|
||||
[NSBundle.mainBundle loadNibNamed:[self className] owner:nil options:nil].firstObject;
|
||||
h.label.localizedText = L(@"place_name").uppercaseString;
|
||||
h.toggleBlock = toggleBlock;
|
||||
return h;
|
||||
|
|
|
@ -10,8 +10,8 @@
|
|||
|
||||
+ (instancetype)footerForController:(UIViewController *)controller
|
||||
{
|
||||
MWMEditorNotesFooter * f = [[[NSBundle mainBundle] loadNibNamed:[self className] owner:nil options:nil]
|
||||
firstObject];
|
||||
MWMEditorNotesFooter * f =
|
||||
[NSBundle.mainBundle loadNibNamed:[self className] owner:nil options:nil].firstObject;
|
||||
f.controller = controller;
|
||||
[f setNeedsLayout];
|
||||
[f layoutIfNeeded];
|
||||
|
|
|
@ -370,7 +370,7 @@ void registerCellsForTableView(vector<MWMEditorCellType> const & cells, UITableV
|
|||
auto cell = self.offscreenCells[cls];
|
||||
if (!cell)
|
||||
{
|
||||
cell = [[[NSBundle mainBundle] loadWithViewClass:cls owner:nil options:nil] firstObject];
|
||||
cell = [NSBundle.mainBundle loadWithViewClass:cls owner:nil options:nil].firstObject;
|
||||
self.offscreenCells[cls] = cell;
|
||||
}
|
||||
return cell;
|
||||
|
@ -1085,7 +1085,7 @@ void registerCellsForTableView(vector<MWMEditorCellType> const & cells, UITableV
|
|||
|
||||
- (BOOL)showPersonalInfoWarningAlertIfNeeded
|
||||
{
|
||||
NSUserDefaults * ud = [NSUserDefaults standardUserDefaults];
|
||||
NSUserDefaults * ud = NSUserDefaults.standardUserDefaults;
|
||||
if ([ud boolForKey:kUDEditorPersonalInfoWarninWasShown])
|
||||
return NO;
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ NSString * const kToEditorSegue = @"CategorySelectorToEditorSegue";
|
|||
|
||||
string locale()
|
||||
{
|
||||
return locale_translator::bcp47ToTwineLanguage([NSLocale currentLocale].localeIdentifier);
|
||||
return locale_translator::bcp47ToTwineLanguage(NSLocale.currentLocale.localeIdentifier);
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
@ -98,7 +98,7 @@ string locale()
|
|||
{
|
||||
if ([MWMToast affectsStatusBar])
|
||||
return [MWMToast preferredStatusBarStyle];
|
||||
setStatusBarBackgroundColor([UIColor clearColor]);
|
||||
setStatusBarBackgroundColor(UIColor.clearColor);
|
||||
return UIStatusBarStyleLightContent;
|
||||
}
|
||||
|
||||
|
@ -239,7 +239,7 @@ string locale()
|
|||
}
|
||||
|
||||
self.isSearch = YES;
|
||||
string const query{[searchText lowercaseStringWithLocale:[NSLocale currentLocale]].UTF8String};
|
||||
string const query{[searchText lowercaseStringWithLocale:NSLocale.currentLocale].UTF8String};
|
||||
m_filteredCategories = m_categories.Search(query, locale());
|
||||
[self.tableView reloadData];
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
- (void)awakeFromNib
|
||||
{
|
||||
[super awakeFromNib];
|
||||
self.backgroundColor = [UIColor clearColor];
|
||||
self.backgroundColor = UIColor.clearColor;
|
||||
}
|
||||
|
||||
+ (CGFloat)height
|
||||
|
|
|
@ -70,8 +70,8 @@ BOOL isCompactForCellWidth(CGFloat width)
|
|||
- (void)refresh
|
||||
{
|
||||
[super refresh];
|
||||
NSLocale * locale = [NSLocale currentLocale];
|
||||
NSCalendar * calendar = [NSCalendar currentCalendar];
|
||||
NSLocale * locale = NSLocale.currentLocale;
|
||||
NSCalendar * calendar = NSCalendar.currentCalendar;
|
||||
calendar.locale = locale;
|
||||
|
||||
NSDateFormatter * dateFormatter = [[NSDateFormatter alloc] init];
|
||||
|
|
|
@ -25,8 +25,8 @@ using namespace osmoh;
|
|||
- (void)awakeFromNib
|
||||
{
|
||||
[super awakeFromNib];
|
||||
NSCalendar * cal = [NSCalendar currentCalendar];
|
||||
cal.locale = [NSLocale currentLocale];
|
||||
NSCalendar * cal = NSCalendar.currentCalendar;
|
||||
cal.locale = NSLocale.currentLocale;
|
||||
self.firstWeekday = cal.firstWeekday;
|
||||
NSArray<NSString *> * weekdaySymbols = cal.shortStandaloneWeekdaySymbols;
|
||||
for (UILabel * label in self.labels)
|
||||
|
|
|
@ -19,15 +19,15 @@
|
|||
- (void)awakeFromNib
|
||||
{
|
||||
[super awakeFromNib];
|
||||
self.calendar = [NSCalendar currentCalendar];
|
||||
self.calendar.locale = [NSLocale currentLocale];
|
||||
self.calendar = NSCalendar.currentCalendar;
|
||||
self.calendar.locale = NSLocale.currentLocale;
|
||||
}
|
||||
|
||||
- (void)refresh
|
||||
{
|
||||
[super refresh];
|
||||
NSDateFormatter * dateFormatter = [[NSDateFormatter alloc] init];
|
||||
dateFormatter.locale = [NSLocale currentLocale];
|
||||
dateFormatter.locale = NSLocale.currentLocale;
|
||||
dateFormatter.timeStyle = NSDateFormatterShortStyle;
|
||||
dateFormatter.dateStyle = NSDateFormatterNoStyle;
|
||||
|
||||
|
|
|
@ -17,8 +17,8 @@
|
|||
- (void)refresh
|
||||
{
|
||||
[super refresh];
|
||||
NSLocale * locale = [NSLocale currentLocale];
|
||||
NSCalendar * calendar = [NSCalendar currentCalendar];
|
||||
NSLocale * locale = NSLocale.currentLocale;
|
||||
NSCalendar * calendar = NSCalendar.currentCalendar;
|
||||
calendar.locale = locale;
|
||||
|
||||
NSDateFormatter * dateFormatter = [[NSDateFormatter alloc] init];
|
||||
|
|
|
@ -10,15 +10,15 @@ NSDateComponents * dateComponentsFromTime(osmoh::Time const & time)
|
|||
|
||||
NSDate * dateFromTime(osmoh::Time const & time)
|
||||
{
|
||||
NSCalendar * cal = [NSCalendar currentCalendar];
|
||||
cal.locale = [NSLocale currentLocale];
|
||||
NSCalendar * cal = NSCalendar.currentCalendar;
|
||||
cal.locale = NSLocale.currentLocale;
|
||||
return [cal dateFromComponents:dateComponentsFromTime(time)];
|
||||
}
|
||||
|
||||
NSString * stringFromTime(osmoh::Time const & time)
|
||||
{
|
||||
NSDateFormatter * fmt = [[NSDateFormatter alloc] init];
|
||||
fmt.locale = [NSLocale currentLocale];
|
||||
fmt.locale = NSLocale.currentLocale;
|
||||
fmt.timeStyle = NSDateFormatterShortStyle;
|
||||
fmt.dateStyle = NSDateFormatterNoStyle;
|
||||
return [fmt stringFromDate:dateFromTime(time)];
|
||||
|
@ -26,8 +26,8 @@ NSString * stringFromTime(osmoh::Time const & time)
|
|||
|
||||
NSString * stringFromOpeningDays(editor::ui::TOpeningDays const & openingDays)
|
||||
{
|
||||
NSCalendar * cal = [NSCalendar currentCalendar];
|
||||
cal.locale = [NSLocale currentLocale];
|
||||
NSCalendar * cal = NSCalendar.currentCalendar;
|
||||
cal.locale = NSLocale.currentLocale;
|
||||
NSUInteger const firstWeekday = cal.firstWeekday - 1;
|
||||
|
||||
NSArray<NSString *> * weekdaySymbols = cal.shortStandaloneWeekdaySymbols;
|
||||
|
|
|
@ -34,7 +34,7 @@ extern NSDictionary * const kMWMOpeningHoursEditorTableCells = @{
|
|||
@property(weak, nonatomic, readwrite) IBOutlet NSLayoutConstraint * ohTextViewHeight;
|
||||
@property(weak, nonatomic) IBOutlet UIView * exampleValuesSeparator;
|
||||
@property(weak, nonatomic) IBOutlet UIImageView * exampleValuesExpandView;
|
||||
@property(weak, nonatomic) IBOutlet NSLayoutConstraint * exampesButtonBottomOffset;
|
||||
@property(weak, nonatomic) IBOutlet NSLayoutConstraint * examplesButtonBottomOffset;
|
||||
@property(weak, nonatomic, readwrite) IBOutlet UIButton * toggleModeButton;
|
||||
|
||||
@property(nonatomic) BOOL exampleExpanded;
|
||||
|
@ -80,7 +80,7 @@ extern NSDictionary * const kMWMOpeningHoursEditorTableCells = @{
|
|||
self.editorView.keyboardAppearance =
|
||||
[UIColor isNightMode] ? UIKeyboardAppearanceDark : UIKeyboardAppearanceDefault;
|
||||
NSString * path =
|
||||
[[NSBundle mainBundle] pathForResource:@"opening_hours_how_to_edit" ofType:@"html"];
|
||||
[NSBundle.mainBundle pathForResource:@"opening_hours_how_to_edit" ofType:@"html"];
|
||||
NSString * html =
|
||||
[[NSString alloc] initWithContentsOfFile:path encoding:NSUTF8StringEncoding error:nil];
|
||||
NSURL * baseURL = [NSURL fileURLWithPath:path];
|
||||
|
@ -183,7 +183,7 @@ extern NSDictionary * const kMWMOpeningHoursEditorTableCells = @{
|
|||
{
|
||||
_exampleExpanded = exampleExpanded;
|
||||
self.help.hidden = !exampleExpanded;
|
||||
self.exampesButtonBottomOffset.priority =
|
||||
self.examplesButtonBottomOffset.priority =
|
||||
exampleExpanded ? UILayoutPriorityDefaultLow : UILayoutPriorityDefaultHigh;
|
||||
self.exampleValuesSeparator.hidden = !exampleExpanded;
|
||||
self.exampleValuesExpandView.image =
|
||||
|
|
|
@ -171,14 +171,15 @@ using namespace osmoh;
|
|||
id<MWMOpeningHoursModelProtocol> delegate = self.delegate;
|
||||
NSString * oh = delegate.openingHours;
|
||||
|
||||
if (isSimpleMode && oh)
|
||||
isSimpleMode = MakeTimeTableSet(osmoh::OpeningHours(oh.UTF8String), timeTableSet);
|
||||
auto isSimple = isSimpleMode;
|
||||
if (isSimple && oh)
|
||||
isSimple = MakeTimeTableSet(osmoh::OpeningHours(oh.UTF8String), timeTableSet);
|
||||
|
||||
delegate.advancedEditor.hidden = isSimpleMode;
|
||||
delegate.advancedEditor.hidden = isSimple;
|
||||
UITableView * tv = delegate.tableView;
|
||||
UIButton * toggleModeButton = delegate.toggleModeButton;
|
||||
|
||||
if (isSimpleMode)
|
||||
if (isSimple)
|
||||
{
|
||||
_isSimpleMode = YES;
|
||||
tv.hidden = NO;
|
||||
|
|
|
@ -16,7 +16,7 @@ static CGFloat const kDirectionArrowSide = IPAD ? 260. : 160.;
|
|||
|
||||
- (instancetype)init
|
||||
{
|
||||
self = [[[NSBundle mainBundle] loadNibNamed:kDirectionViewNibName owner:nil options:nil] firstObject];
|
||||
self = [NSBundle.mainBundle loadNibNamed:kDirectionViewNibName owner:nil options:nil].firstObject;
|
||||
[self setup];
|
||||
return self;
|
||||
}
|
||||
|
|
|
@ -442,7 +442,7 @@ using namespace place_page;
|
|||
m_ugcRows.push_back(UGCRow::SelectImpression);
|
||||
|
||||
auto & f = GetFramework();
|
||||
f.GetUGCApi().GetUGC(self.featureId, [self](ugc::UGC const & ugc) {
|
||||
f.GetUGCApi().GetUGC([self featureId], [self](ugc::UGC const & ugc) {
|
||||
auto const it = find(self->m_sections.begin(), self->m_sections.end(), Sections::UGC);
|
||||
ASSERT(it != self->m_sections.end(), ());
|
||||
|
||||
|
@ -768,7 +768,7 @@ using namespace place_page;
|
|||
case MetainfoRows::Coordinate:
|
||||
return @(m_info
|
||||
.GetFormattedCoordinate(
|
||||
[[NSUserDefaults standardUserDefaults] boolForKey:kUserDefaultsLatLonAsDMSKey])
|
||||
[NSUserDefaults.standardUserDefaults boolForKey:kUserDefaultsLatLonAsDMSKey])
|
||||
.c_str());
|
||||
}
|
||||
}
|
||||
|
@ -794,7 +794,7 @@ using namespace place_page;
|
|||
+ (void)toggleCoordinateSystem
|
||||
{
|
||||
// TODO: Move changing latlon's mode to the settings.
|
||||
NSUserDefaults * ud = [NSUserDefaults standardUserDefaults];
|
||||
NSUserDefaults * ud = NSUserDefaults.standardUserDefaults;
|
||||
[ud setBool:![ud boolForKey:kUserDefaultsLatLonAsDMSKey] forKey:kUserDefaultsLatLonAsDMSKey];
|
||||
[ud synchronize];
|
||||
}
|
||||
|
|
|
@ -86,21 +86,21 @@ void logSponsoredEvent(MWMPlacePageData * data, NSString * eventName)
|
|||
}
|
||||
|
||||
[MWMLocationManager addObserver:self];
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self
|
||||
selector:@selector(handleBookmarkDeleting:)
|
||||
name:kBookmarkDeletedNotification
|
||||
object:nil];
|
||||
[NSNotificationCenter.defaultCenter addObserver:self
|
||||
selector:@selector(handleBookmarkDeleting:)
|
||||
name:kBookmarkDeletedNotification
|
||||
object:nil];
|
||||
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self
|
||||
selector:@selector(handleBookmarkCategoryDeleting:)
|
||||
name:kBookmarkCategoryDeletedNotification
|
||||
object:nil];
|
||||
[NSNotificationCenter.defaultCenter addObserver:self
|
||||
selector:@selector(handleBookmarkCategoryDeleting:)
|
||||
name:kBookmarkCategoryDeletedNotification
|
||||
object:nil];
|
||||
[self setupSpeedAndDistance];
|
||||
|
||||
[self.layout showWithData:self.data];
|
||||
|
||||
// Call for the first time to produce changes
|
||||
[self processCountryEvent:self.data.countryId];
|
||||
[self processCountryEvent:[self.data countryId]];
|
||||
}
|
||||
|
||||
- (void)dismiss
|
||||
|
@ -109,7 +109,7 @@ void logSponsoredEvent(MWMPlacePageData * data, NSString * eventName)
|
|||
self.data = nil;
|
||||
[MWMLocationManager removeObserver:self];
|
||||
[MWMFrameworkListener removeObserver:self];
|
||||
[[NSNotificationCenter defaultCenter] removeObserver:self];
|
||||
[NSNotificationCenter.defaultCenter removeObserver:self];
|
||||
}
|
||||
|
||||
- (void)handleBookmarkDeleting:(NSNotification *)notification
|
||||
|
@ -154,7 +154,7 @@ void logSponsoredEvent(MWMPlacePageData * data, NSString * eventName)
|
|||
auto data = self.data;
|
||||
if (!data)
|
||||
return;
|
||||
auto const & countryId = data.countryId;
|
||||
auto const & countryId = [data countryId];
|
||||
NodeAttrs nodeAttrs;
|
||||
GetFramework().GetStorage().GetNodeAttrs(countryId, nodeAttrs);
|
||||
switch (nodeAttrs.m_status)
|
||||
|
@ -189,17 +189,17 @@ void logSponsoredEvent(MWMPlacePageData * data, NSString * eventName)
|
|||
- (void)processCountryEvent:(TCountryId const &)countryId
|
||||
{
|
||||
auto data = self.data;
|
||||
if (!data || data.countryId != countryId)
|
||||
if (!data || [data countryId] != countryId)
|
||||
return;
|
||||
|
||||
if (data.countryId == kInvalidCountryId)
|
||||
if ([data countryId] == kInvalidCountryId)
|
||||
{
|
||||
[self.layout processDownloaderEventWithStatus:storage::NodeStatus::Undefined progress:0];
|
||||
return;
|
||||
}
|
||||
|
||||
NodeStatuses statuses;
|
||||
GetFramework().GetStorage().GetNodeStatuses(data.countryId, statuses);
|
||||
GetFramework().GetStorage().GetNodeStatuses([data countryId], statuses);
|
||||
|
||||
auto const status = statuses.m_status;
|
||||
if (status == self.currentDownloaderStatus)
|
||||
|
@ -213,7 +213,7 @@ void logSponsoredEvent(MWMPlacePageData * data, NSString * eventName)
|
|||
progress:(MapFilesDownloader::TProgress const &)progress
|
||||
{
|
||||
auto data = self.data;
|
||||
if (!data || countryId == kInvalidCountryId || data.countryId != countryId)
|
||||
if (!data || countryId == kInvalidCountryId || [data countryId] != countryId)
|
||||
return;
|
||||
|
||||
[self.layout
|
||||
|
@ -508,7 +508,7 @@ void logSponsoredEvent(MWMPlacePageData * data, NSString * eventName)
|
|||
NSString * phoneNumber = [[@"telprompt:" stringByAppendingString:data.phoneNumber]
|
||||
stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
|
||||
NSURL * url = [NSURL URLWithString:phoneNumber];
|
||||
[[UIApplication sharedApplication] openURL:url];
|
||||
[UIApplication.sharedApplication openURL:url];
|
||||
}
|
||||
|
||||
- (void)apiBack
|
||||
|
@ -518,7 +518,7 @@ void logSponsoredEvent(MWMPlacePageData * data, NSString * eventName)
|
|||
return;
|
||||
[Statistics logEvent:kStatEventName(kStatPlacePage, kStatAPI)];
|
||||
NSURL * url = [NSURL URLWithString:data.apiURL];
|
||||
[[UIApplication sharedApplication] openURL:url];
|
||||
[UIApplication.sharedApplication openURL:url];
|
||||
[self.ownerViewController.apiBar back];
|
||||
}
|
||||
|
||||
|
@ -580,7 +580,7 @@ void logSponsoredEvent(MWMPlacePageData * data, NSString * eventName)
|
|||
if (!url)
|
||||
return;
|
||||
|
||||
auto const & feature = data.featureId;
|
||||
auto const & feature = [data featureId];
|
||||
[Statistics logEvent:kStatPlacePageOwnershipButtonClick
|
||||
withParameters:@{
|
||||
@"mwm_name" : @(feature.GetMwmName().c_str()),
|
||||
|
@ -600,12 +600,13 @@ void logSponsoredEvent(MWMPlacePageData * data, NSString * eventName)
|
|||
|
||||
- (void)reviewOn:(NSInteger)starNumber
|
||||
{
|
||||
GetFramework().GetUGCApi().GetUGCUpdate(self.data.featureId, [self, starNumber](ugc::UGCUpdate const & ugc) {
|
||||
GetFramework().GetUGCApi().GetUGCUpdate(
|
||||
[self.data featureId], [self, starNumber](ugc::UGCUpdate const & ugc) {
|
||||
auto viewModel = self.data.reviewViewModel;
|
||||
[viewModel setDefaultStarCount:starNumber];
|
||||
auto controller = [MWMUGCReviewController instanceFromViewModel:viewModel];
|
||||
[self.ownerViewController.navigationController pushViewController:controller animated:YES];
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
#pragma mark - AvailableArea / PlacePageArea
|
||||
|
@ -619,8 +620,7 @@ void logSponsoredEvent(MWMPlacePageData * data, NSString * eventName)
|
|||
|
||||
#pragma mark - MWMFeatureHolder
|
||||
|
||||
- (FeatureID const &)featureId { return self.data.featureId; }
|
||||
|
||||
- (FeatureID const &)featureId { return [self.data featureId]; }
|
||||
#pragma mark - MWMBookingInfoHolder
|
||||
|
||||
- (std::vector<booking::HotelFacility> const &)hotelFacilities { return self.data.facilities; }
|
||||
|
|
|
@ -86,17 +86,17 @@ NSString * titleForButton(EButton type, BOOL isSelected)
|
|||
}
|
||||
case EButton::Booking:
|
||||
[self.button setImage:[UIImage imageNamed:@"ic_booking_logo"] forState:UIControlStateNormal];
|
||||
self.label.textColor = [UIColor whiteColor];
|
||||
self.label.textColor = UIColor.whiteColor;
|
||||
self.backgroundColor = [UIColor bookingBackground];
|
||||
break;
|
||||
case EButton::BookingSearch:
|
||||
[self.button setImage:[UIImage imageNamed:@"ic_booking_search"] forState:UIControlStateNormal];
|
||||
self.label.textColor = [UIColor whiteColor];
|
||||
self.label.textColor = UIColor.whiteColor;
|
||||
self.backgroundColor = [UIColor bookingBackground];
|
||||
break;
|
||||
case EButton::Opentable:
|
||||
[self.button setImage:[UIImage imageNamed:@"ic_opentable"] forState:UIControlStateNormal];
|
||||
self.label.textColor = [UIColor whiteColor];
|
||||
self.label.textColor = UIColor.whiteColor;
|
||||
self.backgroundColor = [UIColor opentableBackground];
|
||||
break;
|
||||
case EButton::Call:
|
||||
|
@ -137,7 +137,8 @@ NSString * titleForButton(EButton type, BOOL isSelected)
|
|||
{
|
||||
if (view.subviews.count)
|
||||
return;
|
||||
MWMActionBarButton * button = [[[NSBundle mainBundle] loadNibNamed:[self className] owner:nil options:nil] firstObject];
|
||||
MWMActionBarButton * button =
|
||||
[NSBundle.mainBundle loadNibNamed:[self className] owner:nil options:nil].firstObject;
|
||||
button.delegate = delegate;
|
||||
button.type = type;
|
||||
[view addSubview:button];
|
||||
|
|
|
@ -28,7 +28,7 @@ extern NSString * const kAlohalyticsTapEventKey;
|
|||
+ (MWMPlacePageActionBar *)actionBarWithDelegate:(id<MWMActionBarProtocol>)delegate
|
||||
{
|
||||
MWMPlacePageActionBar * bar =
|
||||
[[NSBundle.mainBundle loadNibNamed:[self className] owner:nil options:nil] firstObject];
|
||||
[NSBundle.mainBundle loadNibNamed:[self className] owner:nil options:nil].firstObject;
|
||||
bar.delegate = delegate;
|
||||
return bar;
|
||||
}
|
||||
|
@ -36,7 +36,7 @@ extern NSString * const kAlohalyticsTapEventKey;
|
|||
- (void)configureWithData:(id<MWMActionBarSharedData>)data
|
||||
{
|
||||
self.data = data;
|
||||
self.isBookmark = data.isBookmark;
|
||||
self.isBookmark = [data isBookmark];
|
||||
[self configureButtons];
|
||||
self.autoresizingMask = UIViewAutoresizingNone;
|
||||
[self setNeedsLayout];
|
||||
|
@ -48,18 +48,18 @@ extern NSString * const kAlohalyticsTapEventKey;
|
|||
m_additionalButtons.clear();
|
||||
auto data = self.data;
|
||||
|
||||
BOOL const isBooking = data.isBooking;
|
||||
BOOL const isOpentable = data.isOpentable;
|
||||
BOOL const isBookingSearch = data.isBookingSearch;
|
||||
BOOL const isBooking = [data isBooking];
|
||||
BOOL const isOpentable = [data isOpentable];
|
||||
BOOL const isBookingSearch = [data isBookingSearch];
|
||||
BOOL const isSponsored = isBooking || isOpentable || isBookingSearch;
|
||||
BOOL const isPhoneCallAvailable =
|
||||
[AppInfo sharedInfo].canMakeCalls && data.phoneNumber.length > 0;
|
||||
BOOL const isApi = data.isApi;
|
||||
[AppInfo sharedInfo].canMakeCalls && [data phoneNumber].length > 0;
|
||||
BOOL const isApi = [data isApi];
|
||||
auto const navigationState = [MWMNavigationDashboardManager manager].state;
|
||||
BOOL const isNavigationActive = navigationState == MWMNavigationDashboardStateNavigation;
|
||||
BOOL const isP2P = !isNavigationActive && navigationState != MWMNavigationDashboardStateHidden;
|
||||
BOOL const isMyPosition = data.isMyPosition;
|
||||
BOOL const isRoutePoint = data.isRoutePoint;
|
||||
BOOL const isMyPosition = [data isMyPosition];
|
||||
BOOL const isRoutePoint = [data isRoutePoint];
|
||||
BOOL const isNeedToAddIntermediatePoint = [MWMRouter canAddIntermediatePoint];
|
||||
|
||||
EButton sponsoredButton = EButton::BookingSearch;
|
||||
|
@ -237,7 +237,7 @@ extern NSString * const kAlohalyticsTapEventKey;
|
|||
{
|
||||
MWMActionBarButton * button = view.subviews.firstObject;
|
||||
NSAssert(button, @"Subviews can't be empty!");
|
||||
if (!button || button.type != EButton::Download)
|
||||
if (!button || [button type] != EButton::Download)
|
||||
continue;
|
||||
|
||||
return button.mapDownloadProgress;
|
||||
|
@ -304,15 +304,15 @@ extern NSString * const kAlohalyticsTapEventKey;
|
|||
{
|
||||
NSString * cancel = L(@"cancel");
|
||||
auto data = self.data;
|
||||
BOOL const isTitleNotEmpty = data.title.length > 0;
|
||||
NSString * title = isTitleNotEmpty ? data.title : data.subtitle;
|
||||
NSString * subtitle = isTitleNotEmpty ? data.subtitle : nil;
|
||||
BOOL const isTitleNotEmpty = [data title].length > 0;
|
||||
NSString * title = isTitleNotEmpty ? [data title] : [data subtitle];
|
||||
NSString * subtitle = isTitleNotEmpty ? [data subtitle] : nil;
|
||||
|
||||
UIViewController * vc = static_cast<UIViewController *>([MapViewController controller]);
|
||||
NSMutableArray<NSString *> * titles = [@[] mutableCopy];
|
||||
for (auto const buttonType : m_additionalButtons)
|
||||
{
|
||||
BOOL const isSelected = buttonType == EButton::Bookmark ? data.isBookmark : NO;
|
||||
BOOL const isSelected = buttonType == EButton::Bookmark ? [data isBookmark] : NO;
|
||||
if (NSString * title = titleForButton(buttonType, isSelected))
|
||||
[titles addObject:title];
|
||||
else
|
||||
|
|
|
@ -91,7 +91,7 @@
|
|||
auto btnLayer = titleButton.layer;
|
||||
if (isInsetButton)
|
||||
{
|
||||
self.backgroundColor = [UIColor clearColor];
|
||||
self.backgroundColor = UIColor.clearColor;
|
||||
self.buttonTop.constant = 8;
|
||||
self.buttonTrailing.constant = 16;
|
||||
self.buttonBottom.constant = 8;
|
||||
|
|
|
@ -27,7 +27,7 @@ NSString * breaksFromClosedTime(TTimespans const & closedTimes)
|
|||
[breaks appendString:[NSString stringWithFormat:@"%@ %@", L(@"editor_hours_closed"),
|
||||
stringFromTimeSpan(closedTimes[i])]];
|
||||
}
|
||||
return breaks.copy;
|
||||
return [breaks copy];
|
||||
}
|
||||
|
||||
void addToday(ui::TimeTable const & tt, vector<Day> & allDays)
|
||||
|
@ -94,8 +94,8 @@ void addUnhandledDays(ui::TOpeningDays const & days, vector<Day> & allDays)
|
|||
|
||||
vector<Day> days;
|
||||
|
||||
NSCalendar * cal = [NSCalendar currentCalendar];
|
||||
cal.locale = [NSLocale currentLocale];
|
||||
NSCalendar * cal = NSCalendar.currentCalendar;
|
||||
cal.locale = NSLocale.currentLocale;
|
||||
|
||||
auto const timeTablesSize = timeTableSet.Size();
|
||||
auto const today =
|
||||
|
|
|
@ -137,7 +137,7 @@ NSAttributedString * richStringFromDay(osmoh::Day const & day, BOOL isClosedNow)
|
|||
{
|
||||
self.data = data;
|
||||
self.rawString = [data stringForRow:place_page::MetainfoRows::OpeningHours];
|
||||
self.isClosed = data.schedule == place_page::OpeningHours::Closed;
|
||||
self.isClosed = [data schedule] == place_page::OpeningHours::Closed;
|
||||
m_days = [MWMOpeningHours processRawString:self.rawString];
|
||||
}
|
||||
|
||||
|
@ -147,7 +147,7 @@ NSAttributedString * richStringFromDay(osmoh::Day const & day, BOOL isClosedNow)
|
|||
auto const & day = m_days[indexPath.row];
|
||||
auto data = self.data;
|
||||
|
||||
if (data.metainfoRows[indexPath.row] == place_page::MetainfoRows::OpeningHours)
|
||||
if ([data metainfoRows][indexPath.row] == place_page::MetainfoRows::OpeningHours)
|
||||
{
|
||||
Class cls = [_MWMOHHeaderCell class];
|
||||
auto cell = static_cast<_MWMOHHeaderCell *>(
|
||||
|
@ -226,7 +226,7 @@ NSAttributedString * richStringFromDay(osmoh::Day const & day, BOOL isClosedNow)
|
|||
auto data = self.data;
|
||||
if (!data)
|
||||
return 0;
|
||||
auto & sections = data.sections;
|
||||
auto & sections = [data sections];
|
||||
auto it = find(sections.begin(), sections.end(), place_page::Sections::Metainfo);
|
||||
if (it == sections.end())
|
||||
return NSNotFound;
|
||||
|
@ -244,7 +244,7 @@ NSAttributedString * richStringFromDay(osmoh::Day const & day, BOOL isClosedNow)
|
|||
if (!data)
|
||||
return NO;
|
||||
|
||||
auto & metainfoRows = data.mutableMetainfoRows;
|
||||
auto & metainfoRows = [data mutableMetainfoRows];
|
||||
using place_page::MetainfoRows;
|
||||
|
||||
auto it = find(metainfoRows.begin(), metainfoRows.end(), MetainfoRows::OpeningHours);
|
||||
|
|
|
@ -54,9 +54,10 @@ NSArray<NSString *> * arrayFromClosedTimes(TTimespans const & closedTimes)
|
|||
|
||||
WeekDayView getWeekDayView()
|
||||
{
|
||||
return [[[NSBundle mainBundle] loadNibNamed:@"MWMPlacePageOpeningHoursWeekDayView"
|
||||
owner:nil
|
||||
options:nil] firstObject];
|
||||
return [NSBundle.mainBundle loadNibNamed:@"MWMPlacePageOpeningHoursWeekDayView"
|
||||
owner:nil
|
||||
options:nil]
|
||||
.firstObject;
|
||||
}
|
||||
|
||||
@implementation MWMPlacePageOpeningHoursCell
|
||||
|
@ -100,8 +101,8 @@ WeekDayView getWeekDayView()
|
|||
|
||||
- (void)processSchedule
|
||||
{
|
||||
NSCalendar * cal = [NSCalendar currentCalendar];
|
||||
cal.locale = [NSLocale currentLocale];
|
||||
NSCalendar * cal = NSCalendar.currentCalendar;
|
||||
cal.locale = NSLocale.currentLocale;
|
||||
Weekday currentDay =
|
||||
static_cast<Weekday>([cal components:NSCalendarUnitWeekday fromDate:[NSDate date]].weekday);
|
||||
BOOL haveCurrentDay = NO;
|
||||
|
|
|
@ -14,7 +14,7 @@ NSString * formattedDateFrom(ugc::Time time)
|
|||
NSTimeInterval const t = duration_cast<seconds>(time.time_since_epoch()).count();
|
||||
|
||||
NSDate * date = [NSDate dateWithTimeIntervalSince1970:t];
|
||||
NSCalendar * calendar = [NSCalendar currentCalendar];
|
||||
NSCalendar * calendar = NSCalendar.currentCalendar;
|
||||
auto const mask = (NSCalendarUnitYear | NSCalendarUnitMonth | NSCalendarUnitWeekOfMonth |
|
||||
NSCalendarUnitDay | NSCalendarUnitHour | NSCalendarUnitMinute);
|
||||
NSDateComponents * components = [calendar components:mask fromDate:date];
|
||||
|
|
|
@ -78,7 +78,7 @@ map<MetainfoRows, Class> const kMetaInfoCells = {
|
|||
_ownerView = view;
|
||||
_delegate = delegate;
|
||||
_dataSource = dataSource;
|
||||
[[NSBundle mainBundle] loadNibNamed:[MWMPPView className] owner:self options:nil];
|
||||
[NSBundle.mainBundle loadNibNamed:[MWMPPView className] owner:self options:nil];
|
||||
_placePageView.delegate = self;
|
||||
|
||||
auto tableView = _placePageView.tableView;
|
||||
|
|
|
@ -32,7 +32,7 @@ CGFloat const kBottomOffset = 36;
|
|||
{
|
||||
_ownerView = ownerView;
|
||||
_availableArea = ownerView.frame;
|
||||
self.placePageView = placePageView;
|
||||
[self setPlacePageView:placePageView];
|
||||
placePageView.tableView.delegate = self;
|
||||
_delegate = delegate;
|
||||
[self addShadow];
|
||||
|
|
|
@ -60,8 +60,8 @@ CGFloat const kMinOffset = 1;
|
|||
_placePageView = placePageView;
|
||||
placePageView.tableView.delegate = self;
|
||||
_delegate = delegate;
|
||||
self.scrollView =
|
||||
[[MWMPPScrollView alloc] initWithFrame:ownerView.frame inactiveView:placePageView];
|
||||
[self setScrollView:[[MWMPPScrollView alloc] initWithFrame:ownerView.frame
|
||||
inactiveView:placePageView]];
|
||||
placePageView.frame = {{0, size.height}, size};
|
||||
}
|
||||
return self;
|
||||
|
|
|
@ -21,8 +21,7 @@ CGFloat constexpr kExtraCompactHeight = 52;
|
|||
+ (instancetype)viewWithImage:(UIImage *)image title:(NSString *)title text:(NSString *)text
|
||||
{
|
||||
MWMSearchNoResults * view =
|
||||
[[[NSBundle mainBundle] loadNibNamed:[self className] owner:nil options:nil]
|
||||
firstObject];
|
||||
[NSBundle.mainBundle loadNibNamed:[self className] owner:nil options:nil].firstObject;
|
||||
view.image.image = image;
|
||||
if (title)
|
||||
{
|
||||
|
|
|
@ -27,7 +27,8 @@ static CGFloat const kIconToLabelSpacing = 4.0;
|
|||
self = [super initWithCoder:aDecoder];
|
||||
if (self)
|
||||
{
|
||||
self.rootView = [[NSBundle.mainBundle loadNibNamed:self.class.className owner:self options:nil] firstObject];
|
||||
_rootView =
|
||||
[NSBundle.mainBundle loadNibNamed:self.class.className owner:self options:nil].firstObject;
|
||||
[self addSubview:self.rootView];
|
||||
CALayer * sl = self.layer;
|
||||
sl.shouldRasterize = YES;
|
||||
|
|
|
@ -64,7 +64,7 @@ BOOL isOffsetInButton(CGFloat offset, MWMSearchTabButtonsView * button)
|
|||
self.selectedButtonTag = 1;
|
||||
else
|
||||
self.selectedButtonTag =
|
||||
[[NSUserDefaults standardUserDefaults] integerForKey:kSelectedButtonTagKey];
|
||||
[NSUserDefaults.standardUserDefaults integerForKey:kSelectedButtonTagKey];
|
||||
}
|
||||
|
||||
- (void)resetCategories { [self.categoriesManager resetCategories]; }
|
||||
|
@ -210,7 +210,7 @@ BOOL isOffsetInButton(CGFloat offset, MWMSearchTabButtonsView * button)
|
|||
}];
|
||||
_selectedButton = selectedButton;
|
||||
selectedButton.selected = YES;
|
||||
NSUserDefaults * ud = [NSUserDefaults standardUserDefaults];
|
||||
NSUserDefaults * ud = NSUserDefaults.standardUserDefaults;
|
||||
[ud setInteger:selectedButton.tag forKey:kSelectedButtonTagKey];
|
||||
[ud synchronize];
|
||||
}
|
||||
|
|
|
@ -91,16 +91,16 @@
|
|||
- (NSDictionary *)selectedTitleAttributes
|
||||
{
|
||||
return @{
|
||||
NSForegroundColorAttributeName : UIColor.blackPrimaryText,
|
||||
NSFontAttributeName : UIFont.bold17
|
||||
NSForegroundColorAttributeName : [UIColor blackPrimaryText],
|
||||
NSFontAttributeName : [UIFont bold17]
|
||||
};
|
||||
}
|
||||
|
||||
- (NSDictionary *)unselectedTitleAttributes
|
||||
{
|
||||
return @{
|
||||
NSForegroundColorAttributeName : UIColor.blackPrimaryText,
|
||||
NSFontAttributeName : UIFont.regular17
|
||||
NSForegroundColorAttributeName : [UIColor blackPrimaryText],
|
||||
NSFontAttributeName : [UIFont regular17]
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ extern NSString * const kAlohalyticsTapEventKey;
|
|||
[super viewDidLoad];
|
||||
self.title = L(@"about_menu_title");
|
||||
|
||||
[[NSBundle mainBundle] loadNibNamed:@"MWMAboutControllerHeader" owner:self options:nil];
|
||||
[NSBundle.mainBundle loadNibNamed:@"MWMAboutControllerHeader" owner:self options:nil];
|
||||
self.tableView.tableHeaderView = self.headerView;
|
||||
|
||||
AppInfo * appInfo = [AppInfo sharedInfo];
|
||||
|
@ -79,7 +79,7 @@ extern NSString * const kAlohalyticsTapEventKey;
|
|||
{
|
||||
[Statistics logEvent:kStatSettingsOpenSection withParameters:@{kStatName : kStatRate}];
|
||||
[Alohalytics logEvent:kAlohalyticsTapEventKey withValue:@"rate"];
|
||||
[[UIApplication sharedApplication] rateVersionFrom:@"rate_menu_item"];
|
||||
[UIApplication.sharedApplication rateVersionFrom:@"rate_menu_item"];
|
||||
}
|
||||
else if (cell == self.copyrightCell)
|
||||
{
|
||||
|
|
|
@ -39,7 +39,7 @@ NSString * const kiOSEmail = @"ios@maps.me";
|
|||
NSString * html;
|
||||
if (GetPlatform().ConnectionStatus() == Platform::EConnectionType::CONNECTION_NONE)
|
||||
{
|
||||
NSString * path = [[NSBundle mainBundle] pathForResource:@"faq" ofType:@"html"];
|
||||
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];
|
||||
|
@ -143,18 +143,18 @@ NSString * const kiOSEmail = @"ios@maps.me";
|
|||
if ([MWMMailViewController canSendMail])
|
||||
{
|
||||
NSString * device = [AppInfo sharedInfo].deviceName;
|
||||
NSString * languageCode = [[NSLocale preferredLanguages] firstObject];
|
||||
NSString * languageCode = NSLocale.preferredLanguages.firstObject;
|
||||
NSString * language = [[NSLocale localeWithLocaleIdentifier:kLocaleUsedInSupportEmails]
|
||||
displayNameForKey:NSLocaleLanguageCode
|
||||
value:languageCode];
|
||||
NSString * locale = [[NSLocale currentLocale] objectForKey:NSLocaleCountryCode];
|
||||
NSString * locale = [NSLocale.currentLocale objectForKey:NSLocaleCountryCode];
|
||||
NSString * country = [[NSLocale localeWithLocaleIdentifier:kLocaleUsedInSupportEmails]
|
||||
displayNameForKey:NSLocaleCountryCode
|
||||
value:locale];
|
||||
NSString * bundleVersion = [AppInfo sharedInfo].bundleVersion;
|
||||
NSString * buildNumber = [AppInfo sharedInfo].buildNumber;
|
||||
NSString * text = [NSString stringWithFormat:@"\n\n\n\n- %@ (%@)\n- MAPS.ME %@ (%@)\n- %@/%@",
|
||||
device, [UIDevice currentDevice].systemVersion,
|
||||
device, UIDevice.currentDevice.systemVersion,
|
||||
bundleVersion, buildNumber, language, country];
|
||||
NSString * alohalyticsId = [Alohalytics installationId];
|
||||
if (alohalyticsId)
|
||||
|
|
|
@ -64,7 +64,7 @@ typedef NS_ENUM(NSUInteger, DurationInHours) { One = 1, Two = 2, Six = 6, Twelve
|
|||
if (!tracker.IsEnabled())
|
||||
{
|
||||
tracker.SetEnabled(true);
|
||||
NSUserDefaults * ud = [NSUserDefaults standardUserDefaults];
|
||||
NSUserDefaults * ud = NSUserDefaults.standardUserDefaults;
|
||||
[ud setBool:NO forKey:kUDTrackWarningAlertWasShown];
|
||||
[ud synchronize];
|
||||
}
|
||||
|
|
|
@ -38,7 +38,7 @@ using namespace locale_translator;
|
|||
|
||||
using namespace tts;
|
||||
NSString * currentBcp47 = [AVSpeechSynthesisVoice currentLanguageCode];
|
||||
string const currentBcp47Str = [currentBcp47 UTF8String];
|
||||
string const currentBcp47Str = currentBcp47.UTF8String;
|
||||
string const currentTwineStr = bcp47ToTwineLanguage(currentBcp47);
|
||||
if (currentBcp47Str != standart.first && !currentBcp47Str.empty())
|
||||
{
|
||||
|
@ -190,7 +190,7 @@ using namespace locale_translator;
|
|||
{
|
||||
[Statistics logEvent:kStatEventName(kStatTTSSettings, kStatHelp)];
|
||||
NSString * path =
|
||||
[[NSBundle mainBundle] pathForResource:@"tts-how-to-set-up-voice" ofType:@"html"];
|
||||
[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];
|
||||
|
|
|
@ -98,7 +98,7 @@ public:
|
|||
didFailWithError:(NSError *)error
|
||||
{
|
||||
UNUSED_VALUE(manager);
|
||||
LOG(LWARNING, ("locationManager failed with error", error.code, [error.description UTF8String]));
|
||||
LOG(LWARNING, ("locationManager failed with error", error.code, error.description.UTF8String));
|
||||
|
||||
if (error.code == kCLErrorDenied)
|
||||
m_service->OnDeniedError();
|
||||
|
|
|
@ -82,7 +82,7 @@ bool HttpClient::RunHttpRequest()
|
|||
if (err)
|
||||
{
|
||||
m_errorCode = static_cast<int>(err.code);
|
||||
LOG(LDEBUG, ("Error: ", m_errorCode, [err.localizedDescription UTF8String]));
|
||||
LOG(LDEBUG, ("Error: ", m_errorCode, err.localizedDescription.UTF8String));
|
||||
|
||||
return false;
|
||||
}
|
||||
|
@ -100,7 +100,7 @@ bool HttpClient::RunHttpRequest()
|
|||
if (response)
|
||||
{
|
||||
m_errorCode = static_cast<int>(response.statusCode);
|
||||
m_urlReceived = [response.URL.absoluteString UTF8String];
|
||||
m_urlReceived = response.URL.absoluteString.UTF8String;
|
||||
|
||||
if (m_loadHeaders)
|
||||
{
|
||||
|
@ -113,7 +113,7 @@ bool HttpClient::RunHttpRequest()
|
|||
{
|
||||
NSString * cookies = [response.allHeaderFields objectForKey:@"Set-Cookie"];
|
||||
if (cookies)
|
||||
m_headers.emplace("Set-Cookie", NormalizeServerCookies(std::move([cookies UTF8String])));
|
||||
m_headers.emplace("Set-Cookie", NormalizeServerCookies(std::move(cookies.UTF8String)));
|
||||
}
|
||||
|
||||
if (url_data)
|
||||
|
@ -137,7 +137,8 @@ bool HttpClient::RunHttpRequest()
|
|||
}
|
||||
|
||||
m_errorCode = static_cast<int>(err.code);
|
||||
LOG(LDEBUG, ("Error: ", m_errorCode, ':', [err.localizedDescription UTF8String], "while connecting to", m_urlRequested));
|
||||
LOG(LDEBUG, ("Error: ", m_errorCode, ':', err.localizedDescription.UTF8String,
|
||||
"while connecting to", m_urlRequested));
|
||||
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -111,8 +111,9 @@ static id<DownloadIndicatorProtocol> downloadIndicator = nil;
|
|||
return request;
|
||||
}
|
||||
// In all other cases we are cancelling redirects
|
||||
LOG(LWARNING, ("Canceling because of redirect from", [[[redirectResponse URL] absoluteString] UTF8String],
|
||||
"to", [[[request URL] absoluteString] UTF8String]));
|
||||
LOG(LWARNING,
|
||||
("Canceling because of redirect from", redirectResponse.URL.absoluteString.UTF8String, "to",
|
||||
request.URL.absoluteString.UTF8String));
|
||||
[connection cancel];
|
||||
m_callback->OnFinish(-3, m_begRange, m_endRange);
|
||||
return nil;
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue