Added base alert

This commit is contained in:
VladiMihaylenko 2015-03-06 17:04:45 +03:00 committed by Alex Zolotarev
parent 4af20edf65
commit 9acc46c26e
17 changed files with 566 additions and 4 deletions

View file

@ -0,0 +1,16 @@
//
// CALayer+RuntimeAttributes.h
// Maps
//
// Created by v.mikhaylenko on 05.03.15.
// Copyright (c) 2015 MapsWithMe. All rights reserved.
//
#import <QuartzCore/QuartzCore.h>
@interface CALayer (RuntimeAttributes)
@property (nonatomic, assign) UIColor *borderUIColor;
@property (nonatomic, assign) UIColor *shadowUIColor;
@end

View file

@ -0,0 +1,32 @@
//
// CALayer+RuntimeAttributes.m
// Maps
//
// Created by v.mikhaylenko on 05.03.15.
// Copyright (c) 2015 MapsWithMe. All rights reserved.
//
#import "CALayer+RuntimeAttributes.h"
@implementation CALayer (RuntimeAttributes)
- (void)setBorderUIColor:(UIColor *)borderUIColor
{
self.borderColor = borderUIColor.CGColor;
}
- (UIColor *)borderUIColor
{
return [UIColor colorWithCGColor:self.borderColor];
}
- (void)setShadowUIColor:(UIColor *)shadowUIColor {
self.shadowColor = shadowUIColor.CGColor;
}
- (UIColor *)shadowUIColor {
return [UIColor colorWithCGColor:self.shadowColor];
}
@end

View file

@ -10,6 +10,8 @@
- (void)performAfterDelay:(NSTimeInterval)delay block:(void (^)(void))block
{
#warning Переписать
[self performSelector:@selector(fireBlockAfterDelay:) withObject:[block copy] afterDelay:delay];
}

View file

@ -0,0 +1,24 @@
//
// MWMAlert.h
// Maps
//
// Created by v.mikhaylenko on 05.03.15.
// Copyright (c) 2015 MapsWithMe. All rights reserved.
//
#import <UIKit/UIKit.h>
typedef NS_ENUM(NSUInteger, MWMAlertType) {
MWMAlertTypeDownloadAllMaps
};
@class MWMAlertViewController;
@class MWMAlertEntity;
@interface MWMAlert : UIView
@property (nonatomic, weak) MWMAlertViewController *alertController;
+ (MWMAlert *)alertWithType:(MWMAlertType)type;
- (void)configureWithEntity:(MWMAlertEntity *)entity;
@end

View file

@ -0,0 +1,28 @@
//
// MWMAlert.m
// Maps
//
// Created by v.mikhaylenko on 05.03.15.
// Copyright (c) 2015 MapsWithMe. All rights reserved.
//
#import "MWMAlert.h"
#import "MWMDownloadAllMapsAlert.h"
@class MWMAlertEntity;
@implementation MWMAlert
+ (MWMAlert *)alertWithType:(MWMAlertType)type {
switch (type) {
case MWMAlertTypeDownloadAllMaps: {
return [MWMDownloadAllMapsAlert alert];
}
}
}
- (void)configureWithEntity:(MWMAlertEntity *)entity {
[self doesNotRecognizeSelector:_cmd];
}
@end

View file

@ -0,0 +1,17 @@
//
// 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 *contry;
@property (nonatomic, copy) NSString *location;
@property (nonatomic, copy) NSString *size;
@end

View file

@ -0,0 +1,31 @@
//
// MWMAlertEntity.m
// Maps
//
// Created by v.mikhaylenko on 06.03.15.
// Copyright (c) 2015 MapsWithMe. All rights reserved.
//
#import "MWMAlertEntity.h"
#include <string>
@interface MWMAlertEntity ()
@end
@implementation MWMAlertEntity
- (instancetype)initWithCallbackString:(const std::string &)string {
self = [super init];
if (self) {
[self processCallbackString:string];
}
return self;
}
- (void)processCallbackString:(const std::string &)string {
}
@end

View file

@ -0,0 +1,16 @@
//
// MWMAlertViewController.h
// Maps
//
// Created by v.mikhaylenko on 05.03.15.
// Copyright (c) 2015 MapsWithMe. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "MWMAlert.h"
@interface MWMAlertViewController : UIViewController
- (instancetype)initWithViewController:(UIViewController *)viewController;
- (void)presentAlertWithType:(MWMAlertType)type;
- (void)close;
@end

View file

@ -0,0 +1,64 @@
//
// MWMAlertViewController.m
// Maps
//
// Created by v.mikhaylenko on 05.03.15.
// Copyright (c) 2015 MapsWithMe. All rights reserved.
//
#import "MWMAlertViewController.h"
#import "MWMDownloadAllMapsAlert.h"
#import "MWMAlertEntity.h"
static NSString * const kAlertControllerNibIdentifier = @"MWMAlertViewController";
@interface MWMAlertViewController ()
@property (nonatomic, weak) UIViewController *ownerViewController;
@end
@implementation MWMAlertViewController
- (instancetype)initWithViewController:(UIViewController *)viewController {
self = [super initWithNibName:kAlertControllerNibIdentifier bundle:nil];
if (self) {
self.ownerViewController = viewController;
}
return self;
}
- (void)viewDidLoad {
[super viewDidLoad];
self.view.frame = self.ownerViewController.view.bounds;
}
#pragma mark - Actions
- (void)presentAlertWithType:(MWMAlertType)type {
MWMAlert *alert = [MWMAlert alertWithType:type];
alert.alertController = self;
MWMAlertEntity *entity = [[MWMAlertEntity alloc] init];
entity.title = @"Download all maps";
entity.message = @"hihihihihihihihihi hihihihihi hihihihihih ihihihihihihi hihihihih ihihihihih ihihihihihihihihi hihihihihihihihi hihihihihihihi hihihihihihihi hihihihihihi hihihihihi hihihihihi hihihihihi hihihihihi";
entity.contry = @"adbsgndlkgndklsnfkldsnglfdksjnglkdfsgjn";
entity.location = @"dkjsgnkdsnjglkdsng";
entity.size = @"1000";
[alert configureWithEntity:entity];
[self.view addSubview:alert];
alert.center = self.view.center;
[self.ownerViewController addChildViewController:self];
self.view.center = self.ownerViewController.view.center;
self.view.userInteractionEnabled = YES;
[self.ownerViewController.view addSubview:self.view];
[[[[UIApplication sharedApplication] delegate] window] addSubview:self.view];
}
- (void)close {
self.ownerViewController.view.userInteractionEnabled = YES;
[self.view removeFromSuperview];
[self.view removeFromSuperview];
[self removeFromParentViewController];
}
@end

View file

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="6254" systemVersion="14C109" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6247"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="MWMAlertViewController">
<connections>
<outlet property="view" destination="PTX-3C-07U" id="OUb-QU-9sV"/>
</connections>
</placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view contentMode="scaleToFill" id="PTX-3C-07U">
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" white="0.0" alpha="0.40000000000000002" colorSpace="calibratedWhite"/>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
<point key="canvasLocation" x="528" y="235"/>
</view>
</objects>
<simulatedMetricsContainer key="defaultSimulatedMetrics">
<simulatedStatusBarMetrics key="statusBar"/>
<simulatedOrientationMetrics key="orientation"/>
<simulatedScreenMetrics key="destination" type="retina4"/>
</simulatedMetricsContainer>
</document>

View file

@ -0,0 +1,16 @@
//
// MWMGetTransitionMapAlert.h
// Maps
//
// Created by v.mikhaylenko on 05.03.15.
// Copyright (c) 2015 MapsWithMe. All rights reserved.
//
#import "MWMAlert.h"
@class MWMAlertEntity;
@interface MWMDownloadAllMapsAlert : MWMAlert
+ (instancetype)alert;
- (void)configureWithEntity:(MWMAlertEntity *)entity;
@end

View file

@ -0,0 +1,89 @@
//
// MWMGetTransitionMapAlert.m
// Maps
//
// Created by v.mikhaylenko on 05.03.15.
// Copyright (c) 2015 MapsWithMe. All rights reserved.
//
#import "MWMDownloadAllMapsAlert.h"
#import "MWMAlertViewController.h"
#import "MWMAlertEntity.h"
#import "UIKitCategories.h"
@interface MWMDownloadAllMapsAlert ()
@property (nonatomic, weak) IBOutlet UILabel *titleLabel;
@property (nonatomic, weak) IBOutlet UILabel *messageLabel;
@property (nonatomic, weak) IBOutlet UIButton *notNowButton;
@property (nonatomic, weak) IBOutlet UIButton *downloadButton;
@property (nonatomic, weak) IBOutlet UILabel *sizeLabel;
@property (nonatomic, weak) IBOutlet UILabel *locationLabel;
@property (nonatomic, weak) IBOutlet UILabel *countryLabel;
@property (nonatomic, weak) IBOutlet UIView *specsView;
@end
@implementation MWMDownloadAllMapsAlert
+ (instancetype)alert {
MWMDownloadAllMapsAlert *alert = [[[NSBundle mainBundle] loadNibNamed:@"MWMDownloadAllMapsAlert" owner:self options:nil] firstObject];
return alert;
}
#pragma mark - Configure
- (void)configureWithEntity:(MWMAlertEntity *)entity {
self.titleLabel.text = entity.title;
self.messageLabel.text = entity.message;
self.sizeLabel.text = entity.size;
self.locationLabel.text = entity.location;
self.countryLabel.text = entity.contry;
[self configureViewSize];
}
- (void)configureViewSize {
[self.messageLabel sizeToFit];
[self.titleLabel sizeToFit];
[self.countryLabel sizeToFit];
[self.locationLabel sizeToFit];
[self configureSpecsViewSize];
[self configureMaintViewSize];
}
- (void)configureSpecsViewSize {
const CGFloat topSpecsViewOffset = 12.;
const CGFloat bottonSpecsViewOffset = 10.;
const CGFloat middleSpecsViewOffset = 15.;
const CGFloat specsViewHeight = topSpecsViewOffset + bottonSpecsViewOffset + middleSpecsViewOffset + self.countryLabel.frame.size.height + self.locationLabel.frame.size.height;
[self.specsView setHeight:specsViewHeight];
[self.locationLabel setMinY:topSpecsViewOffset];
[self.countryLabel setMinY:self.locationLabel.frame.origin.y + self.locationLabel.frame.size.height + middleSpecsViewOffset];
}
- (void)configureMaintViewSize {
const CGFloat topMainViewOffset = 17.;
const CGFloat secondMainViewOffset = 14.;
const CGFloat thirdMainViewOffset = 20.;
const CGFloat bottomMainViewOffset = 52.;
const CGFloat mainViewHeight = topMainViewOffset + self.titleLabel.frame.size.height + secondMainViewOffset + self.messageLabel.frame.size.height + thirdMainViewOffset + self.specsView.frame.size.height + bottomMainViewOffset;
[self setHeight:mainViewHeight];
[self.titleLabel setMinY:topMainViewOffset];
[self.messageLabel setMinY:self.titleLabel.frame.origin.y + self.titleLabel.frame.size.height + secondMainViewOffset];
[self.specsView setMinY:self.messageLabel.frame.origin.y + self.messageLabel.frame.size.height + thirdMainViewOffset];
[self.notNowButton setMinY:self.specsView.frame.origin.y + self.specsView.frame.size.height];
[self.downloadButton setMinY:self.notNowButton.frame.origin.y];
}
#pragma mark - Actions
- (IBAction)notNowButtonTap:(id)sender {
[self.alertController close];
}
- (IBAction)downloadButtonTap:(id)sender {
[self.alertController close];
}
@end

View file

