forked from organicmaps/organicmaps-tmp
[ios] Safari controller.
This commit is contained in:
parent
2f9444912a
commit
cf348d6e71
23 changed files with 210 additions and 352 deletions
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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];
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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())]];
|
||||
}];
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -198,22 +198,29 @@ using namespace storage;
|
|||
self.externalTitleLabel.text = @"";
|
||||
}
|
||||
|
||||
auto const ranges = [entity.subtitle rangesOfString:@(place_page::Info::kSubtitleSeparator)];
|
||||
if (!ranges.empty())
|
||||
NSMutableAttributedString * str = [[NSMutableAttributedString alloc] initWithString:entity.subtitle];
|
||||
auto const separatorRanges = [entity.subtitle rangesOfString:@(place_page::Info::kSubtitleSeparator)];
|
||||
if (!separatorRanges.empty())
|
||||
{
|
||||
NSMutableAttributedString * str = [[NSMutableAttributedString alloc] initWithString:entity.subtitle];
|
||||
for (auto const & r : ranges)
|
||||
for (auto const & r : separatorRanges)
|
||||
[str addAttributes:@{NSForegroundColorAttributeName : [UIColor blackHintText]} range:r];
|
||||
|
||||
self.subtitleLabel.attributedText = str;
|
||||
}
|
||||
else
|
||||
|
||||
auto const starsRanges = [entity.subtitle rangesOfString:@(place_page::Info::kStarSymbol)];
|
||||
if (!starsRanges.empty())
|
||||
{
|
||||
self.subtitleLabel.text = entity.subtitle;
|
||||
for (auto const & r : starsRanges)
|
||||
[str addAttributes:@{NSForegroundColorAttributeName : [UIColor yellow]} range:r];
|
||||
}
|
||||
|
||||
self.subtitleLabel.attributedText = str;
|
||||
|
||||
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 +365,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 +393,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 +416,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 +467,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;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
#import "MWMViewController.h"
|
||||
|
||||
@class MWMPlacePageViewManager;
|
||||
|
||||
@interface MWMBookmarkDescriptionViewController : MWMViewController
|
||||
|
||||
- (instancetype)initWithPlacePageManager:(MWMPlacePageViewManager *)manager;
|
||||
|
||||
@property (weak, nonatomic) UINavigationController * iPadOwnerNavigationController;
|
||||
|
||||
@end
|
|
@ -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
|
|
@ -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>
|
|
@ -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";
|
||||
|
|
|
@ -45,6 +45,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 +55,7 @@ using MWMPlacePageCellTypeValueMap = map<MWMPlacePageCellType, string>;
|
|||
- (BOOL)isMyPosition;
|
||||
- (BOOL)isBookmark;
|
||||
- (BOOL)isApi;
|
||||
- (BOOL)isBooking;
|
||||
- (ms::LatLon)latlon;
|
||||
- (m2::PointD const &)mercator;
|
||||
- (NSString *)apiURL;
|
||||
|
|
|
@ -88,6 +88,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 +145,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:
|
||||
|
@ -199,6 +200,11 @@ void initFieldsMap()
|
|||
return m_info.HasApiUrl();
|
||||
}
|
||||
|
||||
- (BOOL)isBooking
|
||||
{
|
||||
return m_info.IsSponsoredHotel();
|
||||
}
|
||||
|
||||
- (ms::LatLon)latlon
|
||||
{
|
||||
return m_info.GetLatLon();
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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];
|
||||
|
|
|
@ -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"/>
|
||||
|
|
|
@ -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"])
|
||||
{
|
||||
|
|
|
@ -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 */; };
|
||||
|
@ -718,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 */; };
|
||||
|
@ -795,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 */; };
|
||||
|
@ -1413,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>"; };
|
||||
|
@ -1510,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>"; };
|
||||
|
@ -1627,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 */,
|
||||
|
@ -1803,6 +1799,7 @@
|
|||
29B97323FDCFA39411CA2CEA /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
F659FC691CF35C24000A06B1 /* SafariServices.framework */,
|
||||
34A62D4C1C903533007FDCB7 /* Fabric.framework */,
|
||||
34A62D4D1C903533007FDCB7 /* Crashlytics.framework */,
|
||||
845C89321C8983F300940D7F /* CoreText.framework */,
|
||||
|
@ -2986,9 +2983,6 @@
|
|||
F6ED13521B1643900095C6DE /* MWMDirectionView.h */,
|
||||
F6ED13531B1643900095C6DE /* MWMDirectionView.mm */,
|
||||
F6ED13551B16439E0095C6DE /* MWMDirectionView.xib */,
|
||||
F6ED138F1B1EF96B0095C6DE /* MWMBookmarkDescriptionViewController.h */,
|
||||
F6ED13901B1EF96B0095C6DE /* MWMBookmarkDescriptionViewController.mm */,
|
||||
F6ED13921B1EFA2F0095C6DE /* MWMBookmarkDescriptionViewController.xib */,
|
||||
);
|
||||
name = PlacePage;
|
||||
path = ../..;
|
||||
|
@ -3392,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 */,
|
||||
|
@ -3538,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 */,
|
||||
|
@ -3655,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 */,
|
||||
|
@ -3874,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 */,
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
+ (UIColor *)menuBackground;
|
||||
+ (UIColor *)downloadBadgeBackground;
|
||||
+ (UIColor *)pressBackground;
|
||||
+ (UIColor *)yellow;
|
||||
+ (UIColor *)green;
|
||||
+ (UIColor *)red;
|
||||
+ (UIColor *)errorPink;
|
||||
+ (UIColor *)orange;
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue