Code refactored

This commit is contained in:
VladiMihaylenko 2015-03-16 13:52:47 +03:00 committed by Alex Zolotarev
parent 1f76925f6b
commit e3334bb005
23 changed files with 193 additions and 330 deletions

View file

@ -13,7 +13,7 @@
@interface NSObject (Optimized)
+ (NSString *)className;
- (void)performAfterDelay:(NSTimeInterval)delay block:(void (^)(void))block;
- (void)performAfterDelay:(NSTimeInterval)delayInSec block:(void (^)(void))block;
@end

View file

@ -8,9 +8,9 @@
return NSStringFromClass(self);
}
- (void)performAfterDelay:(NSTimeInterval)delay block:(void (^)(void))block
- (void)performAfterDelay:(NSTimeInterval)delayInSec block:(void (^)(void))block
{
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(delay * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(delayInSec * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
block();
});
}

View file

@ -8,25 +8,16 @@
#import <UIKit/UIKit.h>
typedef NS_ENUM(NSUInteger, MWMAlertType) {
MWMAlertTypeDownloadAllMaps,
MWMAlertTypeDownloadTransitMap,
MWMAlertTypeRouteNotFound,
MWMAlertTypePointsInDifferentMWM,
MWMAlertTypeInconsistentMWMandRoute,
MWMAlertTypeInternalError,
MWMAlertTypeNoCurrentPosition,
MWMAlertTypeEndPointNotFound,
MWMAlertTypeStartPointNotFound
};
#include "../../../routing/router.hpp"
#include "../../../std/vector.hpp"
#include "../../../storage/storage.hpp"
@class MWMAlertViewController;
@class MWMAlertEntity;
@interface MWMAlert : UIView
@property (nonatomic, weak) MWMAlertViewController *alertController;
+ (MWMAlert *)alertWithType:(MWMAlertType)type;
- (void)configureWithEntity:(MWMAlertEntity *)entity;
+ (MWMAlert *)alert:(routing::IRouter::ResultCode)type;
+ (MWMAlert *)downloaderAlertWithCountries:(vector<storage::TIndex> const&)countries;
@end

View file

@ -1,54 +0,0 @@
//
// MWMAlert.m
// Maps
//
// Created by v.mikhaylenko on 05.03.15.
// Copyright (c) 2015 MapsWithMe. All rights reserved.
//
#import "MWMAlert.h"
#import "MWMDownloadTransitMapAlert.h"
#import "MWMDownloadAllMapsAlert.h"
#import "MWMDefaultAlert.h"
@class MWMAlertEntity;
@implementation MWMAlert
+ (MWMAlert *)alertWithType:(MWMAlertType)type {
switch (type) {
case MWMAlertTypeDownloadTransitMap:
return [MWMDownloadTransitMapAlert alert];
case MWMAlertTypeDownloadAllMaps:
return [MWMDownloadAllMapsAlert alert];
case MWMAlertTypeRouteNotFound:
return [MWMDefaultAlert routeNotFoundAlert];
case MWMAlertTypeStartPointNotFound:
return [MWMDefaultAlert startPointNotFoundAlert];
case MWMAlertTypeEndPointNotFound:
return [MWMDefaultAlert endPointNotFoundAlert];
case MWMAlertTypeInconsistentMWMandRoute:
return [MWMDownloadAllMapsAlert alert];
case MWMAlertTypeInternalError:
return [MWMDefaultAlert internalErrorAlert];
case MWMAlertTypeNoCurrentPosition:
return [MWMDefaultAlert noCurrentPositionAlert];
case MWMAlertTypePointsInDifferentMWM:
return [MWMDefaultAlert pointsInDifferentMWMAlert];
}
}
- (void)configureWithEntity:(MWMAlertEntity *)entity {
[self doesNotRecognizeSelector:_cmd];
}
@end

View file

@ -0,0 +1,53 @@
//
// MWMAlert.m
// Maps
//
// Created by v.mikhaylenko on 05.03.15.
// Copyright (c) 2015 MapsWithMe. All rights reserved.
//
#import "MWMAlert.h"
#import "MWMDownloadTransitMapAlert.h"
#import "MWMDownloadAllMapsAlert.h"
#import "MWMDefaultAlert.h"
extern UIColor * const kActiveDownloaderViewColor = [UIColor colorWithRed:211/255. green:209/255. blue:205/255. alpha:1.];
@implementation MWMAlert
+ (MWMAlert *)downloaderAlertWithCountries:(const vector<storage::TIndex> &)countries {
return [MWMDownloadTransitMapAlert alertWithCountries:countries];
}
+ (MWMAlert *)alert:(routing::IRouter::ResultCode)type {
switch (type) {
case routing::IRouter::NoCurrentPosition:
return [MWMDefaultAlert noCurrentPositionAlert];
case routing::IRouter::InconsistentMWMandRoute:
case routing::IRouter::RouteFileNotExist:
return [MWMDownloadAllMapsAlert alert];
case routing::IRouter::StartPointNotFound:
return [MWMDefaultAlert startPointNotFoundAlert];
case routing::IRouter::EndPointNotFound:
return [MWMDefaultAlert endPointNotFoundAlert];
case routing::IRouter::PointsInDifferentMWM:
return [MWMDefaultAlert pointsInDifferentMWMAlert];
case routing::IRouter::RouteNotFound:
return [MWMDefaultAlert routeNotFoundAlert];
case routing::IRouter::InternalError:
return [MWMDefaultAlert internalErrorAlert];
case routing::IRouter::Cancelled:
case routing::IRouter::NoError:
return nil;
}
}
@end

View file

@ -1,23 +0,0 @@
//
// MWMMapsDownloaderDelegate.h
// Maps
//
// Created by v.mikhaylenko on 07.03.15.
// Copyright (c) 2015 MapsWithMe. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "MWMAlertViewControllerDelegate.h"
#include "../../../std/vector.hpp"
#include "../../../map/country_status_display.hpp"
@interface MWMAlertDownloaderManager : NSObject <MWMAlertViewControllerDelegate>
- (instancetype)initWithMapsIndexes:(const vector<storage::TIndex>&)indexes;
@property (nonatomic, copy) NSString *countryName;
@property (nonatomic, assign) NSUInteger size;
@end

View file

