Merge pull request #3377 from VladiMihaylenko/dev

[ios] Booking
This commit is contained in:
Sergey Yershov 2016-05-31 18:45:19 +04:00
commit 3085aba1f5
56 changed files with 920 additions and 722 deletions

View file

@ -105,6 +105,12 @@ typedef void (^MWMAlertViewCompletionBlock) (UIAlertView * alertView, NSInteger
@end
@interface UIViewController (Safari)
- (void)openUrl:(NSURL *)url;
@end
@interface UIImage (ImageWithColor)
+ (UIImage *)imageWithColor:(UIColor *)color;

View file

@ -3,6 +3,8 @@
#import "UIImageView+Coloring.h"
#import "UIKitCategories.h"
#import <SafariServices/SafariServices.h>
@implementation NSObject (Optimized)
+ (NSString *)className
@ -325,6 +327,38 @@
@end
@interface UIViewController (SafariDelegateImpl) <SFSafariViewControllerDelegate>
@end
@implementation UIViewController (SafariDelegateImpl)
- (void)safariViewControllerDidFinish:(SFSafariViewController *)controller
{
[self.navigationController popViewControllerAnimated:YES];
}
@end
@implementation UIViewController (Safari)
- (void)openUrl:(NSURL *)url
{
NSString * scheme = url.scheme;
if ((isIOS7 || isIOS8) && (![scheme isEqualToString:@"http"] || ![scheme isEqualToString:@"https"]))
{
UIApplication * app = [UIApplication sharedApplication];
if ([app canOpenURL:url])
[app openURL:url];
return;
}
SFSafariViewController * svc = [[SFSafariViewController alloc] initWithURL:url];
svc.delegate = self;
[self.navigationController pushViewController:svc animated:YES];
}
@end
@implementation UIImage (ImageWithColor)
+ (UIImage *)imageWithColor:(UIColor *)color

View file

@ -1,8 +1,11 @@
#import "MapsAppDelegate.h"
#import "MWMController.h"
#import "MWMNavigationController.h"
#import "UIColor+MapsMeColor.h"
#import "UIViewController+Navigation.h"
#import <SafariServices/SafariServices.h>
@interface MWMNavigationController () <UINavigationControllerDelegate>
@end
@ -18,10 +21,18 @@
{
[super viewDidLoad];
self.delegate = self;
self.navigationItem.leftBarButtonItem.tintColor = [UIColor whitePrimaryText];
self.navigationItem.rightBarButtonItem.tintColor = [UIColor whitePrimaryText];
}
- (void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated
{
if ([viewController isKindOfClass:[SFSafariViewController class]])
{
[navigationController setNavigationBarHidden:YES animated:animated];
return;
}
NSAssert([viewController conformsToProtocol:@protocol(MWMController)], @"Controller must inherit ViewController or TableViewController class");
id<MWMController> vc = static_cast<id<MWMController>>(viewController);
[navigationController setNavigationBarHidden:!vc.hasNavigationBar animated:animated];

View file

@ -42,7 +42,7 @@ extern NSString * const kMap2GoogleLoginSegue;
[self close];
[Statistics logEvent:kStatEditorRegRequest withParameters:@{kStatFrom : kStatEdit}];
NSURL * url = [NSURL URLWithString:@(osm::OsmOAuth::ServerAuth().GetRegistrationURL().c_str())];
[[UIApplication sharedApplication] openURL:url];
[self.alertController.ownerViewController openUrl:url];
}
- (IBAction)closeTap

View file

@ -220,9 +220,7 @@ using namespace osm_auth_ios;
[self performOnlineAction:^
{
[Statistics logEvent:kStatEditorRegRequest withParameters:@{kStatFrom : kStatProfile}];
OsmOAuth const auth = OsmOAuth::ServerAuth();
NSURL * url = [NSURL URLWithString:@(auth.GetRegistrationURL().c_str())];
[[UIApplication sharedApplication] openURL:url];
[self openUrl:[NSURL URLWithString:@(OsmOAuth::ServerAuth().GetRegistrationURL().c_str())]];
}];
}

View file

@ -193,9 +193,7 @@ using namespace osm;
- (IBAction)forgotPassword
{
OsmOAuth const auth = OsmOAuth::ServerAuth();
NSURL * url = [NSURL URLWithString:@(auth.GetResetPasswordURL().c_str())];
[[UIApplication sharedApplication] openURL:url];
[self openUrl:[NSURL URLWithString:@(OsmOAuth::ServerAuth().GetResetPasswordURL().c_str())]];
}
#pragma mark - Properties

View file

@ -414,6 +414,12 @@ extern NSString * const kAlohalyticsTapEventKey;
- (void)buildRouteFrom:(MWMRoutePoint const &)from
{
if (self.navigationManager.state != MWMNavigationDashboardStatePrepare)
{
MapsAppDelegate.theApp.routingPlaneMode = MWMRoutingPlaneModePlacePage;
self.navigationManager.state = MWMNavigationDashboardStatePrepare;
}
self.routeSource = from;
if ((from.IsMyPosition() && self.routeDestination.IsMyPosition()) || from == self.routeDestination)
{

View file

@ -15,7 +15,7 @@
placeholder:(NSString *)placeholder;
- (CGFloat)cellHeight;
- (void)updateTextViewForHeight:(CGFloat)height;
- (UITextView *)textView;
- (CGFloat)textViewContentHeight;
+ (CGFloat)minimalHeight;
- (void)registerObserver;

View file

@ -26,7 +26,7 @@ static void * kContext = &kContext;
{
self.delegate = delegate;
self.textView.text = text;
static_cast<MWMTextView *>(self.textView).placeholder = placeholder;
self.textView.placeholder = placeholder;
}
- (void)updateTextViewForHeight:(CGFloat)height
@ -70,6 +70,11 @@ static void * kContext = &kContext;
return self.textViewHeight.constant + 2 * kTopTextViewOffset;
}
- (CGFloat)textViewContentHeight
{
return self.textView.contentSize.height;
}
+ (CGFloat)minimalHeight
{
return kMinimalTextViewHeight;

View file

@ -0,0 +1,33 @@
enum class EButton // Required button's order
{
Api,
Booking,
Call,
Bookmark,
RouteFrom,
RouteTo,
Share,
More,
Spacer
};
NSString * titleForButton(EButton type, BOOL isSelected);
@class MWMActionBarButton;
@protocol MWMActionBarButtonDelegate <NSObject>
- (void)tapOnButtonWithType:(EButton)type;
@end
@interface MWMActionBarButton : UIView
- (void)configButtonWithDelegate:(id<MWMActionBarButtonDelegate>)delegate type:(EButton)type isSelected:(BOOL)isSelected;
+ (void)addButtonToSuperview:(UIView *)view
delegate:(id<MWMActionBarButtonDelegate>)delegate
buttonType:(EButton)type
isSelected:(BOOL)isSelected;
@end

View file

@ -0,0 +1,139 @@
#import "MWMActionBarButton.h"
#import "MWMButton.h"
#import "UIColor+MapsMeColor.h"
NSString * titleForButton(EButton type, BOOL isSelected)
{
switch (type)
{
case EButton::Api:
return L(@"back");
case EButton::Booking:
return L(@"bookingcom_book_button");
case EButton::Call:
return L(@"placepage_call_button");
case EButton::Bookmark:
return L(isSelected ? @"delete" : @"save");
case EButton::RouteFrom:
return L(@"p2p_from_here");
case EButton::RouteTo:
return L(@"p2p_to_here");
case EButton::Share:
return L(@"share");
case EButton::More:
return L(@"placepage_more_button");
case EButton::Spacer:
return nil;
}
}
@interface MWMActionBarButton ()
@property (weak, nonatomic) IBOutlet MWMButton * button;
@property (weak, nonatomic) IBOutlet UILabel * label;
@property (weak, nonatomic) id<MWMActionBarButtonDelegate> delegate;
@property (nonatomic) EButton type;
@end
@implementation MWMActionBarButton
- (void)configButtonWithDelegate:(id<MWMActionBarButtonDelegate>)delegate type:(EButton)type isSelected:(BOOL)isSelected
{
self.delegate = delegate;
self.type = type;
[self configButton:isSelected];
}
- (void)configButton:(BOOL)isSelected
{
self.label.text = titleForButton(self.type, isSelected);
switch (self.type)
{
case EButton::Api:
[self.button setImage:[UIImage imageNamed:@"ic_back_api"] forState:UIControlStateNormal];
break;
case EButton::Booking:
[self.button setImage:[UIImage imageNamed:@"ic_booking_logo"] forState:UIControlStateNormal];
self.label.textColor = [UIColor whiteColor];
self.backgroundColor = [UIColor bookingBackground];
break;
case EButton::Call:
[self.button setImage:[UIImage imageNamed:@"ic_placepage_phone_number"] forState:UIControlStateNormal];
break;
case EButton::Bookmark:
[self setupBookmarkButton:isSelected];
break;
case EButton::RouteFrom:
[self.button setImage:[UIImage imageNamed:@"ic_route_from"] forState:UIControlStateNormal];
break;
case EButton::RouteTo:
[self.button setImage:[UIImage imageNamed:@"ic_route_to"] forState:UIControlStateNormal];
break;
case EButton::Share:
[self.button setImage:[UIImage imageNamed:@"ic_menu_share"] forState:UIControlStateNormal];
break;
case EButton::More:
[self.button setImage:[UIImage imageNamed:@"ic_placepage_more"] forState:UIControlStateNormal];
break;
case EButton::Spacer:
[self.button removeFromSuperview];
[self.label removeFromSuperview];
break;
}
}
+ (void)addButtonToSuperview:(UIView *)view
delegate:(id<MWMActionBarButtonDelegate>)delegate
buttonType:(EButton)type
isSelected:(BOOL)isSelected
{
if (view.subviews.count)
return;
MWMActionBarButton * button = [[[NSBundle mainBundle] loadNibNamed:[MWMActionBarButton className] owner:nil options:nil] firstObject];
button.delegate = delegate;
button.type = type;
[view addSubview:button];
button.frame = {{}, view.size};
[button configButton:isSelected];
[button setNeedsLayout];
}
- (IBAction)tap
{
if (self.type == EButton::Bookmark)
[self setBookmarkSelected:!self.button.isSelected];
[self.delegate tapOnButtonWithType:self.type];
}
- (void)setBookmarkSelected:(BOOL)isSelected
{
if (isSelected)
[self.button.imageView startAnimating];
self.button.selected = isSelected;
self.label.text = L(isSelected ? @"delete" : @"save");
}
- (void)setupBookmarkButton:(BOOL)isSelected
{
MWMButton * btn = self.button;
[btn setImage:[UIImage imageNamed:@"ic_bookmarks_off"] forState:UIControlStateNormal];
[btn setImage:[UIImage imageNamed:@"ic_bookmarks_on"] forState:UIControlStateSelected];
[btn setImage:[UIImage imageNamed:@"ic_bookmarks_on"] forState:UIControlStateHighlighted];
[self setBookmarkSelected:isSelected];
NSUInteger const animationImagesCount = 11;
NSMutableArray * animationImages = [NSMutableArray arrayWithCapacity:animationImagesCount];
for (NSUInteger i = 0; i < animationImagesCount; ++i)
animationImages[i] = [UIImage imageNamed:[NSString stringWithFormat:@"ic_bookmarks_%@", @(i+1)]];
UIImageView * animationIV = btn.imageView;
animationIV.animationImages = animationImages;
animationIV.animationRepeatCount = 1;
}
@end

View file

@ -0,0 +1,57 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="10117" systemVersion="15E65" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="MWMActionBarButton"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view contentMode="scaleToFill" id="iN0-l3-epB" customClass="MWMActionBarButton">
<rect key="frame" x="0.0" y="0.0" width="80" height="48"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="W07-Hz-J60" customClass="MWMButton">
<rect key="frame" x="0.0" y="0.0" width="80" height="33"/>
<constraints>
<constraint firstAttribute="height" constant="33" id="pcB-ET-28J"/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="coloringName" value="MWMBlack"/>
</userDefinedRuntimeAttributes>
<connections>
<action selector="tap" destination="iN0-l3-epB" eventType="touchUpInside" id="yKY-7K-Wyl"/>
</connections>
</button>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="rrI-0A-w3s">
<rect key="frame" x="0.0" y="34" width="80" height="14"/>
<constraints>
<constraint firstAttribute="height" constant="14" id="BBl-pC-RJq"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="colorName" value="blackSecondaryText"/>
<userDefinedRuntimeAttribute type="string" keyPath="fontName" value="regular10"/>
</userDefinedRuntimeAttributes>
</label>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="trailing" secondItem="rrI-0A-w3s" secondAttribute="trailing" id="LPs-Yx-xz6"/>
<constraint firstItem="W07-Hz-J60" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="UJy-Ef-B7E"/>
<constraint firstItem="rrI-0A-w3s" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="X6f-tU-o9a"/>
<constraint firstAttribute="bottom" secondItem="rrI-0A-w3s" secondAttribute="bottom" id="Zsi-G2-yc8"/>
<constraint firstItem="W07-Hz-J60" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="rBR-of-5Ha"/>
<constraint firstAttribute="trailing" secondItem="W07-Hz-J60" secondAttribute="trailing" id="teM-gm-CX7"/>
</constraints>
<nil key="simulatedStatusBarMetrics"/>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
<connections>
<outlet property="button" destination="W07-Hz-J60" id="dAN-CS-btL"/>
<outlet property="label" destination="rrI-0A-w3s" id="LMD-pz-agZ"/>
</connections>
</view>
</objects>
</document>

View file

@ -14,6 +14,10 @@
@property (weak, nonatomic) IBOutlet UIView * separatorView;
@property (weak, nonatomic) IBOutlet UIButton * directionButton;
@property (weak, nonatomic) IBOutlet UIView * ppPreview;
@property (weak, nonatomic) IBOutlet UIView * bookingView;
@property (weak, nonatomic) IBOutlet UILabel * bookingRatingLabel;
@property (weak, nonatomic) IBOutlet UILabel * bookingPriceLabel;
@property (weak, nonatomic) IBOutlet UIImageView * bookingSeparator;
- (void)configureWithEntity:(MWMPlacePageEntity *)entity;
- (void)addBookmark;

View file

@ -44,7 +44,8 @@ enum class PlacePageSection
{
Bookmark,
Metadata,
Editing
Editing,
Booking
};
vector<MWMPlacePageCellType> const kSectionBookmarkCellTypes {
@ -62,12 +63,17 @@ vector<MWMPlacePageCellType> const kSectionEditingCellTypes {
MWMPlacePageCellTypeAddPlaceButton
};
vector<MWMPlacePageCellType> const kSectionBookingCellTypes {
MWMPlacePageCellTypeBookingMore
};
using TCellTypesSectionMap = pair<vector<MWMPlacePageCellType>, PlacePageSection>;
vector<TCellTypesSectionMap> const kCellTypesSectionMap {
{kSectionBookmarkCellTypes, PlacePageSection::Bookmark},
{kSectionMetadataCellTypes, PlacePageSection::Metadata},
{kSectionEditingCellTypes, PlacePageSection::Editing}
{kSectionEditingCellTypes, PlacePageSection::Editing},
{kSectionBookingCellTypes, PlacePageSection::Booking}
};
MWMPlacePageCellTypeValueMap const kCellType2ReuseIdentifier{
@ -82,7 +88,8 @@ MWMPlacePageCellTypeValueMap const kCellType2ReuseIdentifier{
{MWMPlacePageCellTypeBookmark, "PlacePageBookmarkCell"},
{MWMPlacePageCellTypeEditButton, "MWMPlacePageButtonCell"},
{MWMPlacePageCellTypeAddBusinessButton, "MWMPlacePageButtonCell"},
{MWMPlacePageCellTypeAddPlaceButton, "MWMPlacePageButtonCell"}};
{MWMPlacePageCellTypeAddPlaceButton, "MWMPlacePageButtonCell"},
{MWMPlacePageCellTypeBookingMore, "MWMPlacePageButtonCell"}};
NSString * reuseIdentifier(MWMPlacePageCellType cellType)
{
@ -198,22 +205,33 @@ using namespace storage;
self.externalTitleLabel.text = @"";
}
auto const ranges = [entity.subtitle rangesOfString:@(place_page::Info::kSubtitleSeparator)];
if (!ranges.empty())
self.subtitleLabel.text = entity.subtitle;
if (entity.subtitle)
{
NSMutableAttributedString * str = [[NSMutableAttributedString alloc] initWithString:entity.subtitle];
for (auto const & r : ranges)
[str addAttributes:@{NSForegroundColorAttributeName : [UIColor blackHintText]} range:r];
auto const separatorRanges = [entity.subtitle rangesOfString:@(place_page::Info::kSubtitleSeparator)];
if (!separatorRanges.empty())
{
for (auto const & r : separatorRanges)
[str addAttributes:@{NSForegroundColorAttributeName : [UIColor blackHintText]} range:r];
}
auto const starsRanges = [entity.subtitle rangesOfString:@(place_page::Info::kStarSymbol)];
if (!starsRanges.empty())
{
for (auto const & r : starsRanges)
[str addAttributes:@{NSForegroundColorAttributeName : [UIColor yellow]} range:r];
}
self.subtitleLabel.attributedText = str;
}
else
{
self.subtitleLabel.text = entity.subtitle;
}
BOOL const isMyPosition = entity.isMyPosition;
self.addressLabel.text = entity.address;
self.bookingPriceLabel.text = entity.bookingPrice;
self.bookingRatingLabel.text = entity.bookingRating;
self.bookingView.hidden = !entity.bookingPrice.length && !entity.bookingRating.length;
BOOL const isHeadingAvaible = [CLLocationManager headingAvailable];
BOOL const noLocation = MapsAppDelegate.theApp.locationManager.isLocationPendingOrNoPosition;
self.distanceLabel.hidden = noLocation || isMyPosition;
@ -358,11 +376,18 @@ using namespace storage;
self.externalTitleLabel.width = self.entity.isBookmark ? labelsMaxWidth : 0;
CGFloat const bookingWidth = labelsMaxWidth / 2;
self.bookingRatingLabel.width = bookingWidth;
self.bookingPriceLabel.width = bookingWidth - kLabelsBetweenSmallOffset;
self.bookingView.width = labelsMaxWidth;
[self.titleLabel sizeToFit];
[self.subtitleLabel sizeToFit];
[self.addressLabel sizeToFit];
[self.externalTitleLabel sizeToFit];
[self.placeScheduleLabel sizeToFit];
[self.bookingRatingLabel sizeToFit];
[self.bookingPriceLabel sizeToFit];
}
- (void)setDistance:(NSString *)distance
@ -379,13 +404,22 @@ using namespace storage;
CGFloat const bound = self.distanceLabel.width + kDirectionArrowSide + kOffsetFromDistanceToArrow + kOffsetFromLabelsToDistance;
AttributePosition const position = [self distanceAttributePosition];
[self setupLabelsWidthWithBoundedWidth:bound distancePosition:position];
[self layoutLabels];
[self setupBookingView];
[self layoutLabelsAndBooking];
[self layoutTableViewWithPosition:position];
[self setDistance:self.distanceLabel.text];
self.height = self.featureTable.height + self.ppPreview.height;
}
- (void)layoutLabels
- (void)setupBookingView
{
self.bookingRatingLabel.origin = {};
self.bookingPriceLabel.origin = {self.bookingView.width - self.bookingPriceLabel.width, 0};
self.bookingSeparator.origin = {0, self.bookingRatingLabel.maxY + kLabelsBetweenMainOffset};
self.bookingView.height = self.bookingSeparator.maxY + kLabelsBetweenMainOffset;
}
- (void)layoutLabelsAndBooking
{
BOOL const isDownloadProgressViewHidden = self.downloadProgressView.hidden;
if (!isDownloadProgressViewHidden)
@ -393,16 +427,21 @@ using namespace storage;
CGFloat const leftOffset = isDownloadProgressViewHidden ? kLeftOffset : self.downloadProgressView.maxX + kDownloadProgressViewLeftOffset;
auto originFrom = ^ CGPoint (UILabel * l)
auto originFrom = ^ CGPoint (UIView * v, BOOL isBigOffset)
{
return {leftOffset, l.text.length == 0 ? l.minY : l.maxY + kLabelsBetweenMainOffset};
CGFloat const offset = isBigOffset ? kLabelsBetweenMainOffset : kLabelsBetweenSmallOffset;
if ([v isKindOfClass:[UILabel class]])
return {leftOffset, (static_cast<UILabel *>(v).text.length == 0 ? v.minY : v.maxY) +
offset};
return {leftOffset, v.hidden ? v.minY : v.maxY + offset};
};
self.titleLabel.origin = {leftOffset, kLabelsBetweenSmallOffset};
self.externalTitleLabel.origin = originFrom(self.titleLabel);
self.subtitleLabel.origin = originFrom(self.externalTitleLabel);
self.placeScheduleLabel.origin = originFrom(self.subtitleLabel);
self.addressLabel.origin = originFrom(self.placeScheduleLabel);
self.externalTitleLabel.origin = originFrom(self.titleLabel, NO);
self.subtitleLabel.origin = originFrom(self.externalTitleLabel, NO);
self.placeScheduleLabel.origin = originFrom(self.subtitleLabel, NO);
self.bookingView.origin = originFrom(self.placeScheduleLabel, NO);
self.addressLabel.origin = originFrom(self.bookingView, YES);
}
- (void)layoutDistanceBoxWithPosition:(AttributePosition)position
@ -439,18 +478,34 @@ using namespace storage;
{
auto getY = ^ CGFloat (AttributePosition p)
{
switch (position)
if (self.bookingView.hidden)
{
case AttributePosition::Title:
return self.titleLabel.maxY + kBottomPlacePageOffset;
case AttributePosition::ExternalTitle:
return self.externalTitleLabel.maxY + kBottomPlacePageOffset;
case AttributePosition::Subtitle:
return self.subtitleLabel.maxY + kBottomPlacePageOffset;
case AttributePosition::Schedule:
return self.placeScheduleLabel.maxY + kBottomPlacePageOffset;
case AttributePosition::Address:
return self.addressLabel.maxY + kBottomPlacePageOffset;
switch (position)
{
case AttributePosition::Title:
return self.titleLabel.maxY + kBottomPlacePageOffset;
case AttributePosition::ExternalTitle:
return self.externalTitleLabel.maxY + kBottomPlacePageOffset;
case AttributePosition::Subtitle:
return self.subtitleLabel.maxY + kBottomPlacePageOffset;
case AttributePosition::Schedule:
return self.placeScheduleLabel.maxY + kBottomPlacePageOffset;
case AttributePosition::Address:
return self.addressLabel.maxY + kBottomPlacePageOffset;
}
}
else
{
switch (position)
{
case AttributePosition::Title:
case AttributePosition::ExternalTitle:
case AttributePosition::Subtitle:
case AttributePosition::Schedule:
return self.bookingView.maxY + kBottomPlacePageOffset;
case AttributePosition::Address:
return self.addressLabel.maxY + kBottomPlacePageOffset;
}
}
};
@ -613,6 +668,7 @@ using namespace storage;
case MWMPlacePageCellTypeEditButton:
case MWMPlacePageCellTypeAddBusinessButton:
case MWMPlacePageCellTypeAddPlaceButton:
case MWMPlacePageCellTypeBookingMore:
[static_cast<MWMPlacePageButtonCell *>(cell) config:self.ownerPlacePage forType:cellType];
break;
default:

View file

@ -1,11 +0,0 @@
#import "MWMViewController.h"
@class MWMPlacePageViewManager;
@interface MWMBookmarkDescriptionViewController : MWMViewController
- (instancetype)initWithPlacePageManager:(MWMPlacePageViewManager *)manager;
@property (weak, nonatomic) UINavigationController * iPadOwnerNavigationController;
@end

View file

@ -1,218 +0,0 @@
#import "Common.h"
#import "MWMBookmarkDescriptionViewController.h"
#import "MWMPlacePageViewManager.h"
#import "MWMPlacePage.h"
#import "MWMPlacePageEntity.h"
#import "UIViewController+Navigation.h"
static NSString * const kBookmarkDescriptionViewControllerNibName = @"MWMBookmarkDescriptionViewController";
typedef NS_ENUM(NSUInteger, BookmarkDescriptionState)
{
BookmarkDescriptionStateEditText,
BookmarkDescriptionStateViewHTML,
BookmarkDescriptionStateEditHTML
};
@interface MWMBookmarkDescriptionViewController () <UIWebViewDelegate>
@property (weak, nonatomic) IBOutlet UITextView * textView;
@property (weak, nonatomic) IBOutlet UIWebView * webView;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint * textViewBottomOffset;
@property (weak, nonatomic) MWMPlacePageViewManager * manager;
@property (nonatomic) BookmarkDescriptionState state;
@end
@implementation MWMBookmarkDescriptionViewController
- (instancetype)initWithPlacePageManager:(MWMPlacePageViewManager *)manager
{
self = [super initWithNibName:kBookmarkDescriptionViewControllerNibName bundle:nil];
if (self)
self.manager = manager;
return self;
}
- (void)viewDidLoad
{
[super viewDidLoad];
self.navigationItem.title = L(@"description");
MWMPlacePageEntity const * entity = self.manager.entity;
if (!IPAD)
{
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(keyboardWillChangeFrame:)
name:UIKeyboardWillChangeFrameNotification
object:nil];
}
if (entity.isHTMLDescription)
self.state = BookmarkDescriptionStateViewHTML;
else
self.state = BookmarkDescriptionStateEditText;
if (self.iPadOwnerNavigationController)
[self showBackButton];
}
- (void)viewWillAppear:(BOOL)animated
{
[super viewWillAppear:animated];
[self.iPadOwnerNavigationController setNavigationBarHidden:NO];
}
- (void)viewWillDisappear:(BOOL)animated
{
[super viewWillDisappear:animated];
[self.manager reloadBookmark];
}
- (void)viewDidLayoutSubviews
{
[super viewDidLayoutSubviews];
if (!IPAD)
return;
self.view.height = self.iPadOwnerNavigationController.view.height - self.iPadOwnerNavigationController.navigationBar.height;
}
- (void)setState:(BookmarkDescriptionState)state
{
MWMPlacePageEntity * entity = self.manager.entity;
NSString * description = entity.bookmarkDescription;
switch (state)
{
case BookmarkDescriptionStateEditText:
case BookmarkDescriptionStateEditHTML:
[self setupForEditingWithText:description];
break;
case BookmarkDescriptionStateViewHTML:
[self setupForViewWithText:description];
break;
}
_state = state;
}
- (void)setupForEditingWithText:(NSString *)text
{
self.textView.hidden = NO;
self.textView.text = text;
[UIView animateWithDuration:kDefaultAnimationDuration animations:^
{
self.webView.alpha = 0.;
self.textView.alpha = 1.;
}
completion:^(BOOL finished)
{
self.webView.hidden = YES;
[self.textView becomeFirstResponder];
}];
[self configureNavigationBarForEditing];
}
- (void)setupForViewWithText:(NSString *)text
{
self.webView.hidden = NO;
[self.webView loadHTMLString:text baseURL:nil];
[UIView animateWithDuration:kDefaultAnimationDuration animations:^
{
self.webView.alpha = 1.;
self.textView.alpha = 0.;
}
completion:^(BOOL finished)
{
self.textView.hidden = YES;
}];
[self configureNavigationBarForView];
}
- (void)configureNavigationBarForEditing
{
self.navigationItem.leftBarButtonItem =
[[UIBarButtonItem alloc] initWithTitle:L(@"cancel")
style:UIBarButtonItemStylePlain
target:self
action:@selector(cancelTap)];
self.navigationItem.rightBarButtonItem =
[[UIBarButtonItem alloc] initWithTitle:L(@"done")
style:UIBarButtonItemStylePlain
target:self
action:@selector(doneTap)];
}
- (void)configureNavigationBarForView
{
[self showBackButton];
self.navigationItem.rightBarButtonItem =
[[UIBarButtonItem alloc] initWithTitle:L(@"edit")
style:UIBarButtonItemStylePlain
target:self
action:@selector(editTap)];
}
- (void)cancelTap
{
[self.textView resignFirstResponder];
if (self.manager.entity.isHTMLDescription)
self.state = BookmarkDescriptionStateViewHTML;
else
[self popViewController];
}
- (void)doneTap
{
MWMPlacePageEntity * entity = self.manager.entity;
entity.bookmarkDescription = self.textView.text;
[entity synchronize];
[self cancelTap];
}
- (void)backTap
{
[self.textView resignFirstResponder];
[self popViewController];
}
- (void)editTap
{
self.state = BookmarkDescriptionStateEditHTML;
}
- (void)popViewController
{
[self.iPadOwnerNavigationController setNavigationBarHidden:YES];
[self.navigationController popViewControllerAnimated:YES];
}
#pragma mark - Notifications
- (void)keyboardWillChangeFrame:(NSNotification *)aNotification
{
NSDictionary * info = [aNotification userInfo];
CGSize const kbSize = [info[UIKeyboardFrameEndUserInfoKey] CGRectValue].size;
CGFloat const offsetToKeyboard = 8.0;
CGFloat const navBarHeight = IPAD ? self.navigationController.navigationBar.height : 0.0;
self.textViewBottomOffset.constant = kbSize.height + offsetToKeyboard - navBarHeight;
}
- (void)dealloc
{
[[NSNotificationCenter defaultCenter] removeObserver:self];
}
#pragma mark - UIWebViewDelegate
- (BOOL)webView:(UIWebView *)inWeb shouldStartLoadWithRequest:(NSURLRequest *)inRequest navigationType:(UIWebViewNavigationType)inType
{
if (inType == UIWebViewNavigationTypeLinkClicked)
{
[[UIApplication sharedApplication] openURL:[inRequest URL]];
return NO;
}
return YES;
}
@end

View file

@ -1,61 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="10116" systemVersion="15E65" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="MWMBookmarkDescriptionViewController">
<connections>
<outlet property="textView" destination="24o-IB-Pbl" id="sUc-Ad-jBz"/>
<outlet property="textViewBottomOffset" destination="FZf-xW-Bym" id="JAV-jf-JZj"/>
<outlet property="view" destination="iN0-l3-epB" id="CMc-df-bqm"/>
<outlet property="webView" destination="lov-Ku-GJM" id="0tn-HE-9c5"/>
</connections>
</placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view contentMode="scaleToFill" id="iN0-l3-epB" customClass="SolidTouchView">
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<textView clipsSubviews="YES" multipleTouchEnabled="YES" alpha="0.0" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="24o-IB-Pbl" customClass="MWMTextView">
<rect key="frame" x="8" y="12" width="304" height="544"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<color key="textColor" red="0.12941176470588237" green="0.12941176470588237" blue="0.12941176470588237" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<fontDescription key="fontDescription" type="system" weight="light" pointSize="17"/>
<textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="localizedPlaceholder" value="edit_description_hint"/>
<userDefinedRuntimeAttribute type="string" keyPath="backgroundColorName" value="white"/>
<userDefinedRuntimeAttribute type="string" keyPath="colorName" value="blackSecondaryText"/>
<userDefinedRuntimeAttribute type="string" keyPath="fontName" value="regular16"/>
</userDefinedRuntimeAttributes>
</textView>
<webView alpha="0.0" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="lov-Ku-GJM">
<rect key="frame" x="8" y="12" width="304" height="544"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<dataDetectorType key="dataDetectorTypes" phoneNumber="YES" link="YES"/>
<connections>
<outlet property="delegate" destination="-1" id="kcw-1c-sOr"/>
</connections>
</webView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="bottom" secondItem="lov-Ku-GJM" secondAttribute="bottom" constant="12" id="2Vh-CS-WmU"/>
<constraint firstAttribute="bottom" secondItem="24o-IB-Pbl" secondAttribute="bottom" constant="12" id="FZf-xW-Bym"/>
<constraint firstAttribute="trailing" secondItem="24o-IB-Pbl" secondAttribute="trailing" constant="8" id="JrP-74-iHR"/>
<constraint firstItem="lov-Ku-GJM" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" constant="12" id="QTh-m4-RGF"/>
<constraint firstItem="24o-IB-Pbl" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" constant="12" id="Tvy-uS-LLQ"/>
<constraint firstItem="24o-IB-Pbl" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="8" id="XxF-BN-kEE"/>
<constraint firstItem="lov-Ku-GJM" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="8" id="eGH-Cd-eln"/>
<constraint firstAttribute="trailing" secondItem="lov-Ku-GJM" secondAttribute="trailing" constant="8" id="rmo-FN-eau"/>
</constraints>
<nil key="simulatedTopBarMetrics"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="backgroundColorName" value="white"/>
</userDefinedRuntimeAttributes>
<point key="canvasLocation" x="303" y="292"/>
</view>
</objects>
</document>

View file

@ -21,7 +21,7 @@
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="fontName" value="regular17"/>
<userDefinedRuntimeAttribute type="string" keyPath="colorName" value="blackPrimaryText"/>
<userDefinedRuntimeAttribute type="string" keyPath="localizedPlaceholder" value="bookmark_name"/>
<userDefinedRuntimeAttribute type="string" keyPath="localizedPlaceholder" value="placepage_bookmark_name_hint"/>
<userDefinedRuntimeAttribute type="string" keyPath="_placeholderLabel.colorName" value="blackHintText"/>
</userDefinedRuntimeAttributes>
<connections>

View file

@ -65,7 +65,7 @@ enum RowInMetaInfo
- (void)viewDidAppear:(BOOL)animated
{
[super viewDidAppear:animated];
[self.cachedNote updateTextViewForHeight:self.cachedNote.textView.contentSize.height];
[self.cachedNote updateTextViewForHeight:self.cachedNote.textViewContentHeight];
}
- (void)configNavBar
@ -182,7 +182,7 @@ enum RowInMetaInfo
{
self.cachedNote = [tableView dequeueReusableCellWithIdentifier:[MWMNoteCell className]];
[self.cachedNote configWithDelegate:self noteText:self.cachedDescription
placeholder:L(@"personal_description")];
placeholder:L(@"placepage_personal_notes_hint")];
return self.cachedNote;
}
}
@ -190,7 +190,7 @@ enum RowInMetaInfo
{
NSAssert(indexPath.row == 0, @"Incorrect row!");
MWMButtonCell * cell = [tableView dequeueReusableCellWithIdentifier:[MWMButtonCell className]];
[cell configureWithDelegate:self title:L(@"remove_bookmark")];
[cell configureWithDelegate:self title:L(@"placepage_delete_bookmark_button")];
return cell;
}
default:

View file

@ -28,6 +28,7 @@
- (void)editPlace;
- (void)addBusiness;
- (void)addPlace;
- (void)bookingMore;
- (void)reloadBookmark;
- (void)addPlacePageShadowToView:(UIView *)view offset:(CGSize)offset;

View file

@ -1,14 +1,11 @@
#import "MapsAppDelegate.h"
#import "MapViewController.h"
#import "MWMBasePlacePageView.h"
#import "MWMBookmarkColorViewController.h"
#import "MWMBookmarkDescriptionViewController.h"
#import "MWMDirectionView.h"
#import "MWMPlacePage.h"
#import "MWMPlacePageActionBar.h"
#import "MWMPlacePageEntity.h"
#import "MWMPlacePageViewManager.h"
#import "SelectSetVC.h"
#import "Statistics.h"
static NSString * const kPlacePageNibIdentifier = @"PlacePageView";
@ -93,6 +90,7 @@ extern NSString * const kPP2BookmarkEditingIPADSegue = @"PP2BookmarkEditingIPAD"
- (void)addBookmark
{
[self.basePlacePageView addBookmark];
self.actionBar.isBookmark = YES;
}
- (void)removeBookmark
@ -116,6 +114,12 @@ extern NSString * const kPP2BookmarkEditingIPADSegue = @"PP2BookmarkEditingIPAD"
[self.manager addPlace];
}
- (void)bookingMore
{
MapViewController * vc = MapsAppDelegate.theApp.mapViewController;
[vc openUrl:[NSURL URLWithString:[self.manager.entity getCellValue:MWMPlacePageCellTypeBookingMore]]];
}
- (void)addPlacePageShadowToView:(UIView *)view offset:(CGSize)offset
{
CALayer * layer = view.layer;

View file

@ -3,9 +3,9 @@
@interface MWMPlacePageActionBar : SolidTouchView
@property (nonatomic) BOOL isBookmark;
@property (nonatomic) BOOL isPrepareRouteMode;
@property (weak, nonatomic) IBOutlet UIButton * shareButton;
- (UIView *)shareAnchor;
- (BOOL)isPrepareRouteMode;
+ (MWMPlacePageActionBar *)actionBarForPlacePageManager:(MWMPlacePageViewManager *)placePageManager;
- (void)configureWithPlacePageManager:(MWMPlacePageViewManager *)placePageManager;

View file

@ -1,28 +1,32 @@
#import "Common.h"
#import "MapsAppDelegate.h"
#import "MWMActionBarButton.h"
#import "MWMBasePlacePageView.h"
#import "MWMPlacePage.h"
#import "MWMPlacePageActionBar.h"
#import "MWMPlacePageEntity.h"
#import "MWMPlacePageViewManager.h"
#include "Framework.h"
#import "3party/Alohalytics/src/alohalytics_objc.h"
#include "std/vector.hpp"
extern NSString * const kAlohalyticsTapEventKey;
static NSString * const kPlacePageActionBarNibName = @"PlacePageActionBar";
@interface MWMPlacePageActionBar ()
namespace
{
NSString * const kPlacePageActionBarNibName = @"PlacePageActionBar";
} // namespace
@interface MWMPlacePageActionBar () <MWMActionBarButtonDelegate, UIActionSheetDelegate>
{
vector<EButton> m_visibleButtons;
vector<EButton> m_additionalButtons;
}
@property (weak, nonatomic) MWMPlacePageViewManager * placePageManager;
@property (weak, nonatomic) IBOutlet UIButton * apiBackButton;
@property (weak, nonatomic) IBOutlet UIButton * bookmarkButton;
@property (weak, nonatomic) IBOutlet UIButton * routeButton;
@property (weak, nonatomic) IBOutlet UILabel * apiBackLabel;
@property (weak, nonatomic) IBOutlet UILabel * routeLabel;
@property (weak, nonatomic) IBOutlet UILabel * bookmarkLabel;
@property (weak, nonatomic) IBOutlet UILabel * shareLabel;
@property (copy, nonatomic) IBOutletCollection(UIView) NSArray<UIView *> * buttons;
@property (nonatomic) BOOL isPrepareRouteMode;
@end
@ -30,17 +34,8 @@ static NSString * const kPlacePageActionBarNibName = @"PlacePageActionBar";
+ (MWMPlacePageActionBar *)actionBarForPlacePageManager:(MWMPlacePageViewManager *)placePageManager
{
BOOL const isPrepareRouteMode = MapsAppDelegate.theApp.routingPlaneMode != MWMRoutingPlaneModeNone;
NSUInteger const i = isPrepareRouteMode ? 1 : 0;
MWMPlacePageActionBar * bar = [NSBundle.mainBundle
loadNibNamed:kPlacePageActionBarNibName owner:nil options:nil][i];
NSAssert(i == bar.tag, @"Incorrect view!");
bar.isPrepareRouteMode = isPrepareRouteMode;
bar.placePageManager = placePageManager;
if (isPrepareRouteMode)
return bar;
[bar setupBookmarkButton];
MWMPlacePageActionBar * bar = [[NSBundle.mainBundle
loadNibNamed:kPlacePageActionBarNibName owner:nil options:nil] firstObject];
[bar configureWithPlacePageManager:placePageManager];
return bar;
}
@ -48,174 +43,243 @@ static NSString * const kPlacePageActionBarNibName = @"PlacePageActionBar";
- (void)configureWithPlacePageManager:(MWMPlacePageViewManager *)placePageManager
{
self.placePageManager = placePageManager;
MWMPlacePageEntity * entity = self.placePageManager.entity;
if (entity.isApi)
[self setupApiBar];
// TODO(Vlad): API point can be a bookmark too. Probably "else if" shoud be replaced by "if".
else if (entity.isBookmark)
[self setupBookmarkBar];
else if (entity.isMyPosition)
[self setupMyPositionBar];
else
[self setupDefaultBar];
self.isPrepareRouteMode = MapsAppDelegate.theApp.routingPlaneMode != MWMRoutingPlaneModeNone;
self.isBookmark = placePageManager.entity.isBookmark;
[self configureButtons];
self.autoresizingMask = UIViewAutoresizingNone;
[self setNeedsLayout];
}
- (void)setupApiBar
- (void)configureButtons
{
// Four buttons: Back, Share, Bookmark and Route
self.isBookmark = NO;
[self allButtons];
}
- (void)setupMyPositionBar
{
// Two buttons: Share and Bookmark
self.isBookmark = NO;
[self twoButtons];
}
- (void)setupBookmarkBar
{
// Three buttons: Share, Bookmark and Route
self.isBookmark = YES;
[self threeButtons];
}
- (void)setupDefaultBar
{
// Three buttons: Share, Bookmark and Route
self.isBookmark = NO;
[self threeButtons];
}
- (void)threeButtons
{
self.routeButton.hidden = NO;
self.routeLabel.hidden = NO;
self.apiBackButton.hidden = YES;
self.apiBackLabel.hidden = YES;
}
- (void)twoButtons
{
self.routeButton.hidden = YES;
self.routeLabel.hidden = YES;
self.apiBackButton.hidden = YES;
self.apiBackLabel.hidden = YES;
}
- (void)allButtons
{
for (UIView * v in self.subviews)
v.hidden = NO;
}
- (void)setupBookmarkButton
{
UIButton * btn = self.bookmarkButton;
[btn setImage:[UIImage imageNamed:@"ic_bookmarks_on"] forState:UIControlStateHighlighted|UIControlStateSelected];
NSUInteger const animationImagesCount = 11;
NSMutableArray * animationImages = [NSMutableArray arrayWithCapacity:animationImagesCount];
for (NSUInteger i = 0; i < animationImagesCount; ++i)
animationImages[i] = [UIImage imageNamed:[NSString stringWithFormat:@"ic_bookmarks_%@", @(i+1)]];
UIImageView * animationIV = btn.imageView;
animationIV.animationImages = animationImages;
animationIV.animationRepeatCount = 1;
}
- (IBAction)fromTap
{
[self.placePageManager routeFrom];
}
- (IBAction)toTap
{
[self.placePageManager routeTo];
}
- (IBAction)bookmarkTap:(UIButton *)sender
{
self.isBookmark = !self.isBookmark;
NSMutableString * eventName = @"ppBookmarkButtonTap".mutableCopy;
if (self.isBookmark)
{
[sender.imageView startAnimating];
[self.placePageManager addBookmark];
[eventName appendString:@"Add"];
}
else
{
[self.placePageManager removeBookmark];
[eventName appendString:@"Delete"];
}
[Alohalytics logEvent:kAlohalyticsTapEventKey withValue:eventName];
}
- (void)layoutSubviews
{
CGFloat const buttonWidth = 80.;
CGSize const size = UIScreen.mainScreen.bounds.size;
CGFloat const maximumWidth = 360.;
CGFloat const screenWidth = MIN(size.height, size.width);
CGFloat const actualWidth = IPAD ? maximumWidth : (size.height < size.width ? MIN(screenWidth, maximumWidth) : screenWidth);
m_visibleButtons.clear();
m_additionalButtons.clear();
MWMPlacePageEntity * entity = self.placePageManager.entity;
if (entity.isApi)
NSString * phone = [entity getCellValue:MWMPlacePageCellTypePhoneNumber];
BOOL const isIphone = [[UIDevice currentDevice].model isEqualToString:@"iPhone"];
BOOL const isPhoneNotEmpty = phone.length > 0;
BOOL const isBooking = entity.isBooking;
BOOL const itHasPhoneNumber = isIphone && isPhoneNotEmpty;
BOOL const isApi = entity.isApi;
BOOL const isP2P = self.isPrepareRouteMode;
BOOL const isMyPosition = entity.isMyPosition;
if (isMyPosition)
{
CGFloat const boxWidth = 4 * buttonWidth;
CGFloat const leftOffset = (actualWidth - boxWidth) / 5.;
self.apiBackButton.minX = leftOffset;
self.shareButton.minX = self.apiBackButton.maxX + leftOffset;
self.bookmarkButton.minX = self.shareButton.maxX + leftOffset;
self.routeButton.minX = self.bookmarkButton.maxX;
m_visibleButtons.push_back(EButton::Spacer);
m_visibleButtons.push_back(EButton::Bookmark);
m_visibleButtons.push_back(EButton::Share);
m_visibleButtons.push_back(EButton::Spacer);
}
else if (entity.isMyPosition)
else if (isApi && isBooking)
{
CGFloat const boxWidth = 2 * buttonWidth;
CGFloat const leftOffset = (actualWidth - boxWidth) / 3.;
self.shareButton.minX = leftOffset;
self.bookmarkButton.minX = actualWidth - leftOffset - buttonWidth;
m_visibleButtons.push_back(EButton::Api);
m_visibleButtons.push_back(EButton::Booking);
m_additionalButtons.push_back(EButton::Bookmark);
m_additionalButtons.push_back(EButton::RouteFrom);
m_additionalButtons.push_back(EButton::Share);
}
else if (isApi && itHasPhoneNumber)
{
m_visibleButtons.push_back(EButton::Api);
m_visibleButtons.push_back(EButton::Call);
m_additionalButtons.push_back(EButton::Bookmark);
m_additionalButtons.push_back(EButton::RouteFrom);
m_additionalButtons.push_back(EButton::Share);
}
else if (isApi && isP2P)
{
m_visibleButtons.push_back(EButton::Api);
m_visibleButtons.push_back(EButton::RouteFrom);
m_additionalButtons.push_back(EButton::Bookmark);
m_additionalButtons.push_back(EButton::Share);
}
else if (isApi)
{
m_visibleButtons.push_back(EButton::Api);
m_visibleButtons.push_back(EButton::Bookmark);
m_additionalButtons.push_back(EButton::RouteFrom);
m_additionalButtons.push_back(EButton::Share);
}
else if (isBooking && isP2P)
{
m_visibleButtons.push_back(EButton::Bookmark);
m_visibleButtons.push_back(EButton::RouteFrom);
m_additionalButtons.push_back(EButton::Booking);
m_additionalButtons.push_back(EButton::Share);
}
else if (itHasPhoneNumber && isP2P)
{
m_visibleButtons.push_back(EButton::Bookmark);
m_visibleButtons.push_back(EButton::RouteFrom);
m_additionalButtons.push_back(EButton::Call);
m_additionalButtons.push_back(EButton::Share);
}
else if (isBooking)
{
m_visibleButtons.push_back(EButton::Booking);
m_visibleButtons.push_back(EButton::Bookmark);
m_additionalButtons.push_back(EButton::RouteFrom);
m_additionalButtons.push_back(EButton::Share);
}
else if (itHasPhoneNumber)
{
m_visibleButtons.push_back(EButton::Call);
m_visibleButtons.push_back(EButton::Bookmark);
m_additionalButtons.push_back(EButton::RouteFrom);
m_additionalButtons.push_back(EButton::Share);
}
else
{
CGFloat const boxWidth = 3 * buttonWidth;
CGFloat const leftOffset = (actualWidth - boxWidth) / 4.;
self.shareButton.minX = leftOffset;
self.bookmarkButton.minX = self.shareButton.maxX + leftOffset;
self.routeButton.minX = self.bookmarkButton.maxX + leftOffset;
m_visibleButtons.push_back(EButton::Bookmark);
m_visibleButtons.push_back(EButton::RouteFrom);
}
if (!isMyPosition)
{
m_visibleButtons.push_back(EButton::RouteTo);
m_visibleButtons.push_back(m_additionalButtons.empty() ? EButton::Share : EButton::More);
}
for (UIView * v in self.buttons)
{
[v.subviews makeObjectsPerformSelector:@selector(removeFromSuperview)];
auto const type = m_visibleButtons[v.tag - 1];
[MWMActionBarButton addButtonToSuperview:v
delegate:self
buttonType:type
isSelected:type == EButton::Bookmark ? self.isBookmark : NO];
}
self.apiBackLabel.minX = self.apiBackButton.minX;
self.shareLabel.minX = self.shareButton.minX;
self.bookmarkLabel.minX = self.bookmarkButton.minX;
self.routeLabel.minX = self.routeButton.minX;
}
- (IBAction)shareTap
- (UIView *)shareAnchor
{
[self.placePageManager share];
UIView * last = nil;
auto const size = self.buttons.count;
for (UIView * v in self.buttons)
{
if (v.tag == size + 1)
last = v;
}
return last;
}
- (IBAction)routeTap
#pragma mark - MWMActionBarButtonDelegate
- (void)tapOnButtonWithType:(EButton)type
{
[self.placePageManager buildRoute];
switch (type)
{
case EButton::Api:
[self.placePageManager apiBack];
break;
case EButton::Booking:
{
UIViewController * vc = static_cast<UIViewController *>(MapsAppDelegate.theApp.mapViewController);
NSString * urlString = [self.placePageManager.entity getCellValue:MWMPlacePageCellTypeBookingMore];
NSAssert(urlString, @"Booking url can't be nil!");
NSURL * url = [NSURL URLWithString:urlString];
[vc openUrl:url];
break;
}
case EButton::Call:
{
NSString * tel = [self.placePageManager.entity getCellValue:MWMPlacePageCellTypePhoneNumber];
NSAssert(tel, @"Phone number can't be nil!");
NSString * phoneNumber = [[@"telprompt:" stringByAppendingString:tel] stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:phoneNumber]];
break;
}
case EButton::Bookmark:
if (self.isBookmark)
[self.placePageManager removeBookmark];
else
[self.placePageManager addBookmark];
break;
case EButton::RouteFrom:
[self.placePageManager routeFrom];
break;
case EButton::RouteTo:
if (self.isPrepareRouteMode)
[self.placePageManager routeTo];
else
[self.placePageManager buildRoute];
break;
case EButton::Share:
[self.placePageManager share];
break;
case EButton::More:
[self showActionSheet];
break;
case EButton::Spacer:
break;
}
}
- (IBAction)backTap
#pragma mark - ActionSheet
- (void)showActionSheet
{
[self.placePageManager apiBack];
NSString * cancel = L(@"cancel");
MWMPlacePageEntity * entity = self.placePageManager.entity;
BOOL const isTitleNotEmpty = entity.title.length > 0;
NSString * title = isTitleNotEmpty ? entity.title : entity.subtitle;
NSString * subtitle = isTitleNotEmpty ? entity.subtitle : nil;
UIViewController * vc = static_cast<UIViewController *>(MapsAppDelegate.theApp.mapViewController);
NSMutableArray<NSString *> * titles = [@[] mutableCopy];
for (auto const buttonType : m_additionalButtons)
{
BOOL const isSelected = buttonType == EButton::Bookmark ? self.isBookmark : NO;
if (NSString * title = titleForButton(buttonType, isSelected))
[titles addObject:titleForButton(buttonType, isSelected)];
else
NSAssert(false, @"Title can't be nil!");
}
if (isIOS7)
{
UIActionSheet * actionSheet = [[UIActionSheet alloc] initWithTitle:title delegate:self cancelButtonTitle:cancel destructiveButtonTitle:nil otherButtonTitles:nil];
for (NSString * title in titles)
[actionSheet addButtonWithTitle:title];
[actionSheet showInView:vc.view];
}
else
{
UIAlertController * alertController = [UIAlertController alertControllerWithTitle:title message:subtitle preferredStyle:UIAlertControllerStyleActionSheet];
UIAlertAction * cancelAction = [UIAlertAction actionWithTitle:cancel style:UIAlertActionStyleCancel handler:nil];
for (auto i = 0; i < titles.count; i++)
{
UIAlertAction * commonAction = [UIAlertAction actionWithTitle:titles[i] style:UIAlertActionStyleDefault handler:^(UIAlertAction * action)
{
[self tapOnButtonWithType:self->m_additionalButtons[i]];
}];
[alertController addAction:commonAction];
}
[alertController addAction:cancelAction];
if (IPAD)
{
UIPopoverPresentationController * popPresenter = [alertController popoverPresentationController];
popPresenter.sourceView = self.shareAnchor;
}
[vc presentViewController:alertController animated:YES completion:nil];
}
}
#pragma mark - Properties
#pragma mark - UIActionSheetDelegate
- (void)setIsBookmark:(BOOL)isBookmark
- (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex
{
_isBookmark = isBookmark;
self.bookmarkButton.selected = isBookmark;
self.bookmarkLabel.text = L(isBookmark ? @"delete" : @"save");
[actionSheet dismissWithClickedButtonIndex:buttonIndex animated:YES];
// Using buttonIndex - 1 because there is cancel button at index 0
// Only iOS7
if (buttonIndex > 0)
[self tapOnButtonWithType:m_additionalButtons[buttonIndex - 1]];
}
@end

View file

@ -28,6 +28,9 @@
case MWMPlacePageCellTypeAddPlaceButton:
[self.titleButton setTitle:L(@"placepage_add_place_button") forState:UIControlStateNormal];
break;
case MWMPlacePageCellTypeBookingMore:
[self.titleButton setTitle:L(@"placepage_booking_more") forState:UIControlStateNormal];
break;
default:
NSAssert(false, @"Invalid place page cell type!");
break;
@ -51,6 +54,9 @@
[Statistics logEvent:kStatEditorAddClick withParameters:@{kStatValue : kStatPlacePageNonBuilding}];
[self.placePage addPlace];
break;
case MWMPlacePageCellTypeBookingMore:
[self.placePage bookingMore];
break;
default:
NSAssert(false, @"Incorrect cell type!");
break;

View file

@ -28,6 +28,7 @@ typedef NS_ENUM(NSUInteger, MWMPlacePageCellType)
MWMPlacePageCellTypeBuildingLevels,
MWMPlacePageCellTypeCuisine,
MWMPlacePageCellTypeNote,
MWMPlacePageCellTypeBookingMore,
MWMPlacePageCellTypeCount
};
@ -45,6 +46,8 @@ using MWMPlacePageCellTypeValueMap = map<MWMPlacePageCellType, string>;
@property (copy, nonatomic) NSString * bookmarkDescription;
@property (nonatomic, readonly) BOOL isHTMLDescription;
@property (copy, nonatomic) NSString * bookmarkColor;
@property (copy, nonatomic) NSString * bookingRating;
@property (copy, nonatomic) NSString * bookingPrice;
@property (nonatomic) BookmarkAndCategory bac;
@property (weak, nonatomic) MWMPlacePageViewManager * manager;
@ -53,6 +56,7 @@ using MWMPlacePageCellTypeValueMap = map<MWMPlacePageCellType, string>;
- (BOOL)isMyPosition;
- (BOOL)isBookmark;
- (BOOL)isApi;
- (BOOL)isBooking;
- (ms::LatLon)latlon;
- (m2::PointD const &)mercator;
- (NSString *)apiURL;

View file

@ -24,10 +24,11 @@ void putFields(NSUInteger eTypeValue, NSUInteger ppValue)
gMetaFieldsMap[ppValue] = eTypeValue;
}
void initFieldsMap()
void initFieldsMap(BOOL isBooking)
{
auto const websiteType = isBooking ? MWMPlacePageCellTypeBookingMore : MWMPlacePageCellTypeWebsite;
putFields(Metadata::FMD_URL, MWMPlacePageCellTypeURL);
putFields(Metadata::FMD_WEBSITE, MWMPlacePageCellTypeWebsite);
putFields(Metadata::FMD_WEBSITE, websiteType);
putFields(Metadata::FMD_PHONE_NUMBER, MWMPlacePageCellTypePhoneNumber);
putFields(Metadata::FMD_OPEN_HOURS, MWMPlacePageCellTypeOpenHours);
putFields(Metadata::FMD_EMAIL, MWMPlacePageCellTypeEmail);
@ -37,7 +38,7 @@ void initFieldsMap()
ASSERT_EQUAL(gMetaFieldsMap[Metadata::FMD_URL], MWMPlacePageCellTypeURL, ());
ASSERT_EQUAL(gMetaFieldsMap[MWMPlacePageCellTypeURL], Metadata::FMD_URL, ());
ASSERT_EQUAL(gMetaFieldsMap[Metadata::FMD_WEBSITE], MWMPlacePageCellTypeWebsite, ());
ASSERT_EQUAL(gMetaFieldsMap[Metadata::FMD_WEBSITE], websiteType, ());
ASSERT_EQUAL(gMetaFieldsMap[MWMPlacePageCellTypeWebsite], Metadata::FMD_WEBSITE, ());
ASSERT_EQUAL(gMetaFieldsMap[Metadata::FMD_POSTCODE], MWMPlacePageCellTypePostcode, ());
ASSERT_EQUAL(gMetaFieldsMap[MWMPlacePageCellTypePostcode], Metadata::FMD_POSTCODE, ());
@ -57,7 +58,7 @@ void initFieldsMap()
if (self)
{
m_info = info;
initFieldsMap();
initFieldsMap(info.IsSponsoredHotel());
[self config];
}
return self;
@ -88,6 +89,8 @@ void initFieldsMap()
self.title = @(m_info.GetTitle().c_str());
self.address = @(m_info.GetAddress().c_str());
self.subtitle = @(m_info.GetSubtitle().c_str());
self.bookingRating = @(m_info.GetRatingFormatted().c_str());
self.bookingPrice = @(m_info.GetApproximatePricing().c_str());
}
- (void)configureFeature
@ -143,8 +146,7 @@ void initFieldsMap()
- (NSString *)getCellValue:(MWMPlacePageCellType)cellType
{
auto const s = MapsAppDelegate.theApp.mapViewController.controlsManager.navigationState;
BOOL const editOrAddAreAvailable = version::IsSingleMwm(GetFramework().Storage().GetCurrentDataVersion()) &&
s == MWMNavigationDashboardStateHidden;
BOOL const editOrAddAreAvailable = version::IsSingleMwm(GetFramework().Storage().GetCurrentDataVersion()) && s == MWMNavigationDashboardStateHidden && !self.isBooking;
switch (cellType)
{
case MWMPlacePageCellTypeName:
@ -160,15 +162,22 @@ void initFieldsMap()
return editOrAddAreAvailable && !m_info.IsMyPosition() && m_info.IsFeature() ? @"": nil;
case MWMPlacePageCellTypeAddBusinessButton:
return editOrAddAreAvailable && m_info.IsBuilding() ? @"" : nil;
case MWMPlacePageCellTypeWebsite:
return m_info.IsSponsoredHotel() ? nil : [self getDefaultField:cellType];
case MWMPlacePageCellTypeBookingMore:
return m_info.IsSponsoredHotel() ? [self getDefaultField:cellType] : nil;
default:
{
auto const it = m_values.find(cellType);
BOOL const haveField = (it != m_values.end());
return haveField ? @(it->second.c_str()) : nil;
}
return [self getDefaultField:cellType];
}
}
- (NSString *)getDefaultField:(MWMPlacePageCellType)cellType
{
auto const it = m_values.find(cellType);
BOOL const haveField = (it != m_values.end());
return haveField ? @(it->second.c_str()) : nil;
}
- (place_page::Info const &)info
{
return m_info;
@ -199,6 +208,11 @@ void initFieldsMap()
return m_info.HasApiUrl();
}
- (BOOL)isBooking
{
return m_info.IsSponsoredHotel();
}
- (ms::LatLon)latlon
{
return m_info.GetLatLon();

View file

@ -1,4 +1,6 @@
#import "Common.h"
#import "MapsAppDelegate.h"
#import "MapViewController.h"
#import "MWMPlacePageEntity.h"
#import "MWMPlacePageInfoCell.h"
#import "Statistics.h"
@ -102,6 +104,12 @@
- (BOOL)textView:(UITextView *)textView shouldInteractWithURL:(NSURL *)URL inRange:(NSRange)characterRange
{
NSString * scheme = URL.scheme;
if ([scheme isEqualToString:@"http"] || [scheme isEqualToString:@"https"])
{
[MapsAppDelegate.theApp.mapViewController openUrl:URL];
return NO;
}
return YES;
}

View file

@ -243,7 +243,7 @@ extern NSString * const kBookmarksChangedNotification;
location:coord
myPosition:NO];
[shareVC presentInParentViewController:self.ownerViewController
anchorView:self.placePage.actionBar.shareButton];
anchorView:self.placePage.actionBar.shareAnchor];
}
- (void)apiBack