@ -0,0 +1,124 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="6254" systemVersion="14C109" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6247"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view clipsSubviews="YES" contentMode="scaleToFill" id="jqI-GQ-yDh" customClass="MWMDownloadAllMapsAlert">
<rect key="frame" x="0.0" y="-3" width="280" height="263"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Download all maps along your route" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="MvX-7q-CIH">
<rect key="frame" x="23" y="20" width="232" height="50"/>
<autoresizingMask key="autoresizingMask" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" name="HelveticaNeue" family="Helvetica Neue" pointSize="20"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.82000000000000006" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
<size key="shadowOffset" width="0.0" height="0.0"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="q87-qQ-0rn">
<rect key="frame" x="140" y="211" width="140" height="52"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" name="HelveticaNeue-Medium" family="Helvetica Neue" pointSize="15"/>
<state key="normal" title="DOWNLOAD">
<color key="titleColor" red="0.090196078430000007" green="0.61960784310000006" blue="0.30196078430000001" alpha="1" colorSpace="calibratedRGB"/>
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
</state>
<connections>
<action selector="downloadButtonTap:" destination="jqI-GQ-yDh" eventType="touchUpInside" id="L2t-kQ-AzL"/>
</connections>
</button>
<view contentMode="scaleToFill" id="qWl-uG-l5d">
<rect key="frame" x="-2" y="150" width="284" height="63"/>
<autoresizingMask key="autoresizingMask" flexibleMaxY="YES"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Champagne-Ardenne" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="R9w-d7-Fy4">
<rect key="frame" x="23" y="12" width="167" height="19"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.82000000000000006" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="France" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="rQS-yn-R5J">
<rect key="frame" x="23" y="33" width="232" height="15"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.52000000000000002" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="132 MB" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="nFt-i2-6uJ">
<rect key="frame" x="198" y="11" width="55" height="21"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" name="HelveticaNeue-Medium" family="Helvetica Neue" pointSize="13"/>
<color key="textColor" red="0.090196078430000007" green="0.61960784310000006" blue="0.30196078430000001" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" red="0.97254901960784312" green="0.96862745098039216" blue="0.95686274509803915" alpha="1" colorSpace="calibratedRGB"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="color" keyPath="layer.borderUIColor">
<color key="value" red="0.8784313725490196" green="0.8784313725490196" blue="0.8784313725490196" alpha="1" colorSpace="calibratedRGB"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="number" keyPath="layer.borderWidth">
<integer key="value" value="1"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="center" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Creating routes between regions is only possible when all the transit maps are downloaded and updated." lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="Q3X-9G-3PT">
<rect key="frame" x="22" y="78" width="234" height="52"/>
<autoresizingMask key="autoresizingMask" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.82000000000000006" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="dhS-fg-rNl">
<rect key="frame" x="-1" y="211" width="140" height="52"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" name="HelveticaNeue-Medium" family="Helvetica Neue" pointSize="15"/>
<state key="normal" title="NOT NOW">
<color key="titleColor" red="0.090196078430000007" green="0.61960784310000006" blue="0.30196078430000001" alpha="1" colorSpace="calibratedRGB"/>
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
</state>
<connections>
<action selector="notNowButtonTap:" destination="jqI-GQ-yDh" eventType="touchUpInside" id="Uwh-Pd-AVC"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="size" keyPath="layer.shadowOffset">
<size key="value" width="0.0" height="3"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="color" keyPath="layer.shadowUIColor">
<color key="value" white="0.0" alpha="0.22" colorSpace="calibratedWhite"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="number" keyPath="layer.shadowRadius">
<integer key="value" value="6"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
<integer key="value" value="4"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
<connections>
<outlet property="countryLabel" destination="rQS-yn-R5J" id="tV8-5q-FWp"/>
<outlet property="downloadButton" destination="q87-qQ-0rn" id="ua1-lE-qmX"/>
<outlet property="locationLabel" destination="R9w-d7-Fy4" id="Stv-ei-GdK"/>
<outlet property="messageLabel" destination="Q3X-9G-3PT" id="AUA-bn-mAy"/>
<outlet property="notNowButton" destination="dhS-fg-rNl" id="07j-d0-QOj"/>
<outlet property="sizeLabel" destination="nFt-i2-6uJ" id="lOV-l2-F8A"/>
<outlet property="specsView" destination="qWl-uG-l5d" id="T1w-Ll-0Q6"/>
<outlet property="titleLabel" destination="MvX-7q-CIH" id="hej-5l-48z"/>
</connections>
<point key="canvasLocation" x="295" y="401.5"/>
</view>
</objects>
<simulatedMetricsContainer key="defaultSimulatedMetrics">
<simulatedStatusBarMetrics key="statusBar"/>
<simulatedOrientationMetrics key="orientation"/>
<simulatedScreenMetrics key="destination" type="retina4"/>
</simulatedMetricsContainer>
</document>

View file

@ -15,6 +15,7 @@
#import "RouteView.h"
#import "CountryTreeVC.h"
#import "Reachability.h"
#import "MWMAlertViewController.h"
#import "../../Common/CustomAlertView.h"
@ -801,9 +802,13 @@
- (void)showDownloaderDialogWithMessageID:(string const &)message
{
UIAlertView * alertView = [[UIAlertView alloc] initWithTitle:[NSString stringWithUTF8String:message.c_str()] message:nil delegate:self cancelButtonTitle:L(@"cancel") otherButtonTitles:L(@"ok"), nil];
alertView.tag = ALERT_VIEW_DOWNLOADER;
[alertView show];
MWMAlertViewController *alert = [[MWMAlertViewController alloc] initWithViewController:self];
[alert presentAlertWithType:MWMAlertTypeDownloadAllMaps];
// UIAlertView * alertView = [[UIAlertView alloc] initWithTitle:[NSString stringWithUTF8String:message.c_str()] message:nil delegate:self cancelButtonTitle:L(@"cancel") otherButtonTitles:L(@"ok"), nil];
// alertView.tag = ALERT_VIEW_DOWNLOADER;
// [alertView show];
}
#pragma mark - Getters
@ -1217,11 +1222,13 @@
}
break;
}
default:
break;
}
}
- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context
{
if (object == self.containerView.placePage && [keyPath isEqualToString:@"state"])

View file

@ -22,6 +22,7 @@ extern NSString * const MapsStatusChangedNotification;
@property (nonatomic, readonly) LocationManager * m_locationManager;
+ (MapsAppDelegate *)theApp;
- (UIWindow *)window;
- (void)disableStandby;
- (void)enableStandby;

View file

@ -400,4 +400,10 @@ void InitLocalizedStrings()
[UIApplication sharedApplication].applicationIconBadgeNumber = [[notification userInfo][@"OutOfDate"] integerValue];
}
#warning Переделать
- (UIWindow *)window {
return self->m_window;
}
@end

View file