@ -1,30 +0,0 @@
//
// MWMMapsDownloaderDelegate.m
// Maps
//
// Created by v.mikhaylenko on 07.03.15.
// Copyright (c) 2015 MapsWithMe. All rights reserved.
//
#import "MWMAlertDownloaderManager.h"
#include "Framework.h"
@implementation MWMAlertDownloaderManager {
vector<storage::TIndex> _indexes;
}
- (instancetype)initWithMapsIndexes:(const vector<storage::TIndex> &)indexes {
self = [super init];
if (self) {
_indexes = indexes;
self.countryName = [NSString stringWithUTF8String:GetFramework().GetCountryTree().GetActiveMapLayout().GetFormatedCountryName(_indexes[0]).c_str()];
self.size = GetFramework().GetCountryTree().GetActiveMapLayout().GetCountrySize(_indexes[0], storage::TMapOptions::EMapWithCarRouting).second/(1024 * 1024);
}
return self;
}
- (void)downloadMaps {
GetFramework().GetCountryTree().GetActiveMapLayout().DownloadMap(_indexes[0], storage::TMapOptions::EMapWithCarRouting);
}
@end

View file

@ -1,19 +0,0 @@
//
// MWMAlertEntity.h
// Maps
//
// Created by v.mikhaylenko on 06.03.15.
// Copyright (c) 2015 MapsWithMe. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface MWMAlertEntity : NSObject
@property (nonatomic, copy) NSString *title;
@property (nonatomic, copy) NSString *message;
@property (nonatomic, copy) NSString *country;
@property (nonatomic, copy) NSString *location;
@property (nonatomic, assign) NSUInteger size;
@end

View file

@ -1,14 +0,0 @@
//
// MWMAlertEntity.m
// Maps
//
// Created by v.mikhaylenko on 06.03.15.
// Copyright (c) 2015 MapsWithMe. All rights reserved.
//
#import "MWMAlertEntity.h"
@implementation MWMAlertEntity
@end

View file

@ -8,15 +8,18 @@
#import <UIKit/UIKit.h>
#import "MWMAlert.h"
@protocol MWMAlertViewControllerDelegate;
#include "../../../routing/router.hpp"
#include "../../../std/vector.hpp"
#include "../../../storage/storage.hpp"
@interface MWMAlertViewController : UIViewController
@property (nonatomic, weak) id<MWMAlertViewControllerDelegate> delegate;
@property (nonatomic, weak, readonly) UIViewController *ownerViewController;
- (instancetype)initWithViewController:(UIViewController *)viewController;
- (void)presentAlertWithType:(MWMAlertType)type;
- (void)close;
- (void)presentAlert:(routing::IRouter::ResultCode)type;
- (void)presentDownloaderAlertWithCountries:(vector<storage::TIndex> const&)countries;
- (void)closeAlert;
@end

View file