View file

@ -1,12 +1,9 @@
#import "Common.h"
#import "MWMBasePlacePageView.h"
#import "MWMBookmarkColorViewController.h"
#import "MWMBookmarkDescriptionViewController.h"
#import "MWMiPadPlacePage.h"
#import "MWMPlacePageActionBar.h"
#import "MWMPlacePageViewManager.h"
#import "MWMViewController.h"
#import "SelectSetVC.h"
#import "UIColor+MapsMeColor.h"
#import "UIViewController+Navigation.h"

View file

@ -189,7 +189,7 @@ typedef NS_ENUM(NSUInteger, MWMiPhonePortraitPlacePageState)
MWMBasePlacePageView * basePPV = self.basePlacePageView;
CGFloat const anchorHeight = self.anchorImageView.height;
CGFloat const actionBarHeight = self.actionBar.height;
return anchorHeight + basePPV.ppPreview.height /*+ kBottomPlacePageOffset*/ + actionBarHeight - 1;
return anchorHeight + basePPV.ppPreview.height + actionBarHeight - 1;
}
#pragma mark - Actions

View file

@ -702,7 +702,6 @@ using namespace osm_auth_ios;
[barBtn setTitleTextAttributes:@{
NSForegroundColorAttributeName : [UIColor lightGrayColor],
} forState:UIControlStateDisabled];
barBtn.tintColor = [UIColor whitePrimaryText];
UIPageControl * pageControl = [UIPageControl appearance];
pageControl.pageIndicatorTintColor = [UIColor blackHintText];

View file

@ -1,8 +1,9 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9531" systemVersion="15A284" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="10117" systemVersion="15E65" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9529"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
<capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
@ -11,193 +12,69 @@
<rect key="frame" x="0.0" y="0.0" width="320" height="48"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="separator_image" id="WPU-f0-gXc">
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="separator_image" translatesAutoresizingMaskIntoConstraints="NO" id="WPU-f0-gXc">
<rect key="frame" x="0.0" y="0.0" width="320" height="1"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="5Io-jf-rQx"/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="coloring" value="MWMSeparator"/>
</userDefinedRuntimeAttributes>
</imageView>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="pZD-rg-W4y" userLabel="BackButton" customClass="MWMButton">
<rect key="frame" x="0.0" y="-5" width="80" height="46"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<state key="normal" image="ic_back_api">
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
</state>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="coloringName" value="MWMBlack"/>
</userDefinedRuntimeAttributes>
<connections>
<action selector="backTap" destination="iN0-l3-epB" eventType="touchUpInside" id="C4S-yq-52j"/>
</connections>
</button>
<label opaque="NO" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Back" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="ZeH-u1-ky5" userLabel="BackLabel">
<rect key="frame" x="0.0" y="32" width="80" height="13"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="10"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.54000000000000004" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="localizedText" value="back"/>
<userDefinedRuntimeAttribute type="string" keyPath="colorName" value="blackSecondaryText"/>
<userDefinedRuntimeAttribute type="string" keyPath="fontName" value="regular10"/>
</userDefinedRuntimeAttributes>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="Jtm-w6-q1e" userLabel="ShareButton" customClass="MWMButton">
<rect key="frame" x="80" y="-5" width="80" height="46"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<state key="normal" image="ic_menu_share">
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
</state>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="coloringName" value="MWMBlack"/>
</userDefinedRuntimeAttributes>
<connections>
<action selector="shareTap" destination="iN0-l3-epB" eventType="touchUpInside" id="PGT-Ie-Gmr"/>
</connections>
</button>
<label opaque="NO" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Share" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="4Hy-ie-rSK">
<rect key="frame" x="80" y="32" width="80" height="13"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="10"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.54000000000000004" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="localizedText" value="share"/>
<userDefinedRuntimeAttribute type="string" keyPath="colorName" value="blackSecondaryText"/>
<userDefinedRuntimeAttribute type="string" keyPath="fontName" value="regular10"/>
</userDefinedRuntimeAttributes>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="66j-hn-azO" userLabel="SaveButton" customClass="MWMButton">
<rect key="frame" x="160" y="-5" width="80" height="46"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<state key="normal" title="" image="ic_bookmarks_off"/>
<state key="selected" image="ic_bookmarks_on"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="coloringName" value="MWMBlack"/>
</userDefinedRuntimeAttributes>
<connections>
<action selector="bookmarkTap:" destination="iN0-l3-epB" eventType="touchUpInside" id="sTn-J9-JAv"/>
</connections>
</button>
<label opaque="NO" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Save" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="niS-Il-TNU">
<rect key="frame" x="160" y="32" width="80" height="13"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="10"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.54000000000000004" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="localizedText" value="save"/>
<userDefinedRuntimeAttribute type="string" keyPath="colorName" value="blackSecondaryText"/>
<userDefinedRuntimeAttribute type="string" keyPath="fontName" value="regular10"/>
</userDefinedRuntimeAttributes>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="6cp-1o-ehc" userLabel="RouteButton" customClass="MWMButton">
<rect key="frame" x="240" y="-5" width="80" height="46"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<state key="normal" image="ic_route">
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
</state>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="coloringName" value="MWMBlack"/>
</userDefinedRuntimeAttributes>
<connections>
<action selector="routeTap" destination="iN0-l3-epB" eventType="touchUpInside" id="mAp-BH-2qW"/>
</connections>
</button>
<label opaque="NO" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Route" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="OOE-NW-gUw">
<rect key="frame" x="240" y="32" width="80" height="13"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="10"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.54000000000000004" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="localizedText" value="route"/>
<userDefinedRuntimeAttribute type="string" keyPath="colorName" value="blackSecondaryText"/>
<userDefinedRuntimeAttribute type="string" keyPath="fontName" value="regular10"/>
</userDefinedRuntimeAttributes>
</label>
<view tag="1" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ctK-eb-hsj" userLabel="First">
<rect key="frame" x="0.0" y="0.0" width="80" height="48"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</view>
<view tag="2" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="j7d-3d-R7Z" userLabel="Second">
<rect key="frame" x="80" y="0.0" width="80" height="48"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</view>
<view tag="3" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Xtb-qr-MYt" userLabel="Third">
<rect key="frame" x="160" y="0.0" width="80" height="48"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</view>
<view tag="4" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="A9L-Jr-3Qt" userLabel="Fourth">
<rect key="frame" x="240" y="0.0" width="80" height="48"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</view>
</subviews>
<color key="backgroundColor" red="0.96078431372549022" green="0.96078431372549022" blue="0.96078431372549022" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="trailing" secondItem="A9L-Jr-3Qt" secondAttribute="trailing" id="0Xn-cr-NHe"/>
<constraint firstItem="j7d-3d-R7Z" firstAttribute="leading" secondItem="ctK-eb-hsj" secondAttribute="trailing" id="4Rk-gd-qCE"/>
<constraint firstItem="ctK-eb-hsj" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="BdD-Dv-WWq"/>
<constraint firstItem="Xtb-qr-MYt" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="CWV-y5-Uk8"/>
<constraint firstItem="WPU-f0-gXc" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="Ien-2g-AfU"/>
<constraint firstItem="A9L-Jr-3Qt" firstAttribute="height" secondItem="ctK-eb-hsj" secondAttribute="height" id="OU3-BY-4sO"/>
<constraint firstItem="A9L-Jr-3Qt" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="Ogf-tp-9eb"/>
<constraint firstItem="j7d-3d-R7Z" firstAttribute="height" secondItem="ctK-eb-hsj" secondAttribute="height" id="Qjr-dO-ihG"/>
<constraint firstItem="Xtb-qr-MYt" firstAttribute="width" secondItem="ctK-eb-hsj" secondAttribute="width" id="Rlq-FF-9eK"/>
<constraint firstItem="ctK-eb-hsj" firstAttribute="width" secondItem="iN0-l3-epB" secondAttribute="width" multiplier="1:4" id="S0G-a2-90q"/>
<constraint firstItem="ctK-eb-hsj" firstAttribute="height" secondItem="iN0-l3-epB" secondAttribute="height" id="TSs-t2-Zoy"/>
<constraint firstItem="Xtb-qr-MYt" firstAttribute="leading" secondItem="j7d-3d-R7Z" secondAttribute="trailing" id="a5s-LM-EYz"/>
<constraint firstItem="j7d-3d-R7Z" firstAttribute="width" secondItem="ctK-eb-hsj" secondAttribute="width" id="g4o-dJ-EtU"/>
<constraint firstAttribute="trailing" secondItem="WPU-f0-gXc" secondAttribute="trailing" id="gB2-l5-uva"/>
<constraint firstItem="j7d-3d-R7Z" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="jT0-ye-TZz"/>
<constraint firstItem="WPU-f0-gXc" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="krG-Gh-0yX"/>
<constraint firstItem="ctK-eb-hsj" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="ks0-jC-L5G"/>
<constraint firstItem="A9L-Jr-3Qt" firstAttribute="width" secondItem="ctK-eb-hsj" secondAttribute="width" id="vHz-22-u43"/>
<constraint firstItem="Xtb-qr-MYt" firstAttribute="height" secondItem="ctK-eb-hsj" secondAttribute="height" id="xWW-Hy-qTR"/>
</constraints>
<nil key="simulatedStatusBarMetrics"/>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="backgroundColorName" value="pressBackground"/>
</userDefinedRuntimeAttributes>
<connections>
<outlet property="apiBackButton" destination="pZD-rg-W4y" id="Bnq-xK-0a9"/>
<outlet property="apiBackLabel" destination="ZeH-u1-ky5" id="bNt-BX-H3q"/>
<outlet property="bookmarkButton" destination="66j-hn-azO" id="uBJ-zf-YgW"/>
<outlet property="bookmarkLabel" destination="niS-Il-TNU" id="q0I-39-OWe"/>
<outlet property="routeButton" destination="6cp-1o-ehc" id="qSO-u1-8px"/>
<outlet property="routeLabel" destination="OOE-NW-gUw" id="hLC-Td-pdV"/>
<outlet property="shareButton" destination="Jtm-w6-q1e" id="Bu8-eV-KhG"/>
<outlet property="shareLabel" destination="4Hy-ie-rSK" id="b5p-nj-j5J"/>
<outletCollection property="buttons" destination="j7d-3d-R7Z" id="zQ7-1E-mim"/>
<outletCollection property="buttons" destination="Xtb-qr-MYt" id="ODg-IK-Yj1"/>
<outletCollection property="buttons" destination="A9L-Jr-3Qt" id="Sdq-bh-P1v"/>
<outletCollection property="buttons" destination="ctK-eb-hsj" id="aCR-kW-TxE"/>
</connections>
<point key="canvasLocation" x="335" y="266"/>
</view>
<view tag="1" contentMode="scaleToFill" id="2HF-YO-IQi" customClass="MWMPlacePageActionBar">
<rect key="frame" x="0.0" y="0.0" width="320" height="48"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="separator_image" id="Lgi-vx-FHb">
<rect key="frame" x="0.0" y="0.0" width="320" height="1"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="coloring" value="MWMSeparator"/>
</userDefinedRuntimeAttributes>
</imageView>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="yN5-Eq-jO7">
<rect key="frame" x="0.0" y="0.0" width="159" height="48"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" name="HelveticaNeue" family="Helvetica Neue" pointSize="17"/>
<state key="normal" title="From">
<color key="titleColor" red="0.0" green="0.0" blue="0.0" alpha="0.54000000000000004" colorSpace="custom" customColorSpace="sRGB"/>
</state>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="localizedText" value="p2p_from_here"/>
<userDefinedRuntimeAttribute type="string" keyPath="textColorName" value="blackSecondaryText"/>
</userDefinedRuntimeAttributes>
<connections>
<action selector="fromTap" destination="2HF-YO-IQi" eventType="touchUpInside" id="TlT-QT-gt8"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="l4h-4q-eGV">
<rect key="frame" x="160" y="0.0" width="160" height="48"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" name="HelveticaNeue" family="Helvetica Neue" pointSize="17"/>
<state key="normal" title="To">
<color key="titleColor" red="0.0" green="0.0" blue="0.0" alpha="0.54000000000000004" colorSpace="custom" customColorSpace="sRGB"/>
</state>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="localizedText" value="p2p_to_here"/>
<userDefinedRuntimeAttribute type="string" keyPath="textColorName" value="blackSecondaryText"/>
</userDefinedRuntimeAttributes>
<connections>
<action selector="toTap" destination="2HF-YO-IQi" eventType="touchUpInside" id="cv9-Vs-6EE"/>
</connections>
</button>
<view contentMode="scaleToFill" layoutMarginsFollowReadableWidth="YES" id="ACK-rU-Jun" userLabel="vSeparator">
<rect key="frame" x="159" y="6" width="1" height="36"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES"/>
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.12" colorSpace="custom" customColorSpace="sRGB"/>
</view>
</subviews>
<color key="backgroundColor" red="0.96078431372549022" green="0.96078431372549022" blue="0.96078431372549022" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="simulatedStatusBarMetrics"/>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="backgroundColorName" value="pressBackground"/>
</userDefinedRuntimeAttributes>
<point key="canvasLocation" x="335" y="365"/>
</view>
</objects>
<resources>
<image name="ic_back_api" width="28" height="28"/>
<image name="ic_bookmarks_off" width="28" height="28"/>
<image name="ic_bookmarks_on" width="28" height="28"/>
<image name="ic_menu_share" width="28" height="28"/>
<image name="ic_route" width="28" height="28"/>
<image name="separator_image" width="1" height="1"/>
</resources>
</document>

View file

@ -84,7 +84,7 @@
<userDefinedRuntimeAttribute type="string" keyPath="fontName" value="regular17"/>
<userDefinedRuntimeAttribute type="string" keyPath="textColorName" value="linkBlue"/>
<userDefinedRuntimeAttribute type="string" keyPath="textColorHighlightedName" value="linkBlueHighlighted"/>
<userDefinedRuntimeAttribute type="string" keyPath="localizedText" value="edit_bookmark"/>
<userDefinedRuntimeAttribute type="string" keyPath="localizedText" value="placepage_edit_bookmark_button"/>
</userDefinedRuntimeAttributes>
<connections>
<action selector="editTap" destination="zRR-Mr-Dr9" eventType="touchUpInside" id="d1F-RO-oIi"/>

View file

@ -39,7 +39,7 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<view contentMode="scaleToFill" id="Eil-hi-tf9" userLabel="PPPreview">
<rect key="frame" x="0.0" y="0.0" width="320" height="86"/>
<rect key="frame" x="0.0" y="0.0" width="320" height="123"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Starbucks" lineBreakMode="wordWrap" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="T1Y-Oq-6fg">
@ -138,6 +138,42 @@
<autoresizingMask key="autoresizingMask"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</view>
<view contentMode="scaleToFill" id="jtP-sL-iqu">
<rect key="frame" x="16" y="90" width="288" height="33"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Rating" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="cdG-Pk-htN">
<rect key="frame" x="0.0" y="0.0" width="84" height="21"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" red="0.33333333333333331" green="0.54509803921568623" blue="0.18431372549019609" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="fontName" value="medium16"/>
<userDefinedRuntimeAttribute type="string" keyPath="colorName" value="green"/>
</userDefinedRuntimeAttributes>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Rating" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="Cet-KX-351">
<rect key="frame" x="204" y="0.0" width="84" height="21"/>
<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="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="fontName" value="medium16"/>
<userDefinedRuntimeAttribute type="string" keyPath="colorName" value="blackPrimaryText"/>
</userDefinedRuntimeAttributes>
</label>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="separator_image" id="9Lo-ZS-wGM">
<rect key="frame" x="0.0" y="24" width="288" height="1"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="coloring" value="MWMSeparator"/>
</userDefinedRuntimeAttributes>
</imageView>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</view>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<connections>
@ -145,7 +181,7 @@
</connections>
</view>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="grouped" separatorStyle="default" allowsSelection="NO" showsSelectionImmediatelyOnTouchBegin="NO" rowHeight="44" sectionHeaderHeight="15" sectionFooterHeight="1" id="hZM-Gs-BbS">
<rect key="frame" x="0.0" y="84" width="320" height="384"/>
<rect key="frame" x="0.0" y="124" width="320" height="568"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" red="0.93725490199999995" green="0.93725490199999995" blue="0.95686274510000002" alpha="1" colorSpace="calibratedRGB"/>
<inset key="separatorInset" minX="60" minY="0.0" maxX="0.0" maxY="0.0"/>
@ -161,6 +197,10 @@
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<connections>
<outlet property="addressLabel" destination="eyV-C6-ull" id="Wva-8a-78Q"/>
<outlet property="bookingPriceLabel" destination="Cet-KX-351" id="LXW-vh-wN2"/>
<outlet property="bookingRatingLabel" destination="cdG-Pk-htN" id="i0i-v8-AOO"/>
<outlet property="bookingSeparator" destination="9Lo-ZS-wGM" id="nLN-Tl-7PM"/>
<outlet property="bookingView" destination="jtP-sL-iqu" id="Z4E-5x-aI5"/>
<outlet property="directionArrow" destination="ExH-ug-j1j" id="3iY-1E-PNI"/>
<outlet property="directionButton" destination="X4O-iK-cA2" id="JA4-dy-K6g"/>
<outlet property="distanceLabel" destination="kGT-CI-UsC" id="xLt-R1-jy2"/>

View file