@ -116,6 +116,13 @@
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 */; };
F6A85A151AA9AB23003667A2 /* MWMAlertEntity.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6A85A141AA9AB23003667A2 /* MWMAlertEntity.mm */; };
F6DBF9A01AA75B6D00F2EC2C /* MWMDownloadAllMapsAlert.xib in Resources */ = {isa = PBXBuildFile; fileRef = F6DBF99F1AA75B6D00F2EC2C /* MWMDownloadAllMapsAlert.xib */; };
F6DBF9AC1AA847ED00F2EC2C /* MWMAlertViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = F6DBF9AA1AA847ED00F2EC2C /* MWMAlertViewController.m */; };
F6DBF9AD1AA847ED00F2EC2C /* MWMAlertViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = F6DBF9AB1AA847ED00F2EC2C /* MWMAlertViewController.xib */; };
F6DBF9B01AA85E3500F2EC2C /* MWMAlert.m in Sources */ = {isa = PBXBuildFile; fileRef = F6DBF9AF1AA85E3500F2EC2C /* MWMAlert.m */; };
F6DBF9B31AA8611A00F2EC2C /* MWMDownloadAllMapsAlert.m in Sources */ = {isa = PBXBuildFile; fileRef = F6DBF9B21AA8611A00F2EC2C /* MWMDownloadAllMapsAlert.m */; };
F6DBF9B61AA8779300F2EC2C /* CALayer+RuntimeAttributes.m in Sources */ = {isa = PBXBuildFile; fileRef = F6DBF9B51AA8779300F2EC2C /* CALayer+RuntimeAttributes.m */; };
F785EB4016386FC4003A38A8 /* BookmarkCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = F785EB3F16386FC4003A38A8 /* BookmarkCell.mm */; };
F7B90CD31521E6D200C054EE /* CustomNavigationView.mm in Sources */ = {isa = PBXBuildFile; fileRef = F7B90CD21521E6D100C054EE /* CustomNavigationView.mm */; };
F7E7BA221672328F00B4492E /* atm.png in Resources */ = {isa = PBXBuildFile; fileRef = F7E7BA061672328F00B4492E /* atm.png */; };
@ -365,6 +372,18 @@
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>"; };
F6A85A131AA9AB23003667A2 /* MWMAlertEntity.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMAlertEntity.h; sourceTree = "<group>"; };
F6A85A141AA9AB23003667A2 /* MWMAlertEntity.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMAlertEntity.mm; sourceTree = "<group>"; };
F6DBF99F1AA75B6D00F2EC2C /* MWMDownloadAllMapsAlert.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMDownloadAllMapsAlert.xib; sourceTree = "<group>"; };
F6DBF9A91AA847ED00F2EC2C /* MWMAlertViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMAlertViewController.h; sourceTree = "<group>"; };
F6DBF9AA1AA847ED00F2EC2C /* MWMAlertViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MWMAlertViewController.m; 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>"; };
F6DBF9B11AA8611A00F2EC2C /* MWMDownloadAllMapsAlert.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMDownloadAllMapsAlert.h; sourceTree = "<group>"; };
F6DBF9B21AA8611A00F2EC2C /* MWMDownloadAllMapsAlert.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MWMDownloadAllMapsAlert.m; sourceTree = "<group>"; };
F6DBF9B41AA8779300F2EC2C /* CALayer+RuntimeAttributes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "CALayer+RuntimeAttributes.h"; sourceTree = "<group>"; };
F6DBF9B51AA8779300F2EC2C /* CALayer+RuntimeAttributes.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "CALayer+RuntimeAttributes.m"; sourceTree = "<group>"; };
F785EB3E16386FC4003A38A8 /* BookmarkCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BookmarkCell.h; path = Bookmarks/BookmarkCell.h; sourceTree = SOURCE_ROOT; };
F785EB3F16386FC4003A38A8 /* BookmarkCell.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = BookmarkCell.mm; path = Bookmarks/BookmarkCell.mm; sourceTree = SOURCE_ROOT; };
F7B90CD11521E6D100C054EE /* CustomNavigationView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CustomNavigationView.h; sourceTree = "<group>"; };
@ -490,6 +509,7 @@
080E96DDFE201D6D7F000001 /* Classes */ = {
isa = PBXGroup;
children = (
F6DBF99E1AA75AA700F2EC2C /* Custom Alert */,
97B4E9271851DAB300BEC5D7 /* Custom Views */,
FA4135DF120A25B90062D5B4 /* Settings */,
974D041C1977DE430081D0A7 /* LocalNotificationManager.h */,
@ -630,6 +650,8 @@
B08AA8D91A26299A00810B1C /* TimeUtils.m */,
9747278218338F0C006B7CB7 /* UIViewController+Navigation.h */,
9747278318338F0C006B7CB7 /* UIViewController+Navigation.m */,
F6DBF9B41AA8779300F2EC2C /* CALayer+RuntimeAttributes.h */,
F6DBF9B51AA8779300F2EC2C /* CALayer+RuntimeAttributes.m */,
);
name = Categories;
sourceTree = "<group>";
@ -800,6 +822,39 @@
path = Statistics;
sourceTree = "<group>";
};
F6A85A161AA9CAAD003667A2 /* DownloadAllMaps */ = {
isa = PBXGroup;
children = (
F6DBF9B11AA8611A00F2EC2C /* MWMDownloadAllMapsAlert.h */,
F6DBF9B21AA8611A00F2EC2C /* MWMDownloadAllMapsAlert.m */,
F6DBF99F1AA75B6D00F2EC2C /* MWMDownloadAllMapsAlert.xib */,
);
name = DownloadAllMaps;
sourceTree = "<group>";
};
F6A85A1D1AA9CCF7003667A2 /* Entity */ = {
isa = PBXGroup;
children = (
F6A85A131AA9AB23003667A2 /* MWMAlertEntity.h */,
F6A85A141AA9AB23003667A2 /* MWMAlertEntity.mm */,
);
name = Entity;
sourceTree = "<group>";
};
F6DBF99E1AA75AA700F2EC2C /* Custom Alert */ = {
isa = PBXGroup;
children = (
F6DBF9A91AA847ED00F2EC2C /* MWMAlertViewController.h */,
F6DBF9AA1AA847ED00F2EC2C /* MWMAlertViewController.m */,
F6DBF9AB1AA847ED00F2EC2C /* MWMAlertViewController.xib */,
F6DBF9AE1AA85E3500F2EC2C /* MWMAlert.h */,
F6DBF9AF1AA85E3500F2EC2C /* MWMAlert.m */,
F6A85A161AA9CAAD003667A2 /* DownloadAllMaps */,
F6A85A1D1AA9CCF7003667A2 /* Entity */,
);
name = "Custom Alert";
sourceTree = "<group>";
};
FA065FC61286143F00FEA989 /* External Resources */ = {
isa = PBXGroup;
children = (
@ -983,7 +1038,7 @@
ORGANIZATIONNAME = MapsWithMe;
TargetAttributes = {
1D6058900D05DD3D006BFB54 = {
DevelopmentTeam = XMK5825GXK;
DevelopmentTeam = N9X2A789QT;
SystemCapabilities = {
com.apple.BackgroundModes = {
enabled = 1;
@ -1060,6 +1115,7 @@
97D40C0A184D031900A1D572 /* Images.xcassets in Resources */,
B0DFE6311A1B78A200B6C35E /* LocalNotifications.plist in Resources */,
978D4A31199A11E600D72CA7 /* faq.html in Resources */,
F6DBF9A01AA75B6D00F2EC2C /* MWMDownloadAllMapsAlert.xib in Resources */,
97D40C08184CFA4100A1D572 /* ImagesPro.xcassets in Resources */,
97FC99E019C1A2CD00C1CF98 /* resources-xxhdpi in Resources */,
97719D4B1843B86700BDD815 /* Main_iPad.storyboard in Resources */,
@ -1069,6 +1125,7 @@
FA85F633145DDDC20090E1A0 /* packed_polygons.bin in Resources */,
FA99CB73147089B100689A9A /* Localizable.strings in Resources */,
F7FDD823147F30CC005900FA /* drules_proto.bin in Resources */,
F6DBF9AD1AA847ED00F2EC2C /* MWMAlertViewController.xib in Resources */,
FAAEA7D1161BD26600CCD661 /* synonyms.txt in Resources */,
FA140651162A6288002BC1ED /* empty@2x.png in Resources */,
FA140653162A6288002BC1ED /* empty.png in Resources */,
@ -1178,9 +1235,11 @@
978F9240183B660F000D6C7C /* SettingsViewController.mm in Sources */,
B0E1FCDC1A23399E00A8E08B /* RouteOverallInfoView.m in Sources */,
F7B90CD31521E6D200C054EE /* CustomNavigationView.mm in Sources */,
F6DBF9B61AA8779300F2EC2C /* CALayer+RuntimeAttributes.m in Sources */,
FA36B80D15403A4F004560CC /* BookmarksVC.mm in Sources */,
A32B6D4D1A14980500E54A65 /* iosOGLContextFactory.mm in Sources */,
9769D6EF1912BF3000CA6158 /* ContainerView.mm in Sources */,
F6DBF9AC1AA847ED00F2EC2C /* MWMAlertViewController.m in Sources */,
FAF457E715597D4600DCCC49 /* Framework.cpp in Sources */,
97CC93BB19599F4700369B42 /* SearchSuggestCell.m in Sources */,
FA054612155C465E001F4E37 /* SelectSetVC.mm in Sources */,
@ -1197,15 +1256,18 @@
978F9244183B660F000D6C7C /* SwitchCell.m in Sources */,
EDB811A3175E1A9C00E36BF2 /* TwoButtonsView.m in Sources */,
97508423199522D300A7457D /* SettingsAndMoreVC.mm in Sources */,
F6DBF9B01AA85E3500F2EC2C /* MWMAlert.m in Sources */,
9773DB8F198652E600C4A9E9 /* PlacePageBookmarkDescriptionCell.m in Sources */,
97ABBA4518C8DF620079333C /* PlacePageView.mm in Sources */,
97F61794183E7445009919E2 /* LinkCell.m in Sources */,
F6DBF9B31AA8611A00F2EC2C /* MWMDownloadAllMapsAlert.m in Sources */,
976D86EC19C8697700C920EF /* ProgressView.m in Sources */,
97D092B1190A681F00FF645B /* PlacePageInfoCell.mm in Sources */,
B0FBFA271A515AFD0086819E /* ViewController.m in Sources */,
97A8001018B21395000C07A2 /* SearchBar.mm in Sources */,
EDC5C543175F2CA600420E92 /* ShareActionSheet.mm in Sources */,
9778E9A1191A663700AD850A /* BookmarkNameVC.mm in Sources */,
F6A85A151AA9AB23003667A2 /* MWMAlertEntity.mm in Sources */,
ED48BBB517C267F5003E7E92 /* ColorPickerView.mm in Sources */,
ED48BBBA17C2B1E2003E7E92 /* CircleView.mm in Sources */,
);