@ -8,8 +8,6 @@
#import "MWMAlertViewController.h"
#import "MWMDownloadTransitMapAlert.h"
#import "MWMAlertEntity.h"
#import "MWMAlertViewControllerDelegate.h"
static NSString * const kAlertControllerNibIdentifier = @"MWMAlertViewController";
@ -30,9 +28,9 @@ static NSString * const kAlertControllerNibIdentifier = @"MWMAlertViewController
- (void)viewDidLoad {
[super viewDidLoad];
self.view.frame = UIApplication.sharedApplication.delegate.window.bounds;
self.view.frame = UIApplication.sharedApplication.keyWindow.bounds;
//Need only for iOS 5
// Need only for iOS 5.
if ([[[UIDevice currentDevice] systemVersion] integerValue] < 6) {
self.tap.delegate = self;
}
@ -40,22 +38,18 @@ static NSString * const kAlertControllerNibIdentifier = @"MWMAlertViewController
#pragma mark - Actions
- (void)presentAlertWithType:(MWMAlertType)type {
MWMAlert *alert = [MWMAlert alertWithType:type];
- (void)presentDownloaderAlertWithCountries:(const vector<storage::TIndex> &)countries {
MWMAlert *alert = [MWMAlert downloaderAlertWithCountries:countries];
[self displayAlert:alert];
}
- (void)presentAlert:(routing::IRouter::ResultCode)type {
MWMAlert *alert = [MWMAlert alert:type];
[self displayAlert:alert];
}
- (void)displayAlert:(MWMAlert *)alert {
alert.alertController = self;
switch (type) {
case MWMAlertTypeDownloadTransitMap: {
MWMAlertEntity *entity = [[MWMAlertEntity alloc] init];
entity.country = self.delegate.countryName;
entity.size = self.delegate.size;
[alert configureWithEntity:entity];
break;
}
case MWMAlertTypeDownloadAllMaps:
case MWMAlertTypeRouteNotFound:
break;
}
[self.ownerViewController addChildViewController:self];
self.view.center = self.ownerViewController.view.center;
[self.ownerViewController.view addSubview:self.view];
@ -63,12 +57,14 @@ static NSString * const kAlertControllerNibIdentifier = @"MWMAlertViewController
alert.center = self.view.center;
}
- (void)close {
- (void)closeAlert {
self.ownerViewController.view.userInteractionEnabled = YES;
[self.view removeFromSuperview];
[self removeFromParentViewController];
}
#pragma mark - Gesture intercepter
- (IBAction)backgroundTap:(UITapGestureRecognizer *)sender {
return;
}
@ -89,7 +85,7 @@ static NSString * const kAlertControllerNibIdentifier = @"MWMAlertViewController
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch {
if ([touch.view isKindOfClass:[UIControl class]]) {
[(UIButton *)touch.view sendActionsForControlEvents:UIControlEventTouchUpInside];
[(UIControl *)touch.view sendActionsForControlEvents:UIControlEventTouchUpInside];
}
return YES;
}

View file

@ -47,7 +47,6 @@ static NSString * const kDefaultAlertNibName = @"MWMDefaultAlert";
return [self defaultAlertWithLocalizedText:@"routing_failed_cross_mwm_building"];
}
+ (instancetype)defaultAlertWithLocalizedText:(NSString *)text {
MWMDefaultAlert *alert = [[[NSBundle mainBundle] loadNibNamed:kDefaultAlertNibName owner:self options:nil] firstObject];
alert.messageLabel.localizedText = text;
@ -58,7 +57,7 @@ static NSString * const kDefaultAlertNibName = @"MWMDefaultAlert";
#pragma mark - Actions
- (IBAction)okButtonTap:(id)sender {
[self.alertController close];
[self.alertController closeAlert];
}
@end

View file

@ -23,7 +23,6 @@
const CGFloat thirdMainViewOffset = 20.;
const CGFloat bottomMainViewOffset = 52.;
const CGFloat mainViewHeight = topMainViewOffset + self.titleLabel.height + secondMainViewOffset + self.messageLabel.height + thirdMainViewOffset + self.specsView.height + bottomMainViewOffset;
self.autoresizesSubviews = YES;
self.height = mainViewHeight;
self.titleLabel.minY = topMainViewOffset;
self.messageLabel.minY = self.titleLabel.minY + self.titleLabel.height + secondMainViewOffset;

View file

@ -21,6 +21,8 @@
@end
static NSString * const kDownloadAllMapsAlertNibName = @"MWMDownloadAllMapsAlert";
extern UIColor * const kActiveDownloaderViewColor;
static NSInteger const kNodePositionForDownloadMaps = -1;
@implementation MWMDownloadAllMapsAlert
@ -33,15 +35,15 @@ static NSString * const kDownloadAllMapsAlertNibName = @"MWMDownloadAllMapsAlert
#pragma mark - Actions
- (IBAction)notNowButtonTap:(id)sender {
[self.alertController close];
[self.alertController closeAlert];
}
- (IBAction)downloadMapsButtonTap:(id)sender {
[UIView animateWithDuration:0.2f animations:^{
self.specsView.backgroundColor = [UIColor colorWithRed:211/255. green:209/255. blue:205/255. alpha:1.];
self.specsView.backgroundColor = kActiveDownloaderViewColor;
} completion:^(BOOL finished) {
[self.alertController close];
CountryTreeVC *viewController = [[CountryTreeVC alloc] initWithNodePosition:-1];
[self.alertController closeAlert];
CountryTreeVC *viewController = [[CountryTreeVC alloc] initWithNodePosition:kNodePositionForDownloadMaps];
[self.alertController.ownerViewController.navigationController pushViewController:viewController animated:YES];
}];
}

View file

@ -36,17 +36,16 @@
<action selector="downloadMapsButtonTap:" destination="iN0-l3-epB" eventType="touchUpInside" id="4BO-Hf-EUE"/>
</connections>
</button>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Download maps" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="0a5-pt-lJD">
<rect key="frame" x="0.0" y="16" width="280" height="17"/>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Champagne-Ardenne" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="Fuw-Ys-Jmu">
<rect key="frame" x="23" y="15" width="239" height="19"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="16"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.81999999999999995" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="localizedText" value="download_maps"/>
</userDefinedRuntimeAttributes>
</label>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" id="eFe-Uk-Foc">
<rect key="frame" x="31" y="14" width="16" height="22"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
</imageView>
</subviews>
<color key="backgroundColor" red="0.96862745098039216" green="0.96078431372549022" blue="0.94117647058823528" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</view>
@ -94,13 +93,13 @@
</userDefinedRuntimeAttributes>
<connections>
<outlet property="downloadButton" destination="qq0-AY-zm6" id="VFS-uN-baX"/>
<outlet property="downloadMapsLabel" destination="0a5-pt-lJD" id="BRq-Gn-f93"/>
<outlet property="downloadMapsLabel" destination="Fuw-Ys-Jmu" id="wF3-tV-mqR"/>
<outlet property="messageLabel" destination="e9b-ae-kho" id="4TS-hw-lG0"/>
<outlet property="notNowButton" destination="Mxy-pG-5oc" id="rPh-od-SvP"/>
<outlet property="specsView" destination="BTz-50-QHZ" id="UAw-2W-iu5"/>
<outlet property="titleLabel" destination="Pcv-OL-Jdp" id="L51-Oh-h8b"/>
</connections>
<point key="canvasLocation" x="342" y="261"/>
<point key="canvasLocation" x="342" y="260.5"/>
</view>
</objects>
<simulatedMetricsContainer key="defaultSimulatedMetrics">

View file

@ -21,7 +21,7 @@
- (void)configureSpecsViewSize {
const CGFloat topSpecsViewOffset = 16.;
const CGFloat specsViewHeight = 2 *topSpecsViewOffset + self.countryLabel.frame.size.height;
const CGFloat specsViewHeight = 2 * topSpecsViewOffset + self.countryLabel.frame.size.height;
self.specsView.height = specsViewHeight;
self.countryLabel.minY = topSpecsViewOffset;
self.sizeLabel.center = CGPointMake(self.sizeLabel.center.x, self.countryLabel.center.y);

View file

@ -8,12 +8,12 @@
#import "MWMAlert.h"
@class MWMAlertEntity;
#include "../../../std/vector.hpp"
#include "../../../storage/storage.hpp"
@interface MWMDownloadTransitMapAlert : MWMAlert
+ (instancetype)alert;
- (void)configureWithEntity:(MWMAlertEntity *)entity;
+ (instancetype)alertWithCountries:(vector<storage::TIndex> const &)countries;
@property (nonatomic, weak, readonly) IBOutlet UILabel *titleLabel;
@property (nonatomic, weak, readonly) IBOutlet UILabel *messageLabel;

View file

@ -8,11 +8,12 @@
#import "MWMDownloadTransitMapAlert.h"
#import "MWMAlertViewController.h"
#import "MWMAlertEntity.h"
#import "MWMAlertViewControllerDelegate.h"
#import "ActiveMapsVC.h"
#import "MWMDownloadTransitMapAlert+Configure.h"
typedef void (^MWMDownloaderBlock)();
@interface MWMDownloadTransitMapAlert ()
@property (nonatomic, weak, readwrite) IBOutlet UILabel *titleLabel;
@property (nonatomic, weak, readwrite) IBOutlet UILabel *messageLabel;
@ -21,27 +22,30 @@
@property (nonatomic, weak, readwrite) IBOutlet UILabel *sizeLabel;
@property (nonatomic, weak, readwrite) IBOutlet UILabel *countryLabel;
@property (nonatomic, weak, readwrite) IBOutlet UIView *specsView;
@property (nonatomic, copy) MWMDownloaderBlock downloaderBlock;
@end
static NSString * kDownloadTransitMapAlertNibName = @"MWMDownloadTransitMapAlert";
static NSString * const kDownloadTransitMapAlertNibName = @"MWMDownloadTransitMapAlert";
extern UIColor * const kActiveDownloaderViewColor;
@implementation MWMDownloadTransitMapAlert
+ (instancetype)alert {
+ (instancetype)alertWithCountries:(const vector<storage::TIndex> &)countries {
MWMDownloadTransitMapAlert *alert = [[[NSBundle mainBundle] loadNibNamed:kDownloadTransitMapAlertNibName owner:self options:nil] firstObject];
ActiveMapsLayout& layout = GetFramework().GetCountryTree().GetActiveMapLayout();
alert.countryLabel.text = [NSString stringWithUTF8String:layout.GetFormatedCountryName(countries[0]).c_str()];
alert.sizeLabel.text = [NSString stringWithFormat:@"%@ %@", @(layout.GetCountrySize(countries[0], storage::TMapOptions::EMapWithCarRouting).second/(1024 * 1024)), L(@"mb")];
alert.downloaderBlock = ^{
layout.DownloadMap(countries[0], storage::TMapOptions::EMapWithCarRouting);
};
[alert configure];
return alert;
}
- (void)configureWithEntity:(MWMAlertEntity *)entity {
self.sizeLabel.text = [NSString stringWithFormat:@"%@ MB",@(entity.size)];
self.countryLabel.text = entity.country;
[self configure];
}
#pragma mark - Actions
- (IBAction)notNowButtonTap:(id)sender {
[self.alertController close];
[self.alertController closeAlert];
}
- (IBAction)downloadButtonTap:(id)sender {
@ -50,15 +54,15 @@ static NSString * kDownloadTransitMapAlertNibName = @"MWMDownloadTransitMapAlert
- (IBAction)specsViewTap:(id)sender {
[UIView animateWithDuration:0.2f animations:^{
self.specsView.backgroundColor = [UIColor colorWithRed:211/255. green:209/255. blue:205/255. alpha:1.];
self.specsView.backgroundColor = kActiveDownloaderViewColor;
} completion:^(BOOL finished) {
[self downloadMaps];
}];
}
- (void)downloadMaps {
[self.alertController.delegate downloadMaps];
[self.alertController close];
self.downloaderBlock();
[self.alertController closeAlert];
ActiveMapsVC *activeMapsViewController = [[ActiveMapsVC alloc] init];
[self.alertController.ownerViewController.navigationController pushViewController:activeMapsViewController animated:YES];
}

View file

@ -16,7 +16,6 @@
#import "CountryTreeVC.h"
#import "Reachability.h"
#import "MWMAlertViewController.h"
#import "MWMAlertDownloaderManager.h"
#import "../../Common/CustomAlertView.h"
@ -81,7 +80,6 @@
@property (nonatomic) ContainerView * containerView;
@property (nonatomic) UIImageView * apiBar;
@property (nonatomic) UILabel * apiTitleLabel;
@property (nonatomic, strong) MWMAlertDownloaderManager *downloaderManager;
@end
@ -151,21 +149,24 @@
if (res.IsValid())
{
NSMutableDictionary *routeInfo = [NSMutableDictionary dictionary];
routeInfo[@"timeToTarget"] = @(res.m_time);
routeInfo[@"targetDistance"] = [NSString stringWithUTF8String:res.m_distToTarget.c_str()];
routeInfo[@"targetMetrics"] = [NSString stringWithUTF8String:res.m_targetUnitsSuffix.c_str()];
routeInfo[@"turnDistance"] = [NSString stringWithUTF8String:res.m_distToTurn.c_str()];
routeInfo[@"turnMetrics"] = [NSString stringWithUTF8String:res.m_turnUnitsSuffix.c_str()];
routeInfo[@"turnType"] = [self turnTypeToImage:res.m_turn];
NSMutableDictionary *routeInfo = [@{
@"timeToTarget" : @(res.m_time),
@"targetDistance" : [NSString stringWithUTF8String:res.m_distToTarget.c_str()],
@"targetMetrics" : [NSString stringWithUTF8String:res.m_targetUnitsSuffix.c_str()],
@"turnDistance" : [NSString stringWithUTF8String:res.m_distToTurn.c_str()],
@"turnMetrics" : [NSString stringWithUTF8String:res.m_turnUnitsSuffix.c_str()],
@"turnType" : [self turnTypeToImage:res.m_turn]
} mutableCopy];
static NSNumber * turnTypeValue;
if (res.m_turn == routing::turns::EnterRoundAbout)
turnTypeValue = @(res.m_exitNum);
else if (res.m_turn != routing::turns::StayOnRoundAbout)
turnTypeValue = nil;
if (turnTypeValue)
routeInfo[@"turnTypeValue"] = turnTypeValue;
[self.routeView updateWithInfo:routeInfo];
if (turnTypeValue) {
[routeInfo setObject:turnTypeValue forKey:@"turnTypeValue"];
}
[self.routeView updateWithInfo:routeInfo.copy];
}
}
}
@ -771,41 +772,17 @@
break;
}
case routing::IRouter::ResultCode::RouteFileNotExist:
[self presentDownloaderAlertWithType:MWMAlertTypeDownloadAllMaps countries:absentCountries];
break;
case routing::IRouter::ResultCode::RouteNotFound:
[self presentDownloaderAlertWithType:MWMAlertTypeRouteNotFound countries:absentCountries];
break;
case routing::IRouter::ResultCode::PointsInDifferentMWM:
[self presentDefaultAlertWithType:MWMAlertTypePointsInDifferentMWM];
case routing::IRouter::RouteFileNotExist:
case routing::IRouter::RouteNotFound:
case routing::IRouter::InconsistentMWMandRoute:
[self presentDownloaderAlert:code countries:absentCountries];
break;
case routing::IRouter::ResultCode::InconsistentMWMandRoute:
[self presentDownloaderAlertWithType:MWMAlertTypeInconsistentMWMandRoute countries:absentCountries];
break;
case routing::IRouter::ResultCode::InternalError:
[self presentDefaultAlertWithType:MWMAlertTypeInternalError];
break;
case routing::IRouter::ResultCode::NoCurrentPosition:
[self presentDefaultAlertWithType:MWMAlertTypeNoCurrentPosition];
break;
case routing::IRouter::ResultCode::Cancelled:
break;
case routing::IRouter::ResultCode::EndPointNotFound:
[self presentDefaultAlertWithType:MWMAlertTypeEndPointNotFound];
break;
case routing::IRouter::ResultCode::StartPointNotFound:
[self presentDefaultAlertWithType:MWMAlertTypeStartPointNotFound];
case routing::IRouter::Cancelled:
break;
default:
[self presentDefaultAlert:code];
break;
}
});
@ -834,24 +811,18 @@
[[[UIAlertView alloc] initWithTitle:[NSString stringWithUTF8String:message.c_str()] message:nil delegate:self cancelButtonTitle:L(@"ok") otherButtonTitles:nil] show];
}
- (void)presentDownloaderAlertWithType:(MWMAlertType)type countries:(vector<storage::TIndex> const&)countries {
- (void)presentDownloaderAlert:(routing::IRouter::ResultCode)type countries:(vector<storage::TIndex> const&)countries {
if (countries.size()) {
[self presentDownloaderAlertWithCountries:countries];
MWMAlertViewController *alert = [[MWMAlertViewController alloc] initWithViewController:self];
[alert presentDownloaderAlertWithCountries:countries];
} else {
[self presentDefaultAlertWithType:type];
[self presentDefaultAlert:type];
}
}
- (void)presentDefaultAlertWithType:(MWMAlertType)type {
- (void)presentDefaultAlert:(routing::IRouter::ResultCode)type {
MWMAlertViewController *alert = [[MWMAlertViewController alloc] initWithViewController:self];
[alert presentAlertWithType:type];
}
- (void)presentDownloaderAlertWithCountries:(vector<storage::TIndex> const&)countries {
MWMAlertViewController *alert = [[MWMAlertViewController alloc] initWithViewController:self];
self.downloaderManager = [[MWMAlertDownloaderManager alloc] initWithMapsIndexes:countries];
alert.delegate = self.downloaderManager;
[alert presentAlertWithType:MWMAlertTypeDownloadTransitMap];
[alert presentAlert:type];
}
#pragma mark - Getters

View file

@ -400,8 +400,4 @@ void InitLocalizedStrings()
[UIApplication sharedApplication].applicationIconBadgeNumber = [[notification userInfo][@"OutOfDate"] integerValue];
}
- (UIWindow *)window {
return self->m_window;
}
@end

View file

@ -116,20 +116,18 @@
EED10A4511F78D120095FAD4 /* MapViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = EED10A4411F78D120095FAD4 /* MapViewController.mm */; };
EEFE7C1412F8C9E1006AF8C3 /* fonts_blacklist.txt in Resources */ = {isa = PBXBuildFile; fileRef = EEFE7C1212F8C9E1006AF8C3 /* fonts_blacklist.txt */; };
EEFE7C1512F8C9E1006AF8C3 /* fonts_whitelist.txt in Resources */ = {isa = PBXBuildFile; fileRef = EEFE7C1312F8C9E1006AF8C3 /* fonts_whitelist.txt */; };
F613FA7A1AB336D6002394D4 /* MWMDefaultAlert.mm in Sources */ = {isa = PBXBuildFile; fileRef = F613FA781AB336D6002394D4 /* MWMDefaultAlert.mm */; };
F613FA7B1AB336D6002394D4 /* MWMDefaultAlert.xib in Resources */ = {isa = PBXBuildFile; fileRef = F613FA791AB336D6002394D4 /* MWMDefaultAlert.xib */; };
F613FA7F1AB336F3002394D4 /* MWMDefaultAlert+Configure.m in Sources */ = {isa = PBXBuildFile; fileRef = F613FA7E1AB336F3002394D4 /* MWMDefaultAlert+Configure.m */; };
F613FA6A1AB1FCA8002394D4 /* MWMDefaultAlert.mm in Sources */ = {isa = PBXBuildFile; fileRef = F613FA691AB1FCA8002394D4 /* MWMDefaultAlert.mm */; };
F613FA6C1AB1FD97002394D4 /* MWMDefaultAlert.xib in Resources */ = {isa = PBXBuildFile; fileRef = F613FA6B1AB1FD97002394D4 /* MWMDefaultAlert.xib */; };
F613FA701AB2002F002394D4 /* MWMDefaultAlert+Configure.mm in Sources */ = {isa = PBXBuildFile; fileRef = F613FA6F1AB2002F002394D4 /* MWMDefaultAlert+Configure.mm */; };
F62404FB1AAF3DB200B58DB6 /* UILabel+RuntimeAttributes.m in Sources */ = {isa = PBXBuildFile; fileRef = F62404FA1AAF3DB200B58DB6 /* UILabel+RuntimeAttributes.m */; };
F63CC8B11AAF0E600019338C /* MWMDownloadAllMapsAlert.mm in Sources */ = {isa = PBXBuildFile; fileRef = F63CC8B01AAF0E600019338C /* MWMDownloadAllMapsAlert.mm */; };
F63CC8B31AAF0E8D0019338C /* MWMDownloadAllMapsAlert.xib in Resources */ = {isa = PBXBuildFile; fileRef = F63CC8B21AAF0E8D0019338C /* MWMDownloadAllMapsAlert.xib */; };
F6613E001AB1987300C67437 /* MWMDownloadAllMapsAlert+Configure.m in Sources */ = {isa = PBXBuildFile; fileRef = F6613DFF1AB1987300C67437 /* MWMDownloadAllMapsAlert+Configure.m */; };
F6613E041AB199D000C67437 /* MWMDownloadTransitMapAlert+Configure.m in Sources */ = {isa = PBXBuildFile; fileRef = F6613E031AB199CF00C67437 /* MWMDownloadTransitMapAlert+Configure.m */; };
F6A85A201AAB1175003667A2 /* MWMAlertDownloaderManager.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6A85A1F1AAB1175003667A2 /* MWMAlertDownloaderManager.mm */; };
F6BAADD81AB058AE0095D0C7 /* MWMAlertEntity.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6BAADD71AB058AE0095D0C7 /* MWMAlertEntity.mm */; };
F6613E001AB1987300C67437 /* MWMDownloadAllMapsAlert+Configure.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6613DFF1AB1987300C67437 /* MWMDownloadAllMapsAlert+Configure.mm */; };
F6613E041AB199D000C67437 /* MWMDownloadTransitMapAlert+Configure.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6613E031AB199CF00C67437 /* MWMDownloadTransitMapAlert+Configure.mm */; };
F6DBF9A01AA75B6D00F2EC2C /* MWMDownloadTransitMapAlert.xib in Resources */ = {isa = PBXBuildFile; fileRef = F6DBF99F1AA75B6D00F2EC2C /* MWMDownloadTransitMapAlert.xib */; };
F6DBF9AC1AA847ED00F2EC2C /* MWMAlertViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6DBF9AA1AA847ED00F2EC2C /* MWMAlertViewController.mm */; };
F6DBF9AD1AA847ED00F2EC2C /* MWMAlertViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = F6DBF9AB1AA847ED00F2EC2C /* MWMAlertViewController.xib */; };
F6DBF9B01AA85E3500F2EC2C /* MWMAlert.m in Sources */ = {isa = PBXBuildFile; fileRef = F6DBF9AF1AA85E3500F2EC2C /* MWMAlert.m */; };
F6DBF9B01AA85E3500F2EC2C /* MWMAlert.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6DBF9AF1AA85E3500F2EC2C /* MWMAlert.mm */; };
F6DBF9B31AA8611A00F2EC2C /* MWMDownloadTransitMapAlert.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6DBF9B21AA8611A00F2EC2C /* MWMDownloadTransitMapAlert.mm */; };
F6DBF9B61AA8779300F2EC2C /* CALayer+RuntimeAttributes.m in Sources */ = {isa = PBXBuildFile; fileRef = F6DBF9B51AA8779300F2EC2C /* CALayer+RuntimeAttributes.m */; };
F785EB4016386FC4003A38A8 /* BookmarkCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = F785EB3F16386FC4003A38A8 /* BookmarkCell.mm */; };
@ -381,31 +379,27 @@
EED10A4411F78D120095FAD4 /* MapViewController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; lineEnding = 0; path = MapViewController.mm; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
EEFE7C1212F8C9E1006AF8C3 /* fonts_blacklist.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = fonts_blacklist.txt; path = ../../data/fonts_blacklist.txt; sourceTree = "<group>"; };
EEFE7C1312F8C9E1006AF8C3 /* fonts_whitelist.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = fonts_whitelist.txt; path = ../../data/fonts_whitelist.txt; sourceTree = "<group>"; };
F613FA771AB336D6002394D4 /* MWMDefaultAlert.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMDefaultAlert.h; sourceTree = "<group>"; };
F613FA781AB336D6002394D4 /* MWMDefaultAlert.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMDefaultAlert.mm; sourceTree = "<group>"; };
F613FA791AB336D6002394D4 /* MWMDefaultAlert.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMDefaultAlert.xib; sourceTree = "<group>"; };
F613FA7D1AB336F3002394D4 /* MWMDefaultAlert+Configure.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "MWMDefaultAlert+Configure.h"; sourceTree = "<group>"; };
F613FA7E1AB336F3002394D4 /* MWMDefaultAlert+Configure.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "MWMDefaultAlert+Configure.m"; sourceTree = "<group>"; };
F613FA681AB1FCA8002394D4 /* MWMDefaultAlert.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMDefaultAlert.h; sourceTree = "<group>"; };
F613FA691AB1FCA8002394D4 /* MWMDefaultAlert.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMDefaultAlert.mm; sourceTree = "<group>"; };
F613FA6B1AB1FD97002394D4 /* MWMDefaultAlert.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMDefaultAlert.xib; sourceTree = "<group>"; };
F613FA6E1AB2002F002394D4 /* MWMDefaultAlert+Configure.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "MWMDefaultAlert+Configure.h"; sourceTree = "<group>"; };
F613FA6F1AB2002F002394D4 /* MWMDefaultAlert+Configure.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = "MWMDefaultAlert+Configure.mm"; sourceTree = "<group>"; };
F62404F91AAF3DB200B58DB6 /* UILabel+RuntimeAttributes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UILabel+RuntimeAttributes.h"; sourceTree = "<group>"; };
F62404FA1AAF3DB200B58DB6 /* UILabel+RuntimeAttributes.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UILabel+RuntimeAttributes.m"; sourceTree = "<group>"; };
F63CC8AF1AAF0E600019338C /* MWMDownloadAllMapsAlert.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; fileEncoding = 4; path = MWMDownloadAllMapsAlert.h; sourceTree = "<group>"; };
F63CC8B01AAF0E600019338C /* MWMDownloadAllMapsAlert.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMDownloadAllMapsAlert.mm; sourceTree = "<group>"; };
F63CC8B21AAF0E8D0019338C /* MWMDownloadAllMapsAlert.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMDownloadAllMapsAlert.xib; sourceTree = "<group>"; };
F6613DFE1AB1987300C67437 /* MWMDownloadAllMapsAlert+Configure.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "MWMDownloadAllMapsAlert+Configure.h"; sourceTree = "<group>"; };
F6613DFF1AB1987300C67437 /* MWMDownloadAllMapsAlert+Configure.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "MWMDownloadAllMapsAlert+Configure.m"; sourceTree = "<group>"; };
F6613DFF1AB1987300C67437 /* MWMDownloadAllMapsAlert+Configure.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = "MWMDownloadAllMapsAlert+Configure.mm"; sourceTree = "<group>"; };
F6613E021AB199CF00C67437 /* MWMDownloadTransitMapAlert+Configure.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "MWMDownloadTransitMapAlert+Configure.h"; sourceTree = "<group>"; };
F6613E031AB199CF00C67437 /* MWMDownloadTransitMapAlert+Configure.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "MWMDownloadTransitMapAlert+Configure.m"; sourceTree = "<group>"; };
F6A85A1E1AAB1175003667A2 /* MWMAlertDownloaderManager.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; fileEncoding = 4; path = MWMAlertDownloaderManager.h; sourceTree = "<group>"; };
F6A85A1F1AAB1175003667A2 /* MWMAlertDownloaderManager.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMAlertDownloaderManager.mm; sourceTree = "<group>"; };
F6613E031AB199CF00C67437 /* MWMDownloadTransitMapAlert+Configure.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = "MWMDownloadTransitMapAlert+Configure.mm"; sourceTree = "<group>"; };
F6A85A211AAB1408003667A2 /* MWMAlertViewControllerDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMAlertViewControllerDelegate.h; sourceTree = "<group>"; };
F6BAADD61AB058AE0095D0C7 /* MWMAlertEntity.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMAlertEntity.h; sourceTree = "<group>"; };
F6BAADD71AB058AE0095D0C7 /* MWMAlertEntity.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMAlertEntity.mm; sourceTree = "<group>"; };
F6DBF99F1AA75B6D00F2EC2C /* MWMDownloadTransitMapAlert.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMDownloadTransitMapAlert.xib; sourceTree = "<group>"; };
F6DBF9A91AA847ED00F2EC2C /* MWMAlertViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMAlertViewController.h; sourceTree = "<group>"; };
F6DBF9AA1AA847ED00F2EC2C /* MWMAlertViewController.mm */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.objcpp; fileEncoding = 4; path = MWMAlertViewController.mm; sourceTree = "<group>"; };
F6DBF9AB1AA847ED00F2EC2C /* MWMAlertViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMAlertViewController.xib; sourceTree = "<group>"; };
F6DBF9AE1AA85E3500F2EC2C /* MWMAlert.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMAlert.h; sourceTree = "<group>"; };
F6DBF9AF1AA85E3500F2EC2C /* MWMAlert.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MWMAlert.m; sourceTree = "<group>"; };
F6DBF9AE1AA85E3500F2EC2C /* MWMAlert.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; fileEncoding = 4; path = MWMAlert.h; sourceTree = "<group>"; };
F6DBF9AF1AA85E3500F2EC2C /* MWMAlert.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMAlert.mm; sourceTree = "<group>"; };
F6DBF9B11AA8611A00F2EC2C /* MWMDownloadTransitMapAlert.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMDownloadTransitMapAlert.h; sourceTree = "<group>"; };
F6DBF9B21AA8611A00F2EC2C /* MWMDownloadTransitMapAlert.mm */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.objcpp; fileEncoding = 4; path = MWMDownloadTransitMapAlert.mm; sourceTree = "<group>"; };
F6DBF9B41AA8779300F2EC2C /* CALayer+RuntimeAttributes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "CALayer+RuntimeAttributes.h"; sourceTree = "<group>"; };
@ -557,8 +551,7 @@
46F26CD710F623BA00ECCA39 /* EAGLView.mm */,
1D3623240D0F684500981E51 /* MapsAppDelegate.h */,
1D3623250D0F684500981E51 /* MapsAppDelegate.mm */,
46F8A2EB10EB63040045521A /* MapViewController.h */,
EED10A4411F78D120095FAD4 /* MapViewController.mm */,
F613FA741AB330AF002394D4 /* MapViewController */,
FAF457E415597BC100DCCC49 /* Framework.h */,
FAF457E615597D4600DCCC49 /* Framework.cpp */,
97DEA09018D706C300C5F963 /* Common.h */,
@ -850,26 +843,35 @@
path = Statistics;
sourceTree = "<group>";
};
F613FA761AB336B8002394D4 /* DefaultAlert */ = {
F613FA671AB1FBD1002394D4 /* DefaultAlert */ = {
isa = PBXGroup;
children = (
F613FA771AB336D6002394D4 /* MWMDefaultAlert.h */,
F613FA781AB336D6002394D4 /* MWMDefaultAlert.mm */,
F613FA791AB336D6002394D4 /* MWMDefaultAlert.xib */,
F613FA7C1AB336E8002394D4 /* Configure */,
F613FA681AB1FCA8002394D4 /* MWMDefaultAlert.h */,
F613FA691AB1FCA8002394D4 /* MWMDefaultAlert.mm */,
F613FA6B1AB1FD97002394D4 /* MWMDefaultAlert.xib */,
F613FA6D1AB2000F002394D4 /* Configure */,
);
name = DefaultAlert;
sourceTree = "<group>";
};
F613FA7C1AB336E8002394D4 /* Configure */ = {
F613FA6D1AB2000F002394D4 /* Configure */ = {
isa = PBXGroup;
children = (
F613FA7D1AB336F3002394D4 /* MWMDefaultAlert+Configure.h */,
F613FA7E1AB336F3002394D4 /* MWMDefaultAlert+Configure.m */,
F613FA6E1AB2002F002394D4 /* MWMDefaultAlert+Configure.h */,
F613FA6F1AB2002F002394D4 /* MWMDefaultAlert+Configure.mm */,
);
name = Configure;
sourceTree = "<group>";
};
F613FA741AB330AF002394D4 /* MapViewController */ = {
isa = PBXGroup;
children = (
46F8A2EB10EB63040045521A /* MapViewController.h */,
EED10A4411F78D120095FAD4 /* MapViewController.mm */,
);
name = MapViewController;
sourceTree = "<group>";
};
F63CC8AE1AAF0E350019338C /* DownloadAllMaps */ = {
isa = PBXGroup;
children = (
@ -885,7 +887,7 @@
isa = PBXGroup;
children = (
F6613DFE1AB1987300C67437 /* MWMDownloadAllMapsAlert+Configure.h */,
F6613DFF1AB1987300C67437 /* MWMDownloadAllMapsAlert+Configure.m */,
F6613DFF1AB1987300C67437 /* MWMDownloadAllMapsAlert+Configure.mm */,
);
name = Configure;
sourceTree = "<group>";
@ -894,7 +896,7 @@
isa = PBXGroup;
children = (
F6613E021AB199CF00C67437 /* MWMDownloadTransitMapAlert+Configure.h */,
F6613E031AB199CF00C67437 /* MWMDownloadTransitMapAlert+Configure.m */,
F6613E031AB199CF00C67437 /* MWMDownloadTransitMapAlert+Configure.mm */,
);
name = Configure;
sourceTree = "<group>";
@ -910,15 +912,6 @@
name = DownloadTransitMap;
sourceTree = "<group>";
};
F6BAADD91AB058BD0095D0C7 /* Entity */ = {
isa = PBXGroup;
children = (
F6BAADD61AB058AE0095D0C7 /* MWMAlertEntity.h */,
F6BAADD71AB058AE0095D0C7 /* MWMAlertEntity.mm */,
);
name = Entity;
sourceTree = "<group>";
};
F6DBF99E1AA75AA700F2EC2C /* Custom Alert */ = {
isa = PBXGroup;
children = (
@ -927,13 +920,10 @@
F6DBF9AA1AA847ED00F2EC2C /* MWMAlertViewController.mm */,
F6DBF9AB1AA847ED00F2EC2C /* MWMAlertViewController.xib */,
F6DBF9AE1AA85E3500F2EC2C /* MWMAlert.h */,
F6DBF9AF1AA85E3500F2EC2C /* MWMAlert.m */,
F6DBF9AF1AA85E3500F2EC2C /* MWMAlert.mm */,
F63CC8AE1AAF0E350019338C /* DownloadAllMaps */,
F6A85A161AA9CAAD003667A2 /* DownloadTransitMap */,
F613FA761AB336B8002394D4 /* DefaultAlert */,
F6A85A1E1AAB1175003667A2 /* MWMAlertDownloaderManager.h */,
F6A85A1F1AAB1175003667A2 /* MWMAlertDownloaderManager.mm */,
F6BAADD91AB058BD0095D0C7 /* Entity */,
F613FA671AB1FBD1002394D4 /* DefaultAlert */,
);
name = "Custom Alert";
sourceTree = "<group>";
@ -1121,7 +1111,7 @@
ORGANIZATIONNAME = MapsWithMe;
TargetAttributes = {
1D6058900D05DD3D006BFB54 = {
DevelopmentTeam = N9X2A789QT;
DevelopmentTeam = XMK5825GXK;
SystemCapabilities = {
com.apple.BackgroundModes = {
enabled = 1;
@ -1207,7 +1197,6 @@
978F9247183B6671000D6C7C /* Main_iPhone.storyboard in Resources */,
FA459EB414327AF700B5BB3C /* WorldCoasts.mwm in Resources */,
FA85F633145DDDC20090E1A0 /* packed_polygons.bin in Resources */,
F613FA7B1AB336D6002394D4 /* MWMDefaultAlert.xib in Resources */,
FA99CB73147089B100689A9A /* Localizable.strings in Resources */,
F7FDD823147F30CC005900FA /* drules_proto.bin in Resources */,
F6DBF9AD1AA847ED00F2EC2C /* MWMAlertViewController.xib in Resources */,
@ -1234,6 +1223,7 @@
F7E7BA311672328F00B4492E /* pharmacy@2x.png in Resources */,
F7E7BA321672328F00B4492E /* police.png in Resources */,
F7E7BA331672328F00B4492E /* police@2x.png in Resources */,
F613FA6C1AB1FD97002394D4 /* MWMDefaultAlert.xib in Resources */,
F7E7BA341672328F00B4492E /* post.png in Resources */,
F7E7BA351672328F00B4492E /* post@2x.png in Resources */,
F7E7BA361672328F00B4492E /* shop.png in Resources */,
@ -1282,7 +1272,7 @@
97908B30196591F7003DD7C6 /* SearchShowOnMapCell.m in Sources */,
976D86F119C877E600C920EF /* MapCell.mm in Sources */,
977E26C219E31BCC00BA2219 /* ActiveMapsVC.mm in Sources */,
F6613E041AB199D000C67437 /* MWMDownloadTransitMapAlert+Configure.m in Sources */,
F6613E041AB199D000C67437 /* MWMDownloadTransitMapAlert+Configure.mm in Sources */,
B08AA8CE1A24C7BC00810B1C /* LocalNotificationInfoProvider.m in Sources */,
1D3623260D0F684500981E51 /* MapsAppDelegate.mm in Sources */,
A32B6D4C1A14980500E54A65 /* iosOGLContext.mm in Sources */,
@ -1292,12 +1282,14 @@
EED10A4511F78D120095FAD4 /* MapViewController.mm in Sources */,
A3CC2CD41A1C723900B832E1 /* LocationPredictor.mm in Sources */,
EE7F29811219ECA300EB67A9 /* RenderBuffer.mm in Sources */,
F613FA701AB2002F002394D4 /* MWMDefaultAlert+Configure.mm in Sources */,
F62404FB1AAF3DB200B58DB6 /* UILabel+RuntimeAttributes.m in Sources */,
97D092B5190A6E1D00FF645B /* PlacePageEditCell.mm in Sources */,
9750841F199501F100A7457D /* ImageDownloader.m in Sources */,
978F9253183BD530000D6C7C /* NavigationController.mm in Sources */,
974386DD19373EA400FD5659 /* ToastView.m in Sources */,
97C9851E186AE3C500AF7E9E /* Reachability.m in Sources */,
F613FA6A1AB1FCA8002394D4 /* MWMDefaultAlert.mm in Sources */,
977E26B919E2E64200BA2219 /* MapsObservers.mm in Sources */,
EE7F29821219ECA300EB67A9 /* RenderContext.mm in Sources */,
FAFCB63613366E78001A5C59 /* WebViewController.mm in Sources */,
@ -1310,7 +1302,6 @@
97A8001418B2140A000C07A2 /* SearchResultCell.m in Sources */,
97F0817E19AF72590098FB0B /* BadgeView.m in Sources */,
97A8002718B2741C000C07A2 /* SearchCell.m in Sources */,
F6BAADD81AB058AE0095D0C7 /* MWMAlertEntity.mm in Sources */,
97908B2C19658767003DD7C6 /* SearchCategoryCell.m in Sources */,
9778E9A5191A86D800AD850A /* SelectedColorView.m in Sources */,
B08AA8DA1A26299A00810B1C /* TimeUtils.m in Sources */,
@ -1323,7 +1314,6 @@
978F9240183B660F000D6C7C /* SettingsViewController.mm in Sources */,
B0E1FCDC1A23399E00A8E08B /* RouteOverallInfoView.m in Sources */,
F7B90CD31521E6D200C054EE /* CustomNavigationView.mm in Sources */,
F613FA7F1AB336F3002394D4 /* MWMDefaultAlert+Configure.m in Sources */,
F6DBF9B61AA8779300F2EC2C /* CALayer+RuntimeAttributes.m in Sources */,
FA36B80D15403A4F004560CC /* BookmarksVC.mm in Sources */,
A32B6D4D1A14980500E54A65 /* iosOGLContextFactory.mm in Sources */,
@ -1333,7 +1323,7 @@
97CC93BB19599F4700369B42 /* SearchSuggestCell.m in Sources */,
FA054612155C465E001F4E37 /* SelectSetVC.mm in Sources */,
FAA614B8155F16950031C345 /* AddSetVC.mm in Sources */,
F6613E001AB1987300C67437 /* MWMDownloadAllMapsAlert+Configure.m in Sources */,
F6613E001AB1987300C67437 /* MWMDownloadAllMapsAlert+Configure.mm in Sources */,
977E26C619E31BDF00BA2219 /* DownloaderParentVC.mm in Sources */,
FAAEA7D5161D8D3100CCD661 /* BookmarksRootVC.mm in Sources */,
B0FBFA2B1A515B4C0086819E /* TableViewController.m in Sources */,
@ -1343,14 +1333,12 @@
97C98522186AE3CF00AF7E9E /* AppInfo.mm in Sources */,
978F9242183B660F000D6C7C /* SelectableCell.m in Sources */,
CB252D6F16FF82C9001E41E9 /* Statistics.mm in Sources */,
F6A85A201AAB1175003667A2 /* MWMAlertDownloaderManager.mm in Sources */,
978F9244183B660F000D6C7C /* SwitchCell.m in Sources */,
EDB811A3175E1A9C00E36BF2 /* TwoButtonsView.m in Sources */,
97508423199522D300A7457D /* SettingsAndMoreVC.mm in Sources */,
F6DBF9B01AA85E3500F2EC2C /* MWMAlert.m in Sources */,
F6DBF9B01AA85E3500F2EC2C /* MWMAlert.mm in Sources */,
9773DB8F198652E600C4A9E9 /* PlacePageBookmarkDescriptionCell.m in Sources */,
F63CC8B11AAF0E600019338C /* MWMDownloadAllMapsAlert.mm in Sources */,
F613FA7A1AB336D6002394D4 /* MWMDefaultAlert.mm in Sources */,
97ABBA4518C8DF620079333C /* PlacePageView.mm in Sources */,
97F61794183E7445009919E2 /* LinkCell.m in Sources */,
F6DBF9B31AA8611A00F2EC2C /* MWMDownloadTransitMapAlert.mm in Sources */,

View file

@ -9,6 +9,8 @@
#import "UILabel+RuntimeAttributes.h"
#import "UIKitCategories.h"
// Runtime attributes for setting localized text in Xib.
@implementation UILabel (RuntimeAttributes)
- (void)setLocalizedText:(NSString *)localizedText {