@ -71,12 +71,13 @@ extern NSString * const kAlohalyticsTapEventKey;
if ([itemId isEqualToString:@"Facebook"])
{
[Alohalytics logEvent:kAlohalyticsTapEventKey withValue:@"likeOnFb"];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"https://facebook.com/MapsWithMe"]];
[self openUrl:[NSURL URLWithString:@"https://facebook.com/MapsWithMe"]];
// [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"https://facebook.com/MapsWithMe"]];
}
else if ([itemId isEqualToString:@"Twitter"])
{
[Alohalytics logEvent:kAlohalyticsTapEventKey withValue:@"followOnTwitter"];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"https://twitter.com/MAPS_ME"]];
[self openUrl:[NSURL URLWithString:@"https://twitter.com/MAPS_ME"]];
}
else if ([itemId isEqualToString:@"Contact"])
{

View file

@ -0,0 +1,23 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "ic_booking_logo.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "ic_booking_logo@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "ic_booking_logo@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 412 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 728 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View file

@ -19,5 +19,8 @@
"info" : {
"version" : 1,
"author" : "xcode"
},
"properties" : {
"template-rendering-intent" : "original"
}
}

View file

@ -0,0 +1,26 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "ic_more.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "ic_more@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "ic_more@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
},
"properties" : {
"template-rendering-intent" : "template"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 119 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 176 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 232 B

View file

@ -0,0 +1,26 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "ic_route_to.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "ic_route_to@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "ic_route_to@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
},
"properties" : {
"template-rendering-intent" : "template"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 250 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 427 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 655 B

View file

@ -0,0 +1,26 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "ic_route_from.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "ic_route_from@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "ic_route_from@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
},
"properties" : {
"template-rendering-intent" : "template"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 257 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 430 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 651 B

View file

@ -396,7 +396,6 @@
6741A9941BF340DE002C974C /* MWMPortraitNavigationDashboard.xib in Resources */ = {isa = PBXBuildFile; fileRef = F6BD33771B62400E00F2CE18 /* MWMPortraitNavigationDashboard.xib */; };
6741A9951BF340DE002C974C /* MWMDownloaderDialogCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F64F4B6E1B46A5380081A24A /* MWMDownloaderDialogCell.xib */; };
6741A9961BF340DE002C974C /* MWMSearchTableViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 3485C0111B85C20E00F7712D /* MWMSearchTableViewController.xib */; };
6741A9971BF340DE002C974C /* MWMBookmarkDescriptionViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = F6ED13921B1EFA2F0095C6DE /* MWMBookmarkDescriptionViewController.xib */; };
6741A9981BF340DE002C974C /* resources-xhdpi_clear in Resources */ = {isa = PBXBuildFile; fileRef = 4A23D1591B8B4DD700D4EB6F /* resources-xhdpi_clear */; };
6741A9991BF340DE002C974C /* MWMAlertViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = F64F19831AB81A00006EAF7E /* MWMAlertViewController.xib */; };
6741A99A1BF340DE002C974C /* MWMBookmarkColorViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = F6588E321B15D73100EE1E58 /* MWMBookmarkColorViewController.xib */; };
@ -443,7 +442,6 @@
6741A9CE1BF340DE002C974C /* MWMSearchManager.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34CFFE8A1B7DE6FD009D0C9F /* MWMSearchManager.mm */; };
6741A9CF1BF340DE002C974C /* MWMLocationAlert.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6BBF2C51B4FFB72000CF8E2 /* MWMLocationAlert.mm */; };
6741A9D01BF340DE002C974C /* MWMPlacePage.mm in Sources */ = {isa = PBXBuildFile; fileRef = F66A8FAF1B09F268001B9C97 /* MWMPlacePage.mm */; };
6741A9D21BF340DE002C974C /* MWMBookmarkDescriptionViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6ED13901B1EF96B0095C6DE /* MWMBookmarkDescriptionViewController.mm */; };
6741A9D41BF340DE002C974C /* MWMAlertViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = F64F19821AB81A00006EAF7E /* MWMAlertViewController.mm */; };
6741A9D51BF340DE002C974C /* WebViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = FAFCB63513366E78001A5C59 /* WebViewController.mm */; };
6741A9D61BF340DE002C974C /* MWMPlacePageNavigationBar.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6FE2C0E1B03A006009814AA /* MWMPlacePageNavigationBar.mm */; };
@ -596,7 +594,7 @@
845C892E1C8981CE00940D7F /* HockeySDKResources.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 845C892B1C8981CE00940D7F /* HockeySDKResources.bundle */; };
845C892F1C8981CE00940D7F /* HockeySDKResources.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 845C892B1C8981CE00940D7F /* HockeySDKResources.bundle */; };
845C89311C89837900940D7F /* AssetsLibrary.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 845C89301C89837900940D7F /* AssetsLibrary.framework */; };
845C89351C8983F300940D7F /* CoreText.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 845C89321C8983F300940D7F /* CoreText.framework */; };
845C89351C8983F300940D7F /* CoreText.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 845C89321C8983F300940D7F /* CoreText.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
845C89361C8983F300940D7F /* libc++.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 845C89331C8983F300940D7F /* libc++.tbd */; };
845C89371C8983F300940D7F /* QuickLook.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 845C89341C8983F300940D7F /* QuickLook.framework */; };
974386DD19373EA400FD5659 /* ToastView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 974386DC19373EA400FD5659 /* ToastView.mm */; };
@ -681,6 +679,10 @@
F63774EA1B59376F00BCF54D /* MWMRoutingDisclaimerAlert.mm in Sources */ = {isa = PBXBuildFile; fileRef = F63774E91B59376F00BCF54D /* MWMRoutingDisclaimerAlert.mm */; };
F6381BF51CD12045004CA943 /* LocaleTranslator.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6381BF41CD12045004CA943 /* LocaleTranslator.mm */; };
F6381BF61CD12045004CA943 /* LocaleTranslator.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6381BF41CD12045004CA943 /* LocaleTranslator.mm */; };
F63988371CF70EFE00226B6B /* MWMActionBarButton.xib in Resources */ = {isa = PBXBuildFile; fileRef = F63988361CF70EFE00226B6B /* MWMActionBarButton.xib */; };
F63988381CF70EFE00226B6B /* MWMActionBarButton.xib in Resources */ = {isa = PBXBuildFile; fileRef = F63988361CF70EFE00226B6B /* MWMActionBarButton.xib */; };
F639883B1CF70FE500226B6B /* MWMActionBarButton.mm in Sources */ = {isa = PBXBuildFile; fileRef = F639883A1CF70FE500226B6B /* MWMActionBarButton.mm */; };
F639883C1CF70FE500226B6B /* MWMActionBarButton.mm in Sources */ = {isa = PBXBuildFile; fileRef = F639883A1CF70FE500226B6B /* MWMActionBarButton.mm */; };
F63BA3711BCD5B520044C504 /* MWMTTSLanguageViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = F63BA3701BCD5B520044C504 /* MWMTTSLanguageViewController.mm */; };
F64A37D01B9EE24C00180464 /* MWMRouteHelperPanelsDrawer.mm in Sources */ = {isa = PBXBuildFile; fileRef = F64A37CF1B9EE24C00180464 /* MWMRouteHelperPanelsDrawer.mm */; };
F64D9C9B1C8861BA0063FA30 /* MWMObjectsCategorySelectorController.mm in Sources */ = {isa = PBXBuildFile; fileRef = F653CE1B1C7361DA00A453F1 /* MWMObjectsCategorySelectorController.mm */; };
@ -714,6 +716,7 @@
F6588E2C1B15C26700EE1E58 /* MWMTextView.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6588E2B1B15C26700EE1E58 /* MWMTextView.mm */; };
F6588E2F1B15D2BC00EE1E58 /* MWMBookmarkColorViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6588E2E1B15D2BC00EE1E58 /* MWMBookmarkColorViewController.mm */; };
F6588E331B15D73100EE1E58 /* MWMBookmarkColorViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = F6588E321B15D73100EE1E58 /* MWMBookmarkColorViewController.xib */; };
F659FC6A1CF35C24000A06B1 /* SafariServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F659FC691CF35C24000A06B1 /* SafariServices.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
F6671C6B1BA2EFD500548008 /* libFlurry_7.1.0.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F6671C6A1BA2EFD500548008 /* libFlurry_7.1.0.a */; };
F668F6561BCD4507002D6FFC /* MWMTTSSettingsViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = F668F6551BCD4507002D6FFC /* MWMTTSSettingsViewController.mm */; };
F66A8FA81B09F052001B9C97 /* MWMiPhoneLandscapePlacePage.mm in Sources */ = {isa = PBXBuildFile; fileRef = F66A8FA71B09F052001B9C97 /* MWMiPhoneLandscapePlacePage.mm */; };
@ -791,8 +794,6 @@
F6ED13541B1643900095C6DE /* MWMDirectionView.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6ED13531B1643900095C6DE /* MWMDirectionView.mm */; };
F6ED13561B16439E0095C6DE /* MWMDirectionView.xib in Resources */ = {isa = PBXBuildFile; fileRef = F6ED13551B16439E0095C6DE /* MWMDirectionView.xib */; };
F6ED135B1B18AA930095C6DE /* MWMExtendedPlacePageView.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6ED135A1B18AA930095C6DE /* MWMExtendedPlacePageView.mm */; };
F6ED13911B1EF96B0095C6DE /* MWMBookmarkDescriptionViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6ED13901B1EF96B0095C6DE /* MWMBookmarkDescriptionViewController.mm */; };
F6ED13931B1EFA2F0095C6DE /* MWMBookmarkDescriptionViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = F6ED13921B1EFA2F0095C6DE /* MWMBookmarkDescriptionViewController.xib */; };
F6F533A31B3C248900C1940B /* UIColor+MapsMeColor.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6F533A21B3C248900C1940B /* UIColor+MapsMeColor.mm */; };
F6F6ACFC1C15C1010060FDD0 /* MWMRecentTrackSettingsController.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6C641AF1C15BBE6008FCAF3 /* MWMRecentTrackSettingsController.mm */; };
F6F722F81AE1572400DA3DA1 /* MWMiPhonePortraitPlacePage.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6F722F71AE1572400DA3DA1 /* MWMiPhonePortraitPlacePage.mm */; };
@ -1361,6 +1362,9 @@
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>"; };
F63988361CF70EFE00226B6B /* MWMActionBarButton.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMActionBarButton.xib; sourceTree = "<group>"; };
F63988391CF70FE500226B6B /* MWMActionBarButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMActionBarButton.h; sourceTree = "<group>"; };
F639883A1CF70FE500226B6B /* MWMActionBarButton.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMActionBarButton.mm; sourceTree = "<group>"; };
F63BA36F1BCD5B520044C504 /* MWMTTSLanguageViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMTTSLanguageViewController.h; sourceTree = "<group>"; };
F63BA3701BCD5B520044C504 /* MWMTTSLanguageViewController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMTTSLanguageViewController.mm; sourceTree = "<group>"; };
F63BA3721BCE6F770044C504 /* MWMRoutePoint.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = MWMRoutePoint.h; path = APIBar/MWMRoutePoint.h; sourceTree = "<group>"; };
@ -1406,6 +1410,7 @@
F6588E2D1B15D2BC00EE1E58 /* MWMBookmarkColorViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMBookmarkColorViewController.h; sourceTree = "<group>"; };
F6588E2E1B15D2BC00EE1E58 /* MWMBookmarkColorViewController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMBookmarkColorViewController.mm; sourceTree = "<group>"; };
F6588E321B15D73100EE1E58 /* MWMBookmarkColorViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMBookmarkColorViewController.xib; sourceTree = "<group>"; };
F659FC691CF35C24000A06B1 /* SafariServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SafariServices.framework; path = System/Library/Frameworks/SafariServices.framework; sourceTree = SDKROOT; };
F6671C6A1BA2EFD500548008 /* libFlurry_7.1.0.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libFlurry_7.1.0.a; path = Statistics/libFlurry_7.1.0.a; sourceTree = "<group>"; };
F668F6541BCD4507002D6FFC /* MWMTTSSettingsViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMTTSSettingsViewController.h; sourceTree = "<group>"; };
F668F6551BCD4507002D6FFC /* MWMTTSSettingsViewController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMTTSSettingsViewController.mm; sourceTree = "<group>"; };
@ -1503,9 +1508,6 @@
F6ED13551B16439E0095C6DE /* MWMDirectionView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMDirectionView.xib; sourceTree = "<group>"; };
F6ED13591B18AA930095C6DE /* MWMExtendedPlacePageView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMExtendedPlacePageView.h; sourceTree = "<group>"; };
F6ED135A1B18AA930095C6DE /* MWMExtendedPlacePageView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMExtendedPlacePageView.mm; sourceTree = "<group>"; };
F6ED138F1B1EF96B0095C6DE /* MWMBookmarkDescriptionViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMBookmarkDescriptionViewController.h; sourceTree = "<group>"; };
F6ED13901B1EF96B0095C6DE /* MWMBookmarkDescriptionViewController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMBookmarkDescriptionViewController.mm; sourceTree = "<group>"; };
F6ED13921B1EFA2F0095C6DE /* MWMBookmarkDescriptionViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMBookmarkDescriptionViewController.xib; sourceTree = "<group>"; };
F6EE7BC11B78A1AB00FF6500 /* FlurryWatch.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FlurryWatch.h; sourceTree = "<group>"; };
F6F533A11B3C248900C1940B /* UIColor+MapsMeColor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIColor+MapsMeColor.h"; sourceTree = "<group>"; };
F6F533A21B3C248900C1940B /* UIColor+MapsMeColor.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = "UIColor+MapsMeColor.mm"; sourceTree = "<group>"; };
@ -1620,6 +1622,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
F659FC6A1CF35C24000A06B1 /* SafariServices.framework in Frameworks */,
341F09841C20138100F18AC5 /* libpugixml.a in Frameworks */,
3411387D1C15AE73002E3B3E /* libeditor.a in Frameworks */,
34921F6B1BFA0CDC00737D6E /* MyTargetSDKCorp.framework in Frameworks */,
@ -1796,6 +1799,7 @@
29B97323FDCFA39411CA2CEA /* Frameworks */ = {
isa = PBXGroup;
children = (
F659FC691CF35C24000A06B1 /* SafariServices.framework */,
34A62D4C1C903533007FDCB7 /* Fabric.framework */,
34A62D4D1C903533007FDCB7 /* Crashlytics.framework */,
845C89321C8983F300940D7F /* CoreText.framework */,
@ -2924,6 +2928,9 @@
F6CB21631AEFC42800FB8963 /* PlacePageActionBar.xib */,
F6CB21661AEFC6AA00FB8963 /* MWMPlacePageActionBar.h */,
F6CB21671AEFC6AA00FB8963 /* MWMPlacePageActionBar.mm */,
F63988361CF70EFE00226B6B /* MWMActionBarButton.xib */,
F63988391CF70FE500226B6B /* MWMActionBarButton.h */,
F639883A1CF70FE500226B6B /* MWMActionBarButton.mm */,
);
name = ActionBar;
sourceTree = "<group>";
@ -2976,9 +2983,6 @@
F6ED13521B1643900095C6DE /* MWMDirectionView.h */,
F6ED13531B1643900095C6DE /* MWMDirectionView.mm */,
F6ED13551B16439E0095C6DE /* MWMDirectionView.xib */,
F6ED138F1B1EF96B0095C6DE /* MWMBookmarkDescriptionViewController.h */,
F6ED13901B1EF96B0095C6DE /* MWMBookmarkDescriptionViewController.mm */,
F6ED13921B1EFA2F0095C6DE /* MWMBookmarkDescriptionViewController.xib */,
);
name = PlacePage;
path = ../..;
@ -3326,6 +3330,7 @@
F6172FA51BBD5A3E0081D325 /* MWMiPadRoutePreview.xib in Resources */,
97A5967F19B9CD47007A963F /* copyright.html in Resources */,
34B82ADF1B84A4A000180497 /* MWMSearchCommonCell.xib in Resources */,
F63988371CF70EFE00226B6B /* MWMActionBarButton.xib in Resources */,
F6A750BB1BE8C7BA00981B41 /* MWMSearchHistoryMyPositionCell.xib in Resources */,
671182E31C7F0DD400CB8177 /* WorldCoasts_obsolete.mwm in Resources */,
4A7D89C51B2EBF3B00AC843E /* resources-6plus_dark in Resources */,
@ -3381,7 +3386,6 @@
F6BD337A1B62400E00F2CE18 /* MWMPortraitNavigationDashboard.xib in Resources */,
F64F4B6F1B46A5380081A24A /* MWMDownloaderDialogCell.xib in Resources */,
3485C0131B85C20E00F7712D /* MWMSearchTableViewController.xib in Resources */,
F6ED13931B1EFA2F0095C6DE /* MWMBookmarkDescriptionViewController.xib in Resources */,
4A23D15E1B8B4DD700D4EB6F /* resources-xhdpi_clear in Resources */,
F64F199A1AB81A00006EAF7E /* MWMAlertViewController.xib in Resources */,
F6588E331B15D73100EE1E58 /* MWMBookmarkColorViewController.xib in Resources */,
@ -3472,6 +3476,7 @@
F623DA6C1C9C2731006A3436 /* opening_hours_how_to_edit.html in Resources */,
6741A96E1BF340DE002C974C /* MWMRoutePreview.xib in Resources */,
6741A96F1BF340DE002C974C /* MWMSearchSuggestionCell.xib in Resources */,
F63988381CF70EFE00226B6B /* MWMActionBarButton.xib in Resources */,
9DA46A0B1C47E92100EF52BA /* resources-mdpi_legacy in Resources */,
347FD88C1C60B2CE002FB65E /* MWMOpeningHoursTimeSpanTableViewCell.xib in Resources */,
6741A9701BF340DE002C974C /* MWMiPadRoutePreview.xib in Resources */,
@ -3526,7 +3531,6 @@
6741A9951BF340DE002C974C /* MWMDownloaderDialogCell.xib in Resources */,
6741A9961BF340DE002C974C /* MWMSearchTableViewController.xib in Resources */,
F6BD1D241CA412E40047B8E8 /* MWMOsmAuthAlert.xib in Resources */,
6741A9971BF340DE002C974C /* MWMBookmarkDescriptionViewController.xib in Resources */,
6741A9981BF340DE002C974C /* resources-xhdpi_clear in Resources */,
347FD87E1C60B2CE002FB65E /* MWMOpeningHoursDeleteScheduleTableViewCell.xib in Resources */,
6741A9991BF340DE002C974C /* MWMAlertViewController.xib in Resources */,
@ -3643,7 +3647,6 @@
3492CC121C6DF00E0057D8E8 /* (null) in Sources */,
F6BBF2C61B4FFB72000CF8E2 /* MWMLocationAlert.mm in Sources */,
F66A8FB01B09F268001B9C97 /* MWMPlacePage.mm in Sources */,
F6ED13911B1EF96B0095C6DE /* MWMBookmarkDescriptionViewController.mm in Sources */,
F6FE3C381CC50FFD00A73196 /* MWMPlaceDoesntExistAlert.mm in Sources */,
F64F19991AB81A00006EAF7E /* MWMAlertViewController.mm in Sources */,
341223BB1BEB58FA007227E9 /* MWMBaseMapDownloaderViewController.mm in Sources */,
@ -3741,6 +3744,7 @@
F6A750B91BE8C74400981B41 /* MWMSearchHistoryMyPositionCell.mm in Sources */,
34CD81D01C92A884007D2A60 /* MWMPageControllerDataSource.mm in Sources */,
34ABA6201C2D517500FE1BEC /* MWMInputValidator.mm in Sources */,
F639883B1CF70FE500226B6B /* MWMActionBarButton.mm in Sources */,
978F9242183B660F000D6C7C /* SelectableCell.mm in Sources */,
34ABA6241C2D551900FE1BEC /* MWMInputValidatorFactory.mm in Sources */,
34B82AE21B84AC5E00180497 /* MWMSearchCategoriesManager.mm in Sources */,
@ -3861,7 +3865,6 @@
6741A9D01BF340DE002C974C /* MWMPlacePage.mm in Sources */,
3492CC131C6DF00F0057D8E8 /* (null) in Sources */,
34E0EECF1CC51B1D008E4919 /* MWMMapDownloaderButtonTableViewCell.mm in Sources */,
6741A9D21BF340DE002C974C /* MWMBookmarkDescriptionViewController.mm in Sources */,
3476B8CC1BFDCB6700874594 /* MWMTTSSettingsViewController.mm in Sources */,
6741A9D41BF340DE002C974C /* MWMAlertViewController.mm in Sources */,
F6FE3C391CC50FFD00A73196 /* MWMPlaceDoesntExistAlert.mm in Sources */,
@ -3961,6 +3964,7 @@
34CD81D11C92A884007D2A60 /* MWMPageControllerDataSource.mm in Sources */,
6741AA131BF340DE002C974C /* UIColor+MapsMeColor.mm in Sources */,
34ABA6251C2D551900FE1BEC /* MWMInputValidatorFactory.mm in Sources */,
F639883C1CF70FE500226B6B /* MWMActionBarButton.mm in Sources */,
34CE8A681C7740E100F4351A /* MWMStorage.mm in Sources */,
6741AA141BF340DE002C974C /* MWMMultilineLabel.mm in Sources */,
6741AA151BF340DE002C974C /* Statistics.mm in Sources */,

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10116" systemVersion="15E65" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="Wns-nH-AQU">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15E65" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="Wns-nH-AQU">
<dependencies>
<deployment version="2048" identifier="iOS"/>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
<capability name="Aspect ratio constraints" minToolsVersion="5.1"/>
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
@ -1339,7 +1339,7 @@
<action selector="localChangesAction:" destination="iZ6-Zi-bkZ" eventType="touchUpInside" id="4Gi-vX-ESJ"/>
</connections>
</button>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Changes: 4" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="6t0-ph-htV">
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Changes: 4" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" preferredMaxLayoutWidth="444" translatesAutoresizingMaskIntoConstraints="NO" id="6t0-ph-htV">
<rect key="frame" x="60" y="12" width="444" height="20"/>
<constraints>
<constraint firstAttribute="height" constant="20" id="hSb-1t-KUe"/>
@ -1385,7 +1385,7 @@
<userDefinedRuntimeAttribute type="string" keyPath="coloring" value="MWMBlue"/>
</userDefinedRuntimeAttributes>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Changes: 2036" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="AOM-R5-eiO">
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Changes: 2036" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" preferredMaxLayoutWidth="492" translatesAutoresizingMaskIntoConstraints="NO" id="AOM-R5-eiO">
<rect key="frame" x="60" y="14" width="492" height="20"/>
<constraints>
<constraint firstAttribute="height" constant="20" id="biE-B8-9Rd"/>
@ -1446,7 +1446,7 @@
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="S0n-BM-V4o" userLabel="Auth view">
<rect key="frame" x="16" y="96" width="568" height="249"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="tzz-yF-441">
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" preferredMaxLayoutWidth="568" translatesAutoresizingMaskIntoConstraints="NO" id="tzz-yF-441">
<rect key="frame" x="0.0" y="0.0" width="568" height="40"/>
<constraints>
<constraint firstAttribute="height" relation="greaterThanOrEqual" constant="20" id="sq5-AS-HML"/>
@ -1571,7 +1571,7 @@
<action selector="loginOSM" destination="iZ6-Zi-bkZ" eventType="touchUpInside" id="U8A-dL-xzX"/>
</connections>
</button>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Don't have OpenStreetMap account?" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="nhm-W1-U8A">
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Don't have OpenStreetMap account?" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" preferredMaxLayoutWidth="568" translatesAutoresizingMaskIntoConstraints="NO" id="nhm-W1-U8A">
<rect key="frame" x="0.0" y="180" width="568" height="17"/>
<constraints>
<constraint firstAttribute="height" relation="greaterThanOrEqual" constant="16" id="ntS-Lm-ZFB"/>
@ -2659,11 +2659,11 @@
<image name="separator_image" width="1" height="1"/>
</resources>
<inferredMetricsTieBreakers>
<segue reference="4ye-8o-cjF"/>
<segue reference="sMq-pa-AId"/>
<segue reference="4Cc-99-mlN"/>
<segue reference="Tkr-Ad-FQL"/>
<segue reference="7YC-t5-0WN"/>
<segue reference="OEF-kR-jKi"/>
<segue reference="Tkr-Ad-FQL"/>
<segue reference="0A8-4b-0A2"/>
<segue reference="4Cc-99-mlN"/>
<segue reference="nJf-7z-2TX"/>
<segue reference="Pet-Wq-d4a"/>
</inferredMetricsTieBreakers>
</document>

View file

@ -7,6 +7,8 @@
+ (UIColor *)menuBackground;
+ (UIColor *)downloadBadgeBackground;
+ (UIColor *)pressBackground;
+ (UIColor *)yellow;
+ (UIColor *)green;
+ (UIColor *)red;
+ (UIColor *)errorPink;
+ (UIColor *)orange;
@ -27,6 +29,7 @@
+ (UIColor *)buttonHighlightedBlueText;
+ (UIColor *)alertBackground;
+ (UIColor *)blackOpaque;
+ (UIColor *)bookingBackground;
+ (UIColor *)colorWithName:(NSString *)colorName;

View file

@ -152,6 +152,16 @@ UIColor * color(SEL cmd)
{
return color(_cmd);
}
// Yellow color (use for hotel's stars)
+ (UIColor *)yellow
{
return [UIColor colorWithRed:scaled(255.) green:scaled(200.) blue:scaled(40.) alpha:alpha100];
}
// Green color (use for booking rating)
+ (UIColor *)green
{
return [UIColor colorWithRed:scaled(85.) green:scaled(139.) blue:scaled(47.) alpha:alpha100];
}
// Pink background for invalid fields
+ (UIColor *)errorPink
{
@ -255,6 +265,11 @@ UIColor * color(SEL cmd)
return color(_cmd);
}
+ (UIColor *)bookingBackground
{
return [UIColor colorWithRed:scaled(25.) green:scaled(69.) blue:scaled(125.) alpha:alpha100];
}
+ (UIColor *)colorWithName:(NSString *)colorName
{
#pragma clang diagnostic push