Merge pull request #3266 from VladiMihaylenko/place_page
[ios] New place page.
|
@ -1,11 +1,16 @@
|
|||
#import "MWMTableViewController.h"
|
||||
#include "Framework.h"
|
||||
|
||||
@class MWMPlacePageViewManager;
|
||||
@protocol MWMSelectSetDelegate <NSObject>
|
||||
|
||||
- (void)didSelectCategory:(NSString *)category withBac:(BookmarkAndCategory const &)bac;
|
||||
|
||||
@end
|
||||
|
||||
@interface SelectSetVC : MWMTableViewController
|
||||
|
||||
- (instancetype)initWithPlacePageManager:(MWMPlacePageViewManager *)manager;
|
||||
|
||||
@property (weak, nonatomic) UINavigationController * iPadOwnerNavigationController;
|
||||
- (instancetype)initWithCategory:(NSString *)category
|
||||
bac:(BookmarkAndCategory const &)bac
|
||||
delegate:(id<MWMSelectSetDelegate>)delegate;
|
||||
|
||||
@end
|
||||
|
|
|
@ -1,61 +1,42 @@
|
|||
#import "AddSetVC.h"
|
||||
#import "Common.h"
|
||||
#import "MWMPlacePageEntity.h"
|
||||
#import "MWMPlacePageViewManager.h"
|
||||
#import "SelectSetVC.h"
|
||||
#import "UIViewController+Navigation.h"
|
||||
|
||||
#include "Framework.h"
|
||||
|
||||
@interface SelectSetVC () <AddSetVCDelegate>
|
||||
{
|
||||
BookmarkAndCategory m_bac;
|
||||
}
|
||||
|
||||
@property (weak, nonatomic) MWMPlacePageViewManager * manager;
|
||||
@property (copy, nonatomic) NSString * category;
|
||||
@property (weak, nonatomic) id<MWMSelectSetDelegate> delegate;
|
||||
|
||||
@end
|
||||
|
||||
@implementation SelectSetVC
|
||||
|
||||
- (instancetype)initWithPlacePageManager:(MWMPlacePageViewManager *)manager
|
||||
- (instancetype)initWithCategory:(NSString *)category
|
||||
bac:(BookmarkAndCategory const &)bac
|
||||
delegate:(id<MWMSelectSetDelegate>)delegate
|
||||
{
|
||||
self = [super initWithStyle:UITableViewStyleGrouped];
|
||||
if (self)
|
||||
{
|
||||
self.manager = manager;
|
||||
self.title = L(@"bookmark_sets");
|
||||
_category = category;
|
||||
m_bac = bac;
|
||||
_delegate = delegate;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)viewWillAppear:(BOOL)animated
|
||||
- (void)viewDidLoad
|
||||
{
|
||||
[super viewWillAppear:animated];
|
||||
[self.iPadOwnerNavigationController setNavigationBarHidden:NO];
|
||||
if (self.iPadOwnerNavigationController)
|
||||
{
|
||||
[(UIViewController *)self showBackButton];
|
||||
[self.tableView reloadData];
|
||||
CGFloat const navBarHeight = self.navigationController.navigationBar.height;
|
||||
[UIView animateWithDuration:kDefaultAnimationDuration animations:^
|
||||
{
|
||||
[self.manager changeHeight:self.tableView.contentSize.height + navBarHeight];
|
||||
}];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)popViewController
|
||||
{
|
||||
[self.iPadOwnerNavigationController setNavigationBarHidden:YES];
|
||||
[self.navigationController popViewControllerAnimated:YES];
|
||||
}
|
||||
|
||||
- (void)backTap
|
||||
{
|
||||
[self popViewController];
|
||||
}
|
||||
|
||||
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
|
||||
{
|
||||
return YES;
|
||||
[super viewDidLoad];
|
||||
NSAssert(self.category, @"Category can't be nil!");
|
||||
NSAssert(self.delegate, @"Delegate can't be nil!");
|
||||
NSAssert(IsValid(m_bac), @"Invalid BookmarkAndCategory's instance!");
|
||||
self.title = L(@"bookmark_sets");
|
||||
}
|
||||
|
||||
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
|
||||
|
@ -86,9 +67,7 @@
|
|||
if (cat)
|
||||
cell.textLabel.text = @(cat->GetName().c_str());
|
||||
|
||||
BookmarkAndCategory const bac = self.manager.entity.bac;
|
||||
|
||||
if (bac.first == indexPath.row)
|
||||
if (m_bac.first == indexPath.row)
|
||||
cell.accessoryType = UITableViewCellAccessoryCheckmark;
|
||||
else
|
||||
cell.accessoryType = UITableViewCellAccessoryNone;
|
||||
|
@ -99,21 +78,19 @@
|
|||
- (void)addSetVC:(AddSetVC *)vc didAddSetWithIndex:(int)setIndex
|
||||
{
|
||||
[self moveBookmarkToSetWithIndex:setIndex];
|
||||
|
||||
[self.tableView reloadData];
|
||||
[self.manager reloadBookmark];
|
||||
[self.delegate didSelectCategory:self.category withBac:m_bac];
|
||||
}
|
||||
|
||||
- (void)moveBookmarkToSetWithIndex:(int)setIndex
|
||||
{
|
||||
MWMPlacePageEntity * entity = self.manager.entity;
|
||||
BookmarkAndCategory bac;
|
||||
bac.second = static_cast<int>(GetFramework().MoveBookmark(entity.bac.second, entity.bac.first, setIndex));
|
||||
bac.second = static_cast<int>(GetFramework().MoveBookmark(m_bac.second, m_bac.first, setIndex));
|
||||
bac.first = setIndex;
|
||||
entity.bac = bac;
|
||||
m_bac = bac;
|
||||
|
||||
BookmarkCategory const * category = GetFramework().GetBookmarkManager().GetBmCategory(bac.first);
|
||||
entity.bookmarkCategory = @(category->GetName().c_str());
|
||||
self.category = @(category->GetName().c_str());
|
||||
}
|
||||
|
||||
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
|
@ -123,15 +100,13 @@
|
|||
{
|
||||
AddSetVC * asVC = [[AddSetVC alloc] init];
|
||||
asVC.delegate = self;
|
||||
if (IPAD)
|
||||
asVC.preferredContentSize = self.preferredContentSize;
|
||||
[self.navigationController pushViewController:asVC animated:YES];
|
||||
}
|
||||
else
|
||||
{
|
||||
[self moveBookmarkToSetWithIndex:static_cast<int>(indexPath.row)];
|
||||
[self.manager reloadBookmark];
|
||||
[self popViewController];
|
||||
[self.delegate didSelectCategory:self.category withBac:m_bac];
|
||||
[self backTap];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
#include "indexer/osm_editor.hpp"
|
||||
|
||||
#include <array>
|
||||
#include "std/array.hpp"
|
||||
|
||||
namespace
|
||||
{
|
||||
|
|
|
@ -6,12 +6,14 @@
|
|||
- (BOOL)isPlaceholder;
|
||||
- (BOOL)isEditor;
|
||||
- (BOOL)openingHoursCellExpanded;
|
||||
- (void)setOpeningHoursCellExpanded:(BOOL)openingHoursCellExpanded forCell:(UITableViewCell *)cell;
|
||||
- (void)setOpeningHoursCellExpanded:(BOOL)openingHoursCellExpanded;
|
||||
|
||||
@end
|
||||
|
||||
@interface MWMPlacePageOpeningHoursCell : MWMTableViewCell
|
||||
|
||||
@property (nonatomic, readonly) BOOL isClosed;
|
||||
|
||||
- (void)configWithDelegate:(id<MWMPlacePageOpeningHoursCellProtocol>)delegate
|
||||
info:(NSString *)info;
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ using WeekDayView = MWMPlacePageOpeningHoursDayView *;
|
|||
|
||||
@property (weak, nonatomic) id<MWMPlacePageOpeningHoursCellProtocol> delegate;
|
||||
|
||||
@property (nonatomic) BOOL isClosed;
|
||||
@property (nonatomic, readwrite) BOOL isClosed;
|
||||
@property (nonatomic) BOOL haveExpandSchedule;
|
||||
|
||||
@end
|
||||
|
@ -238,7 +238,7 @@ WeekDayView getWeekDayView()
|
|||
|
||||
- (IBAction)toggleButtonTap
|
||||
{
|
||||
[self.delegate setOpeningHoursCellExpanded:!self.delegate.openingHoursCellExpanded forCell:self];
|
||||
[self.delegate setOpeningHoursCellExpanded:!self.delegate.openingHoursCellExpanded];
|
||||
|
||||
// Workaround for slow devices.
|
||||
// Major QA can tap multiple times before first segue call is performed.
|
||||
|
|
|
@ -367,6 +367,8 @@ extern NSString * const kTTSStatusWasChangedNotification;
|
|||
case routing::RouterType::Vehicle:
|
||||
self.activeRouteTypeButton = self.routePreview.vehicleProgress;
|
||||
break;
|
||||
case routing::RouterType::Bicycle:
|
||||
break;
|
||||
}
|
||||
[self.routePreview selectProgress:self.activeRouteTypeButton];
|
||||
}
|
||||
|
|
13
iphone/Maps/Classes/Editor/MWMButtonCell.h
Normal file
|
@ -0,0 +1,13 @@
|
|||
#import "MWMTableViewCell.h"
|
||||
|
||||
@protocol MWMButtonCellDelegate <NSObject>
|
||||
|
||||
- (void)cellSelect:(UITableViewCell *)cell;
|
||||
|
||||
@end
|
||||
|
||||
@interface MWMButtonCell : MWMTableViewCell
|
||||
|
||||
- (void)configureWithDelegate:(id<MWMButtonCellDelegate>)delegate title:(NSString *)title;
|
||||
|
||||
@end
|
|
@ -1,15 +1,15 @@
|
|||
#import "MWMNoteButtonCell.h"
|
||||
#import "MWMButtonCell.h"
|
||||
|
||||
@interface MWMNoteButtonCell ()
|
||||
@interface MWMButtonCell ()
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UIButton * button;
|
||||
@property (weak, nonatomic) id<MWMEditorCellProtocol> delegate;
|
||||
@property (weak, nonatomic) id<MWMButtonCellDelegate> delegate;
|
||||
|
||||
@end
|
||||
|
||||
@implementation MWMNoteButtonCell
|
||||
@implementation MWMButtonCell
|
||||
|
||||
- (void)configureWithDelegate:(id<MWMEditorCellProtocol>)delegate title:(NSString *)title
|
||||
- (void)configureWithDelegate:(id<MWMButtonCellDelegate>)delegate title:(NSString *)title
|
||||
{
|
||||
[self.button setTitle:title forState:UIControlStateNormal];
|
||||
self.delegate = delegate;
|
|
@ -1,5 +1,5 @@
|
|||
<?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" useTraitCollections="YES">
|
||||
<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"/>
|
||||
|
@ -7,7 +7,7 @@
|
|||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" id="KGk-i7-Jjw" customClass="MWMNoteButtonCell">
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" id="KGk-i7-Jjw" customClass="MWMButtonCell">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
|
|
@ -13,7 +13,7 @@
|
|||
#import "MWMNoteCell.h"
|
||||
#import "MWMObjectsCategorySelectorController.h"
|
||||
#import "MWMOpeningHoursEditorViewController.h"
|
||||
#import "MWMNoteButtonCell.h"
|
||||
#import "MWMButtonCell.h"
|
||||
#import "MWMPlacePageEntity.h"
|
||||
#import "MWMPlacePageOpeningHoursCell.h"
|
||||
#import "MWMStreetEditorViewController.h"
|
||||
|
@ -66,7 +66,7 @@ MWMPlacePageCellTypeValueMap const kCellType2ReuseIdentifier{
|
|||
{MWMPlacePageCellTypeCuisine, "MWMEditorSelectTableViewCell"},
|
||||
{MWMPlacePageCellTypeWiFi, "MWMEditorSwitchTableViewCell"},
|
||||
{MWMPlacePageCellTypeNote, "MWMNoteCell"},
|
||||
{MWMPlacePageCellTypeReportButton, "MWMNoteButtonCell"}};
|
||||
{MWMPlacePageCellTypeReportButton, "MWMButtonCell"}};
|
||||
|
||||
NSString * reuseIdentifier(MWMPlacePageCellType cellType)
|
||||
{
|
||||
|
@ -135,7 +135,7 @@ void registerCellsForTableView(vector<MWMPlacePageCellType> const & cells, UITab
|
|||
MWMPlacePageOpeningHoursCellProtocol,
|
||||
MWMEditorCellProtocol, MWMCuisineEditorProtocol,
|
||||
MWMStreetEditorProtocol, MWMObjectsCategorySelectorDelegate,
|
||||
MWMNoteCelLDelegate>
|
||||
MWMNoteCelLDelegate, MWMButtonCellDelegate>
|
||||
|
||||
@property (nonatomic) NSMutableDictionary<NSString *, UITableViewCell *> * offscreenCells;
|
||||
@property (nonatomic) NSMutableArray<NSIndexPath *> * invalidCells;
|
||||
|
@ -501,12 +501,13 @@ void registerCellsForTableView(vector<MWMPlacePageCellType> const & cells, UITab
|
|||
case MWMPlacePageCellTypeNote:
|
||||
{
|
||||
MWMNoteCell * tCell = static_cast<MWMNoteCell *>(cell);
|
||||
[tCell configWithDelegate:self noteText:self.note];
|
||||
[tCell configWithDelegate:self noteText:self.note
|
||||
placeholder:L(@"editor_detailed_description_hint")];
|
||||
break;
|
||||
}
|
||||
case MWMPlacePageCellTypeReportButton:
|
||||
{
|
||||
MWMNoteButtonCell * tCell = static_cast<MWMNoteButtonCell *>(cell);
|
||||
MWMButtonCell * tCell = static_cast<MWMButtonCell *>(cell);
|
||||
|
||||
auto title = ^ NSString * (osm::Editor::FeatureStatus s, BOOL isUploaded)
|
||||
{
|
||||
|
@ -673,7 +674,7 @@ void registerCellsForTableView(vector<MWMPlacePageCellType> const & cells, UITab
|
|||
return YES;
|
||||
}
|
||||
|
||||
- (void)setOpeningHoursCellExpanded:(BOOL)openingHoursCellExpanded forCell:(UITableViewCell *)cell
|
||||
- (void)setOpeningHoursCellExpanded:(BOOL)openingHoursCellExpanded
|
||||
{
|
||||
[self performSegueWithIdentifier:kOpeningHoursEditorSegue sender:nil];
|
||||
}
|
||||
|
@ -763,6 +764,8 @@ void registerCellsForTableView(vector<MWMPlacePageCellType> const & cells, UITab
|
|||
}
|
||||
}
|
||||
|
||||
#pragma mark - MWMEditorCellProtocol && MWMButtonCellDelegate
|
||||
|
||||
- (void)cellSelect:(UITableViewCell *)cell
|
||||
{
|
||||
NSIndexPath * indexPath = [self.tableView indexPathForCell:cell];
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
#import "MWMEditorCommon.h"
|
||||
#import "MWMTableViewCell.h"
|
||||
|
||||
@interface MWMNoteButtonCell : MWMTableViewCell
|
||||
|
||||
- (void)configureWithDelegate:(id<MWMEditorCellProtocol>)delegate title:(NSString *)title;
|
||||
|
||||
@end
|
|
@ -11,7 +11,12 @@
|
|||
|
||||
@interface MWMNoteCell : MWMTableViewCell
|
||||
|
||||
- (void)configWithDelegate:(id<MWMNoteCelLDelegate>)delegate noteText:(NSString *)text;
|
||||
- (void)configWithDelegate:(id<MWMNoteCelLDelegate>)delegate noteText:(NSString *)text
|
||||
placeholder:(NSString *)placeholder;
|
||||
- (CGFloat)cellHeight;
|
||||
- (void)updateTextViewForHeight:(CGFloat)height;
|
||||
- (UITextView *)textView;
|
||||
+ (CGFloat)minimalHeight;
|
||||
- (void)registerObserver;
|
||||
|
||||
@end
|
||||
|
|
|
@ -1,15 +1,17 @@
|
|||
#import "MWMTextView.h"
|
||||
#import "MWMNoteCell.h"
|
||||
|
||||
namespace
|
||||
{
|
||||
CGFloat const kMinimalTextViewHeight = 104.;
|
||||
CGFloat const kTopTextViewOffset = 12.;
|
||||
NSString * const kTextViewContentSizeKeyPath = @"contentSize";
|
||||
} // namespace
|
||||
CGFloat const kTopTextViewOffset = 12.;
|
||||
NSString * const kTextViewContentSizeKeyPath = @"contentSize";
|
||||
CGFloat const kMinimalTextViewHeight = 104.;
|
||||
|
||||
} // namespace
|
||||
|
||||
@interface MWMNoteCell () <UITextViewDelegate>
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UITextView * textView;
|
||||
@property (weak, nonatomic) IBOutlet MWMTextView * textView;
|
||||
@property (weak, nonatomic) IBOutlet NSLayoutConstraint * textViewHeight;
|
||||
@property (weak, nonatomic) id<MWMNoteCelLDelegate> delegate;
|
||||
|
||||
|
@ -20,9 +22,31 @@ static void * kContext = &kContext;
|
|||
@implementation MWMNoteCell
|
||||
|
||||
- (void)configWithDelegate:(id<MWMNoteCelLDelegate>)delegate noteText:(NSString *)text
|
||||
placeholder:(NSString *)placeholder
|
||||
{
|
||||
self.delegate = delegate;
|
||||
self.textView.text = text;
|
||||
static_cast<MWMTextView *>(self.textView).placeholder = placeholder;
|
||||
}
|
||||
|
||||
- (void)updateTextViewForHeight:(CGFloat)height
|
||||
{
|
||||
if (height > kMinimalTextViewHeight)
|
||||
{
|
||||
self.textViewHeight.constant = height;
|
||||
[self.delegate cellShouldChangeSize:self text:self.textView.text];
|
||||
}
|
||||
else
|
||||
{
|
||||
CGFloat const currentHeight = self.textViewHeight.constant;
|
||||
if (currentHeight > kMinimalTextViewHeight)
|
||||
{
|
||||
self.textViewHeight.constant = kMinimalTextViewHeight;
|
||||
[self.delegate cellShouldChangeSize:self text:self.textView.text];
|
||||
}
|
||||
}
|
||||
|
||||
[self setNeedsLayout];
|
||||
}
|
||||
|
||||
- (void)observeValueForKeyPath:(NSString *)keyPath
|
||||
|
@ -34,25 +58,7 @@ static void * kContext = &kContext;
|
|||
{
|
||||
NSValue * s = change[@"new"];
|
||||
CGFloat const height = s.CGSizeValue.height;
|
||||
|
||||
if (height > kMinimalTextViewHeight)
|
||||
{
|
||||
self.textViewHeight.constant = height;
|
||||
[self.delegate cellShouldChangeSize:self text:self.textView.text];
|
||||
}
|
||||
else
|
||||
{
|
||||
CGFloat const currentHeight = self.textViewHeight.constant;
|
||||
if (currentHeight > kMinimalTextViewHeight)
|
||||
{
|
||||
self.textViewHeight.constant = kMinimalTextViewHeight;
|
||||
[self.delegate cellShouldChangeSize:self text:self.textView.text];
|
||||
}
|
||||
}
|
||||
|
||||
[self setNeedsLayout];
|
||||
[self layoutIfNeeded];
|
||||
|
||||
[self updateTextViewForHeight:height];
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -64,6 +70,11 @@ static void * kContext = &kContext;
|
|||
return self.textViewHeight.constant + 2 * kTopTextViewOffset;
|
||||
}
|
||||
|
||||
+ (CGFloat)minimalHeight
|
||||
{
|
||||
return kMinimalTextViewHeight;
|
||||
}
|
||||
|
||||
- (void)textViewDidEndEditing:(UITextView *)textView
|
||||
{
|
||||
[self.delegate cell:self didFinishEditingWithText:textView.text];
|
||||
|
|
|
@ -23,7 +23,6 @@
|
|||
<fontDescription key="fontDescription" type="system" pointSize="14"/>
|
||||
<textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="localizedPlaceholder" value="editor_detailed_description_hint"/>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="backgroundColorName" value="white"/>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="colorName" value="blackPrimaryText"/>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="fontName" value="regular17"/>
|
||||
|
|
|
@ -3,13 +3,17 @@
|
|||
@interface MWMBasePlacePageView : SolidTouchView
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UILabel * titleLabel;
|
||||
@property (weak, nonatomic) IBOutlet UILabel * typeLabel;
|
||||
@property (weak, nonatomic) IBOutlet UIView * downloadProgressView;
|
||||
@property (weak, nonatomic) IBOutlet UILabel * externalTitleLabel;
|
||||
@property (weak, nonatomic) IBOutlet UILabel * subtitleLabel;
|
||||
@property (weak, nonatomic) IBOutlet UILabel * placeScheduleLabel;
|
||||
@property (weak, nonatomic) IBOutlet UILabel * addressLabel;
|
||||
@property (weak, nonatomic) IBOutlet UILabel * distanceLabel;
|
||||
@property (weak, nonatomic) IBOutlet UIImageView * directionArrow;
|
||||
@property (weak, nonatomic) IBOutlet UITableView * featureTable;
|
||||
@property (weak, nonatomic) IBOutlet UIView * separatorView;
|
||||
@property (weak, nonatomic) IBOutlet UIButton * directionButton;
|
||||
@property (weak, nonatomic) IBOutlet UIView * ppPreview;
|
||||
|
||||
- (void)configureWithEntity:(MWMPlacePageEntity *)entity;
|
||||
- (void)addBookmark;
|
||||
|
|
|
@ -15,16 +15,22 @@
|
|||
|
||||
#include "map/place_page_info.hpp"
|
||||
|
||||
extern CGFloat const kBottomPlacePageOffset = 15.;
|
||||
extern CGFloat const kLabelsBetweenOffset = 8.;
|
||||
#include "3party/opening_hours/opening_hours.hpp"
|
||||
#include "editor/opening_hours_ui.hpp"
|
||||
#include "editor/ui2oh.hpp"
|
||||
|
||||
namespace
|
||||
{
|
||||
CGFloat const kDownloadProgressViewLeftOffset = 12.;
|
||||
CGFloat const kDownloadProgressViewTopOffset = 10.;
|
||||
CGFloat const kLabelsBetweenMainOffset = 8.;
|
||||
CGFloat const kLabelsBetweenSmallOffset = 4.;
|
||||
CGFloat const kBottomPlacePageOffset = 16.;
|
||||
CGFloat const kLeftOffset = 16.;
|
||||
CGFloat const kDefaultHeaderHeight = 16.;
|
||||
CGFloat const kLabelsPadding = kLeftOffset * 2;
|
||||
CGFloat const kDirectionArrowSide = 20.;
|
||||
CGFloat const kOffsetFromTitleToDistance = 8.;
|
||||
CGFloat const kOffsetFromLabelsToDistance = 8.;
|
||||
CGFloat const kOffsetFromDistanceToArrow = 5.;
|
||||
CGFloat const kMaximumWidth = 360.;
|
||||
|
||||
|
@ -89,30 +95,29 @@ CGFloat placePageWidth()
|
|||
enum class AttributePosition
|
||||
{
|
||||
Title,
|
||||
Type,
|
||||
ExternalTitle,
|
||||
Subtitle,
|
||||
Schedule,
|
||||
Address
|
||||
};
|
||||
} // namespace
|
||||
|
||||
@interface MWMBasePlacePageView () <MWMPlacePageOpeningHoursCellProtocol>
|
||||
@interface MWMBasePlacePageView () <UITableViewDelegate, UITableViewDataSource,
|
||||
MWMPlacePageOpeningHoursCellProtocol, MWMPlacePageBookmarkDelegate>
|
||||
{
|
||||
vector<PlacePageSection> m_sections;
|
||||
map<PlacePageSection, vector<MWMPlacePageCellType>> m_cells;
|
||||
map<MWMPlacePageCellType, UITableViewCell *> m_offscreenCells;
|
||||
}
|
||||
|
||||
@property (weak, nonatomic) MWMPlacePageEntity * entity;
|
||||
@property (weak, nonatomic) IBOutlet MWMPlacePage * ownerPlacePage;
|
||||
@property (weak, nonatomic) IBOutlet UIView * ppPreview;
|
||||
|
||||
@property (nonatomic) NSMutableDictionary<NSString *, UITableViewCell *> * offscreenCells;
|
||||
|
||||
@property (nonatomic, readwrite) BOOL openingHoursCellExpanded;
|
||||
@property (nonatomic) BOOL isBookmarkCellExpanded;
|
||||
|
||||
@end
|
||||
|
||||
@interface MWMBasePlacePageView (UITableView) <UITableViewDelegate, UITableViewDataSource>
|
||||
@end
|
||||
|
||||
@implementation MWMBasePlacePageView
|
||||
|
||||
- (void)awakeFromNib
|
||||
|
@ -121,18 +126,21 @@ enum class AttributePosition
|
|||
self.featureTable.delegate = self;
|
||||
self.featureTable.dataSource = self;
|
||||
self.featureTable.separatorColor = [UIColor blackDividers];
|
||||
|
||||
for (auto const & type : kCellType2ReuseIdentifier)
|
||||
{
|
||||
NSString * identifier = @(type.second.c_str());
|
||||
[self.featureTable registerNib:[UINib nibWithNibName:identifier bundle:nil]
|
||||
forCellReuseIdentifier:identifier];
|
||||
}
|
||||
|
||||
self.directionArrow.autoresizingMask = UIViewAutoresizingNone;
|
||||
}
|
||||
|
||||
- (void)configureWithEntity:(MWMPlacePageEntity *)entity
|
||||
{
|
||||
self.entity = entity;
|
||||
self.isBookmarkCellExpanded = NO;
|
||||
[self configTable];
|
||||
[self configure];
|
||||
}
|
||||
|
@ -141,6 +149,7 @@ enum class AttributePosition
|
|||
{
|
||||
m_sections.clear();
|
||||
m_cells.clear();
|
||||
m_offscreenCells.clear();
|
||||
for (auto const cellSection : kCellTypesSectionMap)
|
||||
{
|
||||
for (auto const cellType : cellSection.first)
|
||||
|
@ -159,27 +168,44 @@ enum class AttributePosition
|
|||
- (void)configure
|
||||
{
|
||||
MWMPlacePageEntity * entity = self.entity;
|
||||
|
||||
// TODO(Iliya): We need to determine that mwm was already uploaded (not only that we can download mwm).
|
||||
// Probably we should determine it in MWMPlacePageEntity, but I'm not sure about core interface.
|
||||
// I typed some placeholder in MWMPlacePageEntity class. Please look and use it or implement smth better.
|
||||
self.downloadProgressView.hidden = YES;
|
||||
// TODO(Vlad): We need to display external name not only for bookmarks but the same in case when we have localized and default place name.
|
||||
// Probably we need to move bookmark naming logic in core.
|
||||
if (entity.isBookmark)
|
||||
{
|
||||
self.titleLabel.text = entity.bookmarkTitle.length > 0 ? entity.bookmarkTitle : entity.title;
|
||||
self.typeLabel.text = entity.bookmarkCategory;
|
||||
if (![entity.bookmarkTitle isEqualToString:entity.title] && entity.bookmarkTitle.length > 0)
|
||||
{
|
||||
self.titleLabel.text = entity.bookmarkTitle;
|
||||
self.externalTitleLabel.text = entity.title;
|
||||
}
|
||||
else
|
||||
{
|
||||
self.titleLabel.text = entity.title;
|
||||
self.externalTitleLabel.text = @"";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
self.titleLabel.text = entity.title;
|
||||
auto const ranges = [entity.category rangesOfString:@(place_page::Info::kSubtitleSeparator)];
|
||||
if (!ranges.empty())
|
||||
{
|
||||
NSMutableAttributedString * str = [[NSMutableAttributedString alloc] initWithString:entity.category];
|
||||
for (auto const & r : ranges)
|
||||
[str addAttributes:@{NSForegroundColorAttributeName : [UIColor blackHintText]} range:r];
|
||||
self.externalTitleLabel.text = @"";
|
||||
}
|
||||
|
||||
self.typeLabel.attributedText = str;
|
||||
}
|
||||
else
|
||||
{
|
||||
self.typeLabel.text = entity.category;
|
||||
}
|
||||
auto const ranges = [entity.subtitle rangesOfString:@(place_page::Info::kSubtitleSeparator)];
|
||||
if (!ranges.empty())
|
||||
{
|
||||
NSMutableAttributedString * str = [[NSMutableAttributedString alloc] initWithString:entity.subtitle];
|
||||
for (auto const & r : ranges)
|
||||
[str addAttributes:@{NSForegroundColorAttributeName : [UIColor blackHintText]} range:r];
|
||||
|
||||
self.subtitleLabel.attributedText = str;
|
||||
}
|
||||
else
|
||||
{
|
||||
self.subtitleLabel.text = entity.subtitle;
|
||||
}
|
||||
|
||||
BOOL const isMyPosition = entity.isMyPosition;
|
||||
|
@ -192,50 +218,87 @@ enum class AttributePosition
|
|||
self.directionButton.hidden = hideDirection;
|
||||
|
||||
[self.featureTable reloadData];
|
||||
[self configureCurrentShedule];
|
||||
[self setNeedsLayout];
|
||||
[self layoutIfNeeded];
|
||||
}
|
||||
|
||||
- (void)configureCurrentShedule
|
||||
{
|
||||
MWMPlacePageOpeningHoursCell * cell =
|
||||
static_cast<MWMPlacePageOpeningHoursCell *>(m_offscreenCells[MWMPlacePageCellTypeOpenHours]);
|
||||
if (cell)
|
||||
{
|
||||
self.placeScheduleLabel.text = cell.isClosed ? L(@"closed_now") : L(@"editor_time_open");
|
||||
self.placeScheduleLabel.textColor = cell.isClosed ? [UIColor red] : [UIColor blackSecondaryText];
|
||||
}
|
||||
else
|
||||
{
|
||||
self.placeScheduleLabel.text = @"";
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - Layout
|
||||
|
||||
- (AttributePosition)distanceAttributePosition
|
||||
{
|
||||
if (self.typeLabel.text.length)
|
||||
return AttributePosition::Type;
|
||||
else if (!self.typeLabel.text.length && self.addressLabel.text.length)
|
||||
if (self.addressLabel.text.length)
|
||||
return AttributePosition::Address;
|
||||
else if (!self.addressLabel.text.length && self.placeScheduleLabel.text.length)
|
||||
return AttributePosition::Schedule;
|
||||
else if (!self.placeScheduleLabel.text.length && self.subtitleLabel.text.length)
|
||||
return AttributePosition::Subtitle;
|
||||
else if (self.externalTitleLabel.text.length)
|
||||
return AttributePosition::ExternalTitle;
|
||||
else
|
||||
return AttributePosition::Title;
|
||||
}
|
||||
|
||||
- (void)setupLabelsWidthWithBoundedWidth:(CGFloat)bound distancePosition:(AttributePosition)position
|
||||
{
|
||||
CGFloat const labelsMaxWidth = placePageWidth() - kLabelsPadding;
|
||||
auto const defaultMaxWidth = placePageWidth() - kLabelsPadding;
|
||||
CGFloat const labelsMaxWidth = self.downloadProgressView.hidden ? defaultMaxWidth :
|
||||
defaultMaxWidth - 2 * kDownloadProgressViewLeftOffset - self.downloadProgressView.width;
|
||||
switch (position)
|
||||
{
|
||||
case AttributePosition::Title:
|
||||
self.titleLabel.width = labelsMaxWidth - bound;
|
||||
self.typeLabel.width = self.addressLabel.width = 0;
|
||||
self.subtitleLabel.width = self.addressLabel.width = self.externalTitleLabel.width = self.placeScheduleLabel.width = 0;
|
||||
break;
|
||||
case AttributePosition::Type:
|
||||
if (self.addressLabel.text.length > 0)
|
||||
{
|
||||
self.titleLabel.width = self.addressLabel.width = labelsMaxWidth;
|
||||
self.typeLabel.width = labelsMaxWidth - bound;
|
||||
}
|
||||
else
|
||||
{
|
||||
self.titleLabel.width = labelsMaxWidth;
|
||||
self.typeLabel.width = labelsMaxWidth - bound;
|
||||
self.addressLabel.width = 0;
|
||||
}
|
||||
case AttributePosition::ExternalTitle:
|
||||
self.addressLabel.width = self.subtitleLabel.width = self.placeScheduleLabel.width = 0;
|
||||
self.externalTitleLabel.width = labelsMaxWidth - bound;
|
||||
self.titleLabel.width = self.titleLabel.text.length > 0 ? labelsMaxWidth : 0;
|
||||
break;
|
||||
case AttributePosition::Subtitle:
|
||||
self.addressLabel.width = self.placeScheduleLabel.width = 0;
|
||||
self.titleLabel.width = self.titleLabel.text.length > 0 ? labelsMaxWidth : 0;
|
||||
self.externalTitleLabel.width = self.externalTitleLabel.text.length > 0 ? labelsMaxWidth : 0;
|
||||
self.subtitleLabel.width = labelsMaxWidth - bound;
|
||||
break;
|
||||
case AttributePosition::Schedule:
|
||||
self.addressLabel.width = 0;
|
||||
self.titleLabel.width = self.titleLabel.text.length > 0 ? labelsMaxWidth : 0;
|
||||
self.externalTitleLabel.width = self.externalTitleLabel.text.length > 0 ? labelsMaxWidth : 0;
|
||||
self.subtitleLabel.width = self.subtitleLabel.text.length > 0 ? labelsMaxWidth : 0;
|
||||
self.placeScheduleLabel.width = labelsMaxWidth - bound;
|
||||
break;
|
||||
case AttributePosition::Address:
|
||||
self.titleLabel.width = labelsMaxWidth;
|
||||
self.typeLabel.width = 0;
|
||||
self.titleLabel.width = self.titleLabel.text.length > 0 ? labelsMaxWidth : 0;
|
||||
self.subtitleLabel.width = self.subtitleLabel.text.length > 0 ? labelsMaxWidth : 0;
|
||||
self.externalTitleLabel.width = self.externalTitleLabel.text.length > 0 ? labelsMaxWidth : 0;
|
||||
self.placeScheduleLabel.width = self.placeScheduleLabel.text.length > 0 ? labelsMaxWidth : 0;
|
||||
self.addressLabel.width = labelsMaxWidth - bound;
|
||||
break;
|
||||
}
|
||||
|
||||
self.externalTitleLabel.width = self.entity.isBookmark ? labelsMaxWidth : 0;
|
||||
|
||||
[self.titleLabel sizeToFit];
|
||||
[self.subtitleLabel sizeToFit];
|
||||
[self.addressLabel sizeToFit];
|
||||
[self.externalTitleLabel sizeToFit];
|
||||
[self.placeScheduleLabel sizeToFit];
|
||||
}
|
||||
|
||||
- (void)setDistance:(NSString *)distance
|
||||
|
@ -249,27 +312,33 @@ enum class AttributePosition
|
|||
- (void)layoutSubviews
|
||||
{
|
||||
[super layoutSubviews];
|
||||
CGFloat const bound = self.distanceLabel.width + kDirectionArrowSide + kOffsetFromDistanceToArrow + kOffsetFromTitleToDistance;
|
||||
CGFloat const bound = self.distanceLabel.width + kDirectionArrowSide + kOffsetFromDistanceToArrow + kOffsetFromLabelsToDistance;
|
||||
AttributePosition const position = [self distanceAttributePosition];
|
||||
[self setupLabelsWidthWithBoundedWidth:bound distancePosition:position];
|
||||
[self.titleLabel sizeToFit];
|
||||
[self.typeLabel sizeToFit];
|
||||
[self.addressLabel sizeToFit];
|
||||
[self layoutLabels];
|
||||
[self layoutTableViewWithPosition:position];
|
||||
[self setDistance:self.distanceLabel.text];
|
||||
self.height = self.featureTable.height + self.separatorView.height + self.titleLabel.height +
|
||||
(self.typeLabel.text.length > 0 ? self.typeLabel.height + kLabelsBetweenOffset : 0) +
|
||||
(self.addressLabel.text.length > 0 ? self.addressLabel.height + kLabelsBetweenOffset : 0) + kBottomPlacePageOffset;
|
||||
self.height = self.featureTable.height + self.ppPreview.height;
|
||||
}
|
||||
|
||||
- (void)layoutLabels
|
||||
{
|
||||
self.titleLabel.origin = {kLeftOffset, 0};
|
||||
self.typeLabel.origin = {kLeftOffset, self.titleLabel.maxY + kLabelsBetweenOffset};
|
||||
self.addressLabel.origin = self.typeLabel.text.length > 0 ?
|
||||
CGPointMake(kLeftOffset, self.typeLabel.maxY + kLabelsBetweenOffset) :
|
||||
self.typeLabel.origin;
|
||||
BOOL const isDownloadProgressViewHidden = self.downloadProgressView.hidden;
|
||||
if (!isDownloadProgressViewHidden)
|
||||
self.downloadProgressView.origin = {kDownloadProgressViewLeftOffset, kDownloadProgressViewTopOffset};
|
||||
|
||||
CGFloat const leftOffset = isDownloadProgressViewHidden ? kLeftOffset : self.downloadProgressView.maxX + kDownloadProgressViewLeftOffset;
|
||||
|
||||
auto originFrom = ^ CGPoint (UILabel * l)
|
||||
{
|
||||
return {leftOffset, l.text.length == 0 ? l.minY : l.maxY + kLabelsBetweenMainOffset};
|
||||
};
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
- (void)layoutDistanceBoxWithPosition:(AttributePosition)position
|
||||
|
@ -282,8 +351,12 @@ enum class AttributePosition
|
|||
{
|
||||
case AttributePosition::Title:
|
||||
return self.titleLabel.minY + defaultCenter;
|
||||
case AttributePosition::Type:
|
||||
return self.typeLabel.minY + defaultCenter;
|
||||
case AttributePosition::ExternalTitle:
|
||||
return self.externalTitleLabel.minY + defaultCenter;
|
||||
case AttributePosition::Subtitle:
|
||||
return self.subtitleLabel.minY + defaultCenter;
|
||||
case AttributePosition::Schedule:
|
||||
return self.placeScheduleLabel.minY + defaultCenter;
|
||||
case AttributePosition::Address:
|
||||
return self.addressLabel.minY + defaultCenter;
|
||||
}
|
||||
|
@ -306,15 +379,19 @@ enum class AttributePosition
|
|||
{
|
||||
case AttributePosition::Title:
|
||||
return self.titleLabel.maxY + kBottomPlacePageOffset;
|
||||
case AttributePosition::Type:
|
||||
return (self.addressLabel.text.length > 0 ? self.addressLabel.maxY : self.typeLabel.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;
|
||||
}
|
||||
};
|
||||
|
||||
self.separatorView.minY = getY(position);
|
||||
self.ppPreview.height = self.separatorView.maxY;
|
||||
self.ppPreview.frame = {{}, {self.ppPreview.superview.width, self.separatorView.maxY}};
|
||||
self.featureTable.minY = self.separatorView.maxY;
|
||||
self.featureTable.height = self.featureTable.contentSize.height;
|
||||
}
|
||||
|
@ -325,12 +402,11 @@ enum class AttributePosition
|
|||
{
|
||||
[Statistics logEvent:kStatEventName(kStatPlacePage, kStatToggleBookmark)
|
||||
withParameters:@{kStatValue : kStatAdd}];
|
||||
[self.typeLabel sizeToFit];
|
||||
[self.subtitleLabel sizeToFit];
|
||||
|
||||
m_sections.push_back(PlacePageSection::Bookmark);
|
||||
m_cells[PlacePageSection::Bookmark].push_back(MWMPlacePageCellTypeBookmark);
|
||||
sort(m_sections.begin(), m_sections.end());
|
||||
|
||||
[self configure];
|
||||
}
|
||||
|
||||
|
@ -346,29 +422,55 @@ enum class AttributePosition
|
|||
m_cells.erase(PlacePageSection::Bookmark);
|
||||
}
|
||||
|
||||
m_offscreenCells.erase(MWMPlacePageCellTypeBookmark);
|
||||
|
||||
[self configure];
|
||||
}
|
||||
|
||||
- (void)reloadBookmarkCell
|
||||
{
|
||||
MWMPlacePageCellType const type = MWMPlacePageCellTypeBookmark;
|
||||
[self fillCell:m_offscreenCells[type] withType:type];
|
||||
[self configure];
|
||||
[self.featureTable reloadData];
|
||||
[self setNeedsLayout];
|
||||
[self layoutIfNeeded];
|
||||
[CATransaction begin];
|
||||
[CATransaction setCompletionBlock:^
|
||||
{
|
||||
[self setNeedsLayout];
|
||||
dispatch_async(dispatch_get_main_queue(), ^{ [self.ownerPlacePage refresh]; });
|
||||
}];
|
||||
[CATransaction commit];
|
||||
}
|
||||
|
||||
- (IBAction)directionButtonTap
|
||||
{
|
||||
[Statistics logEvent:kStatEventName(kStatPlacePage, kStatCompass)];
|
||||
[self.ownerPlacePage.manager showDirectionViewWithTitle:self.titleLabel.text type:self.typeLabel.text];
|
||||
[self.ownerPlacePage.manager showDirectionViewWithTitle:self.titleLabel.text type:self.subtitleLabel.text];
|
||||
}
|
||||
|
||||
- (void)updateAndLayoutMyPositionSpeedAndAltitude:(NSString *)text
|
||||
{
|
||||
self.typeLabel.text = text;
|
||||
self.subtitleLabel.text = text;
|
||||
[self setNeedsLayout];
|
||||
}
|
||||
|
||||
#pragma mark - MWMPlacePageBookmarkDelegate
|
||||
|
||||
- (void)reloadBookmark
|
||||
{
|
||||
[self reloadBookmarkCell];
|
||||
}
|
||||
|
||||
- (void)editBookmarkTap
|
||||
{
|
||||
[self.ownerPlacePage editBookmark];
|
||||
}
|
||||
|
||||
- (void)moreTap
|
||||
{
|
||||
self.isBookmarkCellExpanded = YES;
|
||||
[self reloadBookmarkCell];
|
||||
}
|
||||
|
||||
#pragma mark - MWMPlacePageOpeningHoursCellProtocol
|
||||
|
||||
- (BOOL)forcedButton
|
||||
|
@ -386,37 +488,37 @@ enum class AttributePosition
|
|||
return NO;
|
||||
}
|
||||
|
||||
- (void)setOpeningHoursCellExpanded:(BOOL)openingHoursCellExpanded forCell:(UITableViewCell *)cell
|
||||
- (void)setOpeningHoursCellExpanded:(BOOL)openingHoursCellExpanded
|
||||
{
|
||||
_openingHoursCellExpanded = openingHoursCellExpanded;
|
||||
UITableView * tv = self.featureTable;
|
||||
NSIndexPath * indexPath = [tv indexPathForCell:cell];
|
||||
[CATransaction begin];
|
||||
MWMPlacePageCellType const type = MWMPlacePageCellTypeOpenHours;
|
||||
[self fillCell:m_offscreenCells[MWMPlacePageCellTypeOpenHours] withType:type];
|
||||
[tv beginUpdates];
|
||||
[CATransaction begin];
|
||||
[CATransaction setCompletionBlock:^
|
||||
{
|
||||
[self setNeedsLayout];
|
||||
dispatch_async(dispatch_get_main_queue(), ^{ [self.ownerPlacePage refresh]; });
|
||||
}];
|
||||
[tv reloadRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationAutomatic];
|
||||
[tv endUpdates];
|
||||
[CATransaction commit];
|
||||
}
|
||||
|
||||
- (UITableViewCell *)offscreenCellForIdentifier:(NSString *)reuseIdentifier
|
||||
- (UITableViewCell *)offscreenCellForCellType:(MWMPlacePageCellType)type
|
||||
{
|
||||
UITableViewCell * cell = self.offscreenCells[reuseIdentifier];
|
||||
UITableViewCell * cell = m_offscreenCells[type];
|
||||
if (!cell)
|
||||
{
|
||||
cell = [[[NSBundle mainBundle] loadNibNamed:reuseIdentifier owner:nil options:nil] firstObject];
|
||||
self.offscreenCells[reuseIdentifier] = cell;
|
||||
NSString * identifier = reuseIdentifier(type);
|
||||
cell = [[[NSBundle mainBundle] loadNibNamed:identifier owner:nil options:nil] firstObject];
|
||||
[self fillCell:cell withType:type];
|
||||
m_offscreenCells[type] = cell;
|
||||
}
|
||||
return cell;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@implementation MWMBasePlacePageView (UITableView)
|
||||
#pragma mark - UITableView
|
||||
|
||||
- (MWMPlacePageCellType)cellTypeForIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
|
@ -429,14 +531,17 @@ enum class AttributePosition
|
|||
return reuseIdentifier(cellType);
|
||||
}
|
||||
|
||||
- (void)fillCell:(UITableViewCell *)cell atIndexPath:(NSIndexPath * _Nonnull)indexPath forHeight:(BOOL)forHeight
|
||||
- (void)fillCell:(UITableViewCell *)cell withType:(MWMPlacePageCellType)cellType
|
||||
{
|
||||
MWMPlacePageEntity * entity = self.entity;
|
||||
MWMPlacePageCellType const cellType = [self cellTypeForIndexPath:indexPath];
|
||||
switch (cellType)
|
||||
{
|
||||
case MWMPlacePageCellTypeBookmark:
|
||||
[(MWMPlacePageBookmarkCell *)cell config:self.ownerPlacePage forHeight:NO];
|
||||
[static_cast<MWMPlacePageBookmarkCell *>(cell) configWithText:entity.bookmarkDescription
|
||||
delegate:self
|
||||
placePageWidth:placePageWidth()
|
||||
isOpen:self.isBookmarkCellExpanded
|
||||
isHtml:entity.isHTMLDescription];
|
||||
break;
|
||||
case MWMPlacePageCellTypeOpenHours:
|
||||
[(MWMPlacePageOpeningHoursCell *)cell configWithDelegate:self info:[entity getCellValue:cellType]];
|
||||
|
@ -458,10 +563,8 @@ enum class AttributePosition
|
|||
|
||||
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
NSString * reuseIdentifier = [self cellIdentifierForIndexPath:indexPath];
|
||||
UITableViewCell * cell = [self offscreenCellForIdentifier:reuseIdentifier];
|
||||
[self fillCell:cell atIndexPath:indexPath forHeight:YES];
|
||||
MWMPlacePageCellType const cellType = [self cellTypeForIndexPath:indexPath];
|
||||
UITableViewCell * cell = [self offscreenCellForCellType:cellType];
|
||||
switch (cellType)
|
||||
{
|
||||
case MWMPlacePageCellTypeBookmark:
|
||||
|
@ -481,11 +584,6 @@ enum class AttributePosition
|
|||
}
|
||||
}
|
||||
|
||||
- (void)tableView:(UITableView * _Nonnull)tableView willDisplayCell:(UITableViewCell * _Nonnull)cell forRowAtIndexPath:(NSIndexPath * _Nonnull)indexPath
|
||||
{
|
||||
[self fillCell:cell atIndexPath:indexPath forHeight:NO];
|
||||
}
|
||||
|
||||
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
|
||||
{
|
||||
return [self cellsForSection:section].size();
|
||||
|
@ -498,8 +596,13 @@ enum class AttributePosition
|
|||
|
||||
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
NSString * reuseIdentifier = [self cellIdentifierForIndexPath:indexPath];
|
||||
return [tableView dequeueReusableCellWithIdentifier:reuseIdentifier];
|
||||
MWMPlacePageCellType const type = [self cellTypeForIndexPath:indexPath];
|
||||
NSString * identifier = reuseIdentifier(type);
|
||||
UITableViewCell * cell = m_offscreenCells[type];
|
||||
if (!cell)
|
||||
cell = [tableView dequeueReusableCellWithIdentifier:identifier];
|
||||
|
||||
return cell;
|
||||
}
|
||||
|
||||
- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section
|
||||
|
@ -509,6 +612,8 @@ enum class AttributePosition
|
|||
|
||||
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
|
||||
{
|
||||
if (m_sections[section] == PlacePageSection::Bookmark)
|
||||
return 0.001;
|
||||
return kDefaultHeaderHeight;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
#import "MWMTableViewCell.h"
|
||||
|
||||
@interface MWMBookmarkColorCell : MWMTableViewCell
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UIButton * colorButton;
|
||||
@property (weak, nonatomic) IBOutlet UILabel * titleLabel;
|
||||
@property (weak, nonatomic) IBOutlet UIImageView * approveImageView;
|
||||
|
||||
- (void)configureWithColorString:(NSString *)colorString;
|
||||
|
||||
@end
|
|
@ -1,31 +0,0 @@
|
|||
#import "MWMBookmarkColorCell.h"
|
||||
#import "UIColor+MapsMeColor.h"
|
||||
|
||||
@interface MWMBookmarkColorCell ()
|
||||
|
||||
@property (copy, nonatomic) NSString * currentImageName;
|
||||
|
||||
@end
|
||||
|
||||
@implementation MWMBookmarkColorCell
|
||||
|
||||
- (void)awakeFromNib
|
||||
{
|
||||
[super awakeFromNib];
|
||||
self.backgroundColor = [UIColor white];
|
||||
}
|
||||
|
||||
- (void)configureWithColorString:(NSString *)colorString
|
||||
{
|
||||
self.currentImageName = colorString;
|
||||
self.titleLabel.text = L([colorString stringByReplacingOccurrencesOfString:@"placemark-" withString:@""]);
|
||||
}
|
||||
|
||||
- (void)setSelected:(BOOL)selected animated:(BOOL)animated
|
||||
{
|
||||
[super setSelected:selected animated:animated];
|
||||
[self.colorButton setImage:[UIImage imageNamed:[NSString stringWithFormat:@"%@%@", self.currentImageName, selected ? @"-on" : @"-off"]] forState:UIControlStateNormal];
|
||||
self.approveImageView.hidden = !selected;
|
||||
}
|
||||
|
||||
@end
|
|
@ -1,74 +0,0 @@
|
|||
<?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" useAutolayout="YES">
|
||||
<dependencies>
|
||||
<deployment version="2048" identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9529"/>
|
||||
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="MWMBookmarkColorViewController"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="MWMBookmarkColorCell" id="KGk-i7-Jjw" customClass="MWMBookmarkColorCell">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="43.5"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Красный" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="15v-Tv-AWS">
|
||||
<rect key="frame" x="60" y="11" width="216" height="21"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="21" id="tTa-sS-aNz"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="16"/>
|
||||
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.87" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="colorName" value="blackPrimaryText"/>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="fontName" value="regular16"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</label>
|
||||
<imageView hidden="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="ic_approve" translatesAutoresizingMaskIntoConstraints="NO" id="icw-Gw-rjx">
|
||||
<rect key="frame" x="290" y="15" width="14" height="14"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="14" id="2Ca-jV-Joa"/>
|
||||
<constraint firstAttribute="height" constant="14" id="zg7-xd-zPV"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="3MP-b3-Pk5">
|
||||
<rect key="frame" x="16" y="8" width="28" height="28"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="28" id="MEc-WT-81y"/>
|
||||
<constraint firstAttribute="height" constant="28" id="lHg-Zz-MZh"/>
|
||||
</constraints>
|
||||
<state key="normal">
|
||||
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</state>
|
||||
</button>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="3MP-b3-Pk5" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="topMargin" id="64U-gD-AsA"/>
|
||||
<constraint firstItem="3MP-b3-Pk5" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leadingMargin" constant="8" id="7a2-pO-Tc8"/>
|
||||
<constraint firstItem="15v-Tv-AWS" firstAttribute="leading" secondItem="3MP-b3-Pk5" secondAttribute="trailing" constant="16" id="9KL-3W-kWV"/>
|
||||
<constraint firstItem="icw-Gw-rjx" firstAttribute="leading" secondItem="15v-Tv-AWS" secondAttribute="trailing" constant="14" id="YXB-LS-24F"/>
|
||||
<constraint firstItem="15v-Tv-AWS" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="topMargin" constant="3" id="msa-4l-qNz"/>
|
||||
<constraint firstItem="icw-Gw-rjx" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="topMargin" constant="7" id="r5R-sJ-PGL"/>
|
||||
<constraint firstAttribute="trailingMargin" secondItem="icw-Gw-rjx" secondAttribute="trailing" constant="8" id="sIL-PN-YHv"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
<inset key="separatorInset" minX="60" minY="0.0" maxX="0.0" maxY="0.0"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="backgroundColorName" value="white"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
<connections>
|
||||
<outlet property="approveImageView" destination="icw-Gw-rjx" id="hoe-O8-915"/>
|
||||
<outlet property="colorButton" destination="3MP-b3-Pk5" id="HmX-KA-iq9"/>
|
||||
<outlet property="titleLabel" destination="15v-Tv-AWS" id="ljy-gW-Wvc"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="247" y="298"/>
|
||||
</tableViewCell>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="ic_approve" width="14" height="14"/>
|
||||
</resources>
|
||||
</document>
|
|
@ -1,10 +1,27 @@
|
|||
#import "MWMTableViewController.h"
|
||||
|
||||
@class MWMPlacePageViewManager;
|
||||
namespace ios_bookmark_ui_helper
|
||||
{
|
||||
inline NSString * LocalizedTitleForBookmarkColor(NSString * color)
|
||||
{
|
||||
return L([color stringByReplacingOccurrencesOfString:@"placemark-" withString:@""]);
|
||||
}
|
||||
|
||||
inline UIImage * ImageForBookmarkColor(NSString * color, BOOL isSelected)
|
||||
{
|
||||
return [UIImage imageNamed:[NSString stringWithFormat:@"%@%@%@", @"img_", color, isSelected ? @"-on" : @"-off"]];
|
||||
}
|
||||
|
||||
} // namespace ios_bookmark_ui_helper
|
||||
|
||||
@protocol MWMBookmarkColorDelegate <NSObject>
|
||||
|
||||
- (void)didSelectColor:(NSString *)color;
|
||||
|
||||
@end
|
||||
|
||||
@interface MWMBookmarkColorViewController : MWMTableViewController
|
||||
|
||||
@property (weak, nonatomic) MWMPlacePageViewManager * placePageManager;
|
||||
@property (weak, nonatomic) UINavigationController * iPadOwnerNavigationController;
|
||||
- (instancetype)initWithColor:(NSString *)color delegate:(id<MWMBookmarkColorDelegate>)delegate;
|
||||
|
||||
@end
|
||||
|
|
|
@ -1,16 +1,14 @@
|
|||
#import "Common.h"
|
||||
#import "MWMBookmarkColorCell.h"
|
||||
#import "MWMBookmarkColorViewController.h"
|
||||
#import "MWMPlacePageEntity.h"
|
||||
#import "MWMPlacePageViewManager.h"
|
||||
#import "Statistics.h"
|
||||
#import "UIColor+MapsMeColor.h"
|
||||
#import "UIViewController+navigation.h"
|
||||
#import "UIViewController+Navigation.h"
|
||||
|
||||
#include "std/array.hpp"
|
||||
|
||||
namespace
|
||||
{
|
||||
|
||||
NSArray<NSString *> * const kBookmarkColorsVariant = @[
|
||||
array<NSString *, 8> const kBookmarkColorsVariant
|
||||
{{
|
||||
@"placemark-red",
|
||||
@"placemark-yellow",
|
||||
@"placemark-blue",
|
||||
|
@ -19,58 +17,36 @@ NSArray<NSString *> * const kBookmarkColorsVariant = @[
|
|||
@"placemark-orange",
|
||||
@"placemark-brown",
|
||||
@"placemark-pink"
|
||||
];
|
||||
|
||||
NSString * const kBookmarkColorCellIdentifier = @"MWMBookmarkColorCell";
|
||||
}};
|
||||
|
||||
} // namespace
|
||||
|
||||
|
||||
@interface MWMBookmarkColorViewController ()
|
||||
|
||||
@property (nonatomic) BOOL colorWasChanged;
|
||||
@property (copy, nonatomic) NSString * bookmarkColor;
|
||||
@property (weak, nonatomic) id<MWMBookmarkColorDelegate> delegate;
|
||||
|
||||
@end
|
||||
|
||||
@implementation MWMBookmarkColorViewController
|
||||
|
||||
- (instancetype)initWithColor:(NSString *)color delegate:(id<MWMBookmarkColorDelegate>)delegate
|
||||
{
|
||||
self = [super init];
|
||||
if (self)
|
||||
{
|
||||
_bookmarkColor = color;
|
||||
_delegate = delegate;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)viewDidLoad
|
||||
{
|
||||
[super viewDidLoad];
|
||||
NSAssert(self.bookmarkColor, @"Color can't be nil!");
|
||||
NSAssert(self.delegate, @"Delegate can't be nil!");
|
||||
self.title = L(@"bookmark_color");
|
||||
[self.tableView registerNib:[UINib nibWithNibName:kBookmarkColorCellIdentifier bundle:nil] forCellReuseIdentifier:kBookmarkColorCellIdentifier];
|
||||
self.colorWasChanged = NO;
|
||||
}
|
||||
|
||||
- (void)viewWillAppear:(BOOL)animated
|
||||
{
|
||||
[super viewWillAppear:animated];
|
||||
if (!self.iPadOwnerNavigationController)
|
||||
return;
|
||||
|
||||
[self.iPadOwnerNavigationController setNavigationBarHidden:NO];
|
||||
[self showBackButton];
|
||||
CGFloat const navBarHeight = self.navigationController.navigationBar.height;
|
||||
[self.tableView reloadData];
|
||||
[UIView animateWithDuration:kDefaultAnimationDuration animations:^
|
||||
{
|
||||
[self.placePageManager changeHeight:self.tableView.contentSize.height + navBarHeight];
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)backTap
|
||||
{
|
||||
if (self.iPadOwnerNavigationController)
|
||||
[self.iPadOwnerNavigationController setNavigationBarHidden:YES];
|
||||
[self.placePageManager reloadBookmark];
|
||||
[self.navigationController popViewControllerAnimated:YES];
|
||||
}
|
||||
|
||||
- (void)viewWillDisappear:(BOOL)animated
|
||||
{
|
||||
[super viewWillDisappear:animated];
|
||||
if (self.colorWasChanged && !self.iPadOwnerNavigationController)
|
||||
[self.placePageManager reloadBookmark];
|
||||
}
|
||||
|
||||
@end
|
||||
|
@ -79,22 +55,18 @@ NSString * const kBookmarkColorCellIdentifier = @"MWMBookmarkColorCell";
|
|||
|
||||
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
MWMBookmarkColorCell * cell = (MWMBookmarkColorCell *)[tableView dequeueReusableCellWithIdentifier:kBookmarkColorCellIdentifier];
|
||||
if (!cell)
|
||||
cell = [[MWMBookmarkColorCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:kBookmarkColorCellIdentifier];
|
||||
|
||||
NSString * const currentColor = kBookmarkColorsVariant[indexPath.row];
|
||||
[cell configureWithColorString:kBookmarkColorsVariant[indexPath.row]];
|
||||
|
||||
if ([currentColor isEqualToString:self.placePageManager.entity.bookmarkColor] && !cell.selected)
|
||||
[tableView selectRowAtIndexPath:indexPath animated:NO scrollPosition:UITableViewScrollPositionNone];
|
||||
|
||||
UITableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:[UITableViewCell className]];
|
||||
NSString * currentColor = kBookmarkColorsVariant[indexPath.row];
|
||||
cell.textLabel.text = ios_bookmark_ui_helper::LocalizedTitleForBookmarkColor(currentColor);
|
||||
BOOL const isSelected = [currentColor isEqualToString:self.bookmarkColor];
|
||||
cell.imageView.image = ios_bookmark_ui_helper::ImageForBookmarkColor(currentColor, isSelected);
|
||||
cell.accessoryType = isSelected ? UITableViewCellAccessoryCheckmark : UITableViewCellAccessoryNone;
|
||||
return cell;
|
||||
}
|
||||
|
||||
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
|
||||
{
|
||||
return kBookmarkColorsVariant.count;
|
||||
return kBookmarkColorsVariant.size();
|
||||
}
|
||||
|
||||
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
|
@ -102,12 +74,8 @@ NSString * const kBookmarkColorCellIdentifier = @"MWMBookmarkColorCell";
|
|||
NSString * bookmarkColor = kBookmarkColorsVariant[indexPath.row];
|
||||
[Statistics logEvent:kStatEventName(kStatPlacePage, kStatChangeBookmarkColor)
|
||||
withParameters:@{kStatValue : bookmarkColor}];
|
||||
self.colorWasChanged = YES;
|
||||
self.placePageManager.entity.bookmarkColor = bookmarkColor;
|
||||
if (!self.iPadOwnerNavigationController)
|
||||
return;
|
||||
|
||||
[self.placePageManager.entity synchronize];
|
||||
[self.delegate didSelectColor:bookmarkColor];
|
||||
[self backTap];
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<?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" useAutolayout="YES">
|
||||
<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="9529"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="MWMBookmarkDescriptionViewController">
|
||||
|
|
13
iphone/Maps/Classes/MWMBookmarkTitleCell.h
Normal file
|
@ -0,0 +1,13 @@
|
|||
#import "MWMTableViewCell.h"
|
||||
|
||||
@protocol MWMBookmarkTitleDelegate <NSObject>
|
||||
|
||||
- (void)didFinishEditingBookmarkTitle:(NSString *)title;
|
||||
|
||||
@end
|
||||
|
||||
@interface MWMBookmarkTitleCell : MWMTableViewCell
|
||||
|
||||
- (void)configureWithName:(NSString *)name delegate:(id<MWMBookmarkTitleDelegate>)delegate;
|
||||
|
||||
@end
|
23
iphone/Maps/Classes/MWMBookmarkTitleCell.m
Normal file
|
@ -0,0 +1,23 @@
|
|||
#import "MWMBookmarkTitleCell.h"
|
||||
|
||||
@interface MWMBookmarkTitleCell () <UITextFieldDelegate>
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UITextField * name;
|
||||
@property (weak, nonatomic) id<MWMBookmarkTitleDelegate> delegate;
|
||||
|
||||
@end
|
||||
|
||||
@implementation MWMBookmarkTitleCell
|
||||
|
||||
- (void)configureWithName:(NSString *)name delegate:(id<MWMBookmarkTitleDelegate>)delegate
|
||||
{
|
||||
self.name.text = name;
|
||||
self.delegate = delegate;
|
||||
}
|
||||
|
||||
- (void)textFieldDidEndEditing:(UITextField *)textField
|
||||
{
|
||||
[self.delegate didFinishEditingBookmarkTitle:textField.text];
|
||||
}
|
||||
|
||||
@end
|
45
iphone/Maps/Classes/MWMBookmarkTitleCell.xib
Normal file
|
@ -0,0 +1,45 @@
|
|||
<?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"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" id="oz5-CE-QZ8" customClass="MWMBookmarkTitleCell">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="oz5-CE-QZ8" id="v5X-p8-TtT">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="43"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" minimumFontSize="17" clearButtonMode="whileEditing" translatesAutoresizingMaskIntoConstraints="NO" id="Ykx-ep-qjo">
|
||||
<rect key="frame" x="20" y="12" width="280" height="20"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="14"/>
|
||||
<textInputTraits key="textInputTraits"/>
|
||||
<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="_placeholderLabel.colorName" value="blackHintText"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
<connections>
|
||||
<outlet property="delegate" destination="oz5-CE-QZ8" id="xG2-C9-gMT"/>
|
||||
</connections>
|
||||
</textField>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="bottom" secondItem="Ykx-ep-qjo" secondAttribute="bottom" constant="12" id="cfm-oE-z2I"/>
|
||||
<constraint firstAttribute="trailing" secondItem="Ykx-ep-qjo" secondAttribute="trailing" constant="20" id="dyn-Ae-apB"/>
|
||||
<constraint firstItem="Ykx-ep-qjo" firstAttribute="top" secondItem="v5X-p8-TtT" secondAttribute="top" constant="12" id="e37-GE-Eth"/>
|
||||
<constraint firstItem="Ykx-ep-qjo" firstAttribute="leading" secondItem="v5X-p8-TtT" secondAttribute="leading" constant="20" id="gXL-r9-dr7"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
<connections>
|
||||
<outlet property="name" destination="Ykx-ep-qjo" id="mtb-ib-ktf"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="234" y="339"/>
|
||||
</tableViewCell>
|
||||
</objects>
|
||||
</document>
|
9
iphone/Maps/Classes/MWMEditBookmarkController.h
Normal file
|
@ -0,0 +1,9 @@
|
|||
#import "MWMTableViewController.h"
|
||||
|
||||
@class MWMPlacePageViewManager;
|
||||
|
||||
@interface MWMEditBookmarkController : MWMTableViewController
|
||||
|
||||
@property (nonatomic) MWMPlacePageViewManager * manager;
|
||||
|
||||
@end
|
287
iphone/Maps/Classes/MWMEditBookmarkController.mm
Normal file
|
@ -0,0 +1,287 @@
|
|||
#import "MWMBookmarkTitleCell.h"
|
||||
#import "MWMButtonCell.h"
|
||||
#import "MWMBookmarkColorViewController.h"
|
||||
#import "MWMEditBookmarkController.h"
|
||||
#import "MWMNoteCell.h"
|
||||
#import "MWMPlacePageEntity.h"
|
||||
#import "MWMPlacePageViewManager.h"
|
||||
#import "SelectSetVC.h"
|
||||
#import "UIImageView+Coloring.h"
|
||||
#import "UIViewController+Navigation.h"
|
||||
|
||||
#include "Framework.h"
|
||||
|
||||
namespace
|
||||
{
|
||||
enum Sections
|
||||
{
|
||||
MetaInfo,
|
||||
Description,
|
||||
Delete,
|
||||
SectionsCount
|
||||
};
|
||||
|
||||
enum RowInMetaInfo
|
||||
{
|
||||
Title,
|
||||
Color,
|
||||
Category,
|
||||
RowsInMetaInfoCount
|
||||
};
|
||||
|
||||
} // namespace
|
||||
|
||||
@interface MWMEditBookmarkController () <MWMButtonCellDelegate, MWMNoteCelLDelegate, MWMBookmarkColorDelegate,
|
||||
MWMSelectSetDelegate, MWMBookmarkTitleDelegate>
|
||||
{
|
||||
BookmarkAndCategory m_cachedBac;
|
||||
}
|
||||
|
||||
@property (nonatomic) MWMNoteCell * cachedNote;
|
||||
@property (copy, nonatomic) NSString * cachedDescription;
|
||||
@property (copy, nonatomic) NSString * cachedTitle;
|
||||
@property (copy, nonatomic) NSString * cachedColor;
|
||||
@property (copy, nonatomic) NSString * cachedCategory;
|
||||
|
||||
@end
|
||||
|
||||
@implementation MWMEditBookmarkController
|
||||
|
||||
- (void)viewDidLoad
|
||||
{
|
||||
[super viewDidLoad];
|
||||
NSAssert(self.manager, @"Entity can't be nil!");
|
||||
MWMPlacePageEntity * en = self.manager.entity;
|
||||
self.cachedDescription = en.bookmarkDescription;
|
||||
self.cachedTitle = en.bookmarkTitle;
|
||||
self.cachedCategory = en.bookmarkCategory;
|
||||
self.cachedColor = en.bookmarkColor;
|
||||
m_cachedBac = en.bac;
|
||||
|
||||
[self configNavBar];
|
||||
[self registerCells];
|
||||
}
|
||||
|
||||
- (void)viewDidAppear:(BOOL)animated
|
||||
{
|
||||
[super viewDidAppear:animated];
|
||||
[self.cachedNote updateTextViewForHeight:self.cachedNote.textView.contentSize.height];
|
||||
}
|
||||
|
||||
- (void)configNavBar
|
||||
{
|
||||
[self showBackButton];
|
||||
self.title = L(@"bookmark").capitalizedString;
|
||||
self.navigationItem.rightBarButtonItem =
|
||||
[[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemSave
|
||||
target:self
|
||||
action:@selector(onSave)];
|
||||
}
|
||||
|
||||
- (void)registerCells
|
||||
{
|
||||
auto registerClass = ^ (Class c)
|
||||
{
|
||||
NSString * className = NSStringFromClass(c);
|
||||
[self.tableView registerNib:[UINib nibWithNibName:className bundle:nil]
|
||||
forCellReuseIdentifier:className];
|
||||
};
|
||||
|
||||
registerClass([MWMButtonCell class]);
|
||||
registerClass([MWMBookmarkTitleCell class]);
|
||||
registerClass([MWMNoteCell class]);
|
||||
}
|
||||
|
||||
- (void)onSave
|
||||
{
|
||||
[self.view endEditing:YES];
|
||||
MWMPlacePageEntity * en = self.manager.entity;
|
||||
en.bookmarkDescription = self.cachedDescription;
|
||||
en.bookmarkColor = self.cachedColor;
|
||||
en.bookmarkCategory = self.cachedCategory;
|
||||
en.bookmarkTitle = self.cachedTitle;
|
||||
en.bac = m_cachedBac;
|
||||
[en synchronize];
|
||||
[self.manager reloadBookmark];
|
||||
[self backTap];
|
||||
}
|
||||
|
||||
- (void)backTap
|
||||
{
|
||||
if (IPAD)
|
||||
[self dismissViewControllerAnimated:YES completion:nil];
|
||||
else
|
||||
[super backTap];
|
||||
}
|
||||
|
||||
#pragma mark - UITableView
|
||||
|
||||
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
|
||||
{
|
||||
return SectionsCount;
|
||||
}
|
||||
|
||||
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
|
||||
{
|
||||
switch (section)
|
||||
{
|
||||
case MetaInfo:
|
||||
return RowsInMetaInfoCount;
|
||||
case Description:
|
||||
case Delete:
|
||||
return 1;
|
||||
default:
|
||||
NSAssert(false, @"Incorrect section!");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
switch (indexPath.section)
|
||||
{
|
||||
case MetaInfo:
|
||||
switch (indexPath.row)
|
||||
{
|
||||
case Title:
|
||||
{
|
||||
MWMBookmarkTitleCell * cell = [tableView dequeueReusableCellWithIdentifier:[MWMBookmarkTitleCell className]];
|
||||
[cell configureWithName:self.cachedTitle delegate:self];
|
||||
return cell;
|
||||
}
|
||||
case Color:
|
||||
{
|
||||
UITableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:[UITableViewCell className]];
|
||||
cell.textLabel.text = ios_bookmark_ui_helper::LocalizedTitleForBookmarkColor(self.cachedColor);
|
||||
cell.imageView.image = ios_bookmark_ui_helper::ImageForBookmarkColor(self.cachedColor, YES);
|
||||
cell.imageView.layer.cornerRadius = cell.imageView.width / 2;
|
||||
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
|
||||
return cell;
|
||||
}
|
||||
case Category:
|
||||
{
|
||||
UITableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:[UITableViewCell className]];
|
||||
cell.textLabel.text = self.cachedCategory;
|
||||
cell.imageView.image = [UIImage imageNamed:@"ic_folder"];
|
||||
cell.imageView.mwm_coloring = MWMImageColoringBlack;
|
||||
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
|
||||
return cell;
|
||||
}
|
||||
default:
|
||||
NSAssert(false, @"Incorrect row!");
|
||||
return nil;
|
||||
}
|
||||
case Description:
|
||||
{
|
||||
NSAssert(indexPath.row == 0, @"Incorrect row!");
|
||||
if (self.cachedNote)
|
||||
{
|
||||
return self.cachedNote;
|
||||
}
|
||||
else
|
||||
{
|
||||
self.cachedNote = [tableView dequeueReusableCellWithIdentifier:[MWMNoteCell className]];
|
||||
[self.cachedNote configWithDelegate:self noteText:self.cachedDescription
|
||||
placeholder:L(@"personal_description")];
|
||||
return self.cachedNote;
|
||||
}
|
||||
}
|
||||
case Delete:
|
||||
{
|
||||
NSAssert(indexPath.row == 0, @"Incorrect row!");
|
||||
MWMButtonCell * cell = [tableView dequeueReusableCellWithIdentifier:[MWMButtonCell className]];
|
||||
[cell configureWithDelegate:self title:L(@"remove_bookmark")];
|
||||
return cell;
|
||||
}
|
||||
default:
|
||||
NSAssert(false, @"Incorrect section!");
|
||||
return nil;
|
||||
}
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
if (indexPath.section == Description)
|
||||
{
|
||||
NSAssert(indexPath.row == 0, @"Incorrect row!");
|
||||
return self.cachedNote ? self.cachedNote.cellHeight : [MWMNoteCell minimalHeight];
|
||||
}
|
||||
return self.tableView.rowHeight;
|
||||
}
|
||||
|
||||
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
switch (indexPath.row)
|
||||
{
|
||||
case Color:
|
||||
{
|
||||
MWMBookmarkColorViewController * cvc = [[MWMBookmarkColorViewController alloc] initWithColor:self.cachedColor
|
||||
delegate:self];
|
||||
[self.navigationController pushViewController:cvc animated:YES];
|
||||
break;
|
||||
}
|
||||
case Category:
|
||||
{
|
||||
SelectSetVC * svc = [[SelectSetVC alloc] initWithCategory:self.cachedCategory
|
||||
bac:m_cachedBac
|
||||
delegate:self];
|
||||
[self.navigationController pushViewController:svc animated:YES];
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - MWMButtonCellDelegate
|
||||
|
||||
- (void)cellSelect:(UITableViewCell *)cell
|
||||
{
|
||||
[self.manager removeBookmark];
|
||||
[self backTap];
|
||||
}
|
||||
|
||||
#pragma mark - MWMNoteCellDelegate
|
||||
|
||||
- (void)cell:(MWMNoteCell *)cell didFinishEditingWithText:(NSString *)text
|
||||
{
|
||||
self.cachedDescription = text;
|
||||
}
|
||||
|
||||
- (void)cellShouldChangeSize:(MWMNoteCell *)cell text:(NSString *)text
|
||||
{
|
||||
self.cachedDescription = text;
|
||||
[self.tableView beginUpdates];
|
||||
[self.tableView endUpdates];
|
||||
[self.tableView scrollToRowAtIndexPath:[self.tableView indexPathForCell:cell]
|
||||
atScrollPosition:UITableViewScrollPositionBottom
|
||||
animated:YES];
|
||||
}
|
||||
|
||||
#pragma mark - MWMBookmarkColorDelegate
|
||||
|
||||
- (void)didSelectColor:(NSString *)color
|
||||
{
|
||||
self.cachedColor = color;
|
||||
[self.tableView reloadRowsAtIndexPaths:@[[NSIndexPath indexPathForRow:Color inSection:MetaInfo]] withRowAnimation:UITableViewRowAnimationAutomatic];
|
||||
}
|
||||
|
||||
#pragma mark - MWMSelectSetDelegate
|
||||
|
||||
- (void)didSelectCategory:(NSString *)category withBac:(BookmarkAndCategory const &)bac
|
||||
{
|
||||
self.cachedCategory = category;
|
||||
m_cachedBac = bac;
|
||||
[self.tableView reloadRowsAtIndexPaths:@[[NSIndexPath indexPathForRow:Category inSection:MetaInfo]] withRowAnimation:UITableViewRowAnimationAutomatic];
|
||||
}
|
||||
|
||||
#pragma mark - MWMBookmarkTitleDelegate
|
||||
|
||||
- (void)didFinishEditingBookmarkTitle:(NSString *)title
|
||||
{
|
||||
self.cachedTitle = title;
|
||||
[self.tableView reloadRowsAtIndexPaths:@[[NSIndexPath indexPathForRow:Title inSection:MetaInfo]] withRowAnimation:UITableViewRowAnimationAutomatic];
|
||||
}
|
||||
|
||||
@end
|
|
@ -24,9 +24,7 @@
|
|||
#pragma mark - Actions
|
||||
- (void)addBookmark;
|
||||
- (void)removeBookmark;
|
||||
- (void)changeBookmarkColor;
|
||||
- (void)changeBookmarkCategory;
|
||||
- (void)changeBookmarkDescription;
|
||||
- (void)editBookmark;
|
||||
- (void)editPlace;
|
||||
- (void)addBusiness;
|
||||
- (void)addPlace;
|
||||
|
@ -34,8 +32,6 @@
|
|||
- (void)route;
|
||||
- (void)reloadBookmark;
|
||||
- (void)apiBack;
|
||||
- (void)willStartEditingBookmarkTitle;
|
||||
- (void)willFinishEditingBookmarkTitle:(NSString *)title;
|
||||
- (void)addPlacePageShadowToView:(UIView *)view offset:(CGSize)offset;
|
||||
|
||||
- (IBAction)didTap:(UITapGestureRecognizer *)sender;
|
||||
|
@ -44,9 +40,6 @@
|
|||
- (void)setDistance:(NSString *)distance;
|
||||
- (void)updateMyPositionStatus:(NSString *)status;
|
||||
|
||||
- (void)keyboardWillShow:(NSNotification *)aNotification;
|
||||
- (void)keyboardWillHide;
|
||||
|
||||
- (void)refresh;
|
||||
|
||||
- (instancetype)init __attribute__((unavailable("call initWithManager: instead")));
|
||||
|
|
|
@ -13,6 +13,8 @@
|
|||
|
||||
static NSString * const kPlacePageNibIdentifier = @"PlacePageView";
|
||||
static NSString * const kPlacePageViewCenterKeyPath = @"center";
|
||||
extern NSString * const kPP2BookmarkEditingSegue = @"PP2BookmarkEditing";
|
||||
extern NSString * const kPP2BookmarkEditingIPADSegue = @"PP2BookmarkEditingIPAD";
|
||||
|
||||
@interface MWMPlacePage ()
|
||||
|
||||
|
@ -30,24 +32,10 @@ static NSString * const kPlacePageViewCenterKeyPath = @"center";
|
|||
[[NSBundle mainBundle] loadNibNamed:kPlacePageNibIdentifier owner:self options:nil];
|
||||
self.manager = manager;
|
||||
if (!IPAD)
|
||||
{
|
||||
[self.extendedPlacePageView addObserver:self
|
||||
forKeyPath:kPlacePageViewCenterKeyPath
|
||||
options:NSKeyValueObservingOptionNew
|
||||
context:nullptr];
|
||||
}
|
||||
dispatch_async(dispatch_get_main_queue(), ^
|
||||
{
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self
|
||||
selector:@selector(keyboardWillShow:)
|
||||
name:UIKeyboardWillShowNotification
|
||||
object:nil];
|
||||
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self
|
||||
selector:@selector(keyboardWillHide)
|
||||
name:UIKeyboardWillHideNotification
|
||||
object:nil];
|
||||
});
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
@ -55,21 +43,7 @@ static NSString * const kPlacePageViewCenterKeyPath = @"center";
|
|||
- (void)dealloc
|
||||
{
|
||||
if (!IPAD)
|
||||
{
|
||||
[self.extendedPlacePageView removeObserver:self forKeyPath:kPlacePageViewCenterKeyPath];
|
||||
}
|
||||
[[NSNotificationCenter defaultCenter] removeObserver:self];
|
||||
}
|
||||
|
||||
- (void)keyboardWillShow:(NSNotification *)aNotification
|
||||
{
|
||||
NSDictionary * info = [aNotification userInfo];
|
||||
self.keyboardHeight = [info[UIKeyboardFrameEndUserInfoKey] CGRectValue].size.height;
|
||||
}
|
||||
|
||||
- (void)keyboardWillHide
|
||||
{
|
||||
self.keyboardHeight = 0.0;
|
||||
}
|
||||
|
||||
- (void)observeValueForKeyPath:(NSString *)keyPath
|
||||
|
@ -77,8 +51,7 @@ static NSString * const kPlacePageViewCenterKeyPath = @"center";
|
|||
change:(NSDictionary *)change
|
||||
context:(void *)context
|
||||
{
|
||||
if ([self.extendedPlacePageView isEqual:object] &&
|
||||
[keyPath isEqualToString:kPlacePageViewCenterKeyPath])
|
||||
if ([self.extendedPlacePageView isEqual:object] && [keyPath isEqualToString:kPlacePageViewCenterKeyPath])
|
||||
[self.manager dragPlacePage:self.extendedPlacePageView.frame];
|
||||
}
|
||||
|
||||
|
@ -129,8 +102,8 @@ static NSString * const kPlacePageViewCenterKeyPath = @"center";
|
|||
|
||||
- (void)removeBookmark
|
||||
{
|
||||
[self.manager removeBookmark];
|
||||
[self.basePlacePageView removeBookmark];
|
||||
self.actionBar.isBookmark = NO;
|
||||
}
|
||||
|
||||
- (void)editPlace
|
||||
|
@ -185,27 +158,10 @@ static NSString * const kPlacePageViewCenterKeyPath = @"center";
|
|||
[self.basePlacePageView updateAndLayoutMyPositionSpeedAndAltitude:status];
|
||||
}
|
||||
|
||||
- (void)changeBookmarkCategory
|
||||
- (void)editBookmark
|
||||
{
|
||||
MWMPlacePageViewManager * manager = self.manager;
|
||||
MapViewController * ovc = static_cast<MapViewController *>(manager.ownerViewController);
|
||||
SelectSetVC * vc = [[SelectSetVC alloc] initWithPlacePageManager:manager];
|
||||
[ovc.navigationController pushViewController:vc animated:YES];
|
||||
}
|
||||
|
||||
- (void)changeBookmarkColor
|
||||
{
|
||||
MWMBookmarkColorViewController * controller = [[MWMBookmarkColorViewController alloc] initWithNibName:[MWMBookmarkColorViewController className] bundle:nil];
|
||||
controller.placePageManager = self.manager;
|
||||
[self.manager.ownerViewController.navigationController pushViewController:controller animated:YES];
|
||||
}
|
||||
|
||||
- (void)changeBookmarkDescription
|
||||
{
|
||||
MWMPlacePageViewManager * manager = self.manager;
|
||||
MapViewController * ovc = static_cast<MapViewController *>(manager.ownerViewController);
|
||||
MWMBookmarkDescriptionViewController * viewController = [[MWMBookmarkDescriptionViewController alloc] initWithPlacePageManager:manager];
|
||||
[ovc.navigationController pushViewController:viewController animated:YES];
|
||||
[self.manager.ownerViewController performSegueWithIdentifier:IPAD ? kPP2BookmarkEditingIPADSegue :
|
||||
kPP2BookmarkEditingSegue sender:self.manager];
|
||||
}
|
||||
|
||||
- (void)reloadBookmark
|
||||
|
@ -213,18 +169,6 @@ static NSString * const kPlacePageViewCenterKeyPath = @"center";
|
|||
[self.basePlacePageView reloadBookmarkCell];
|
||||
}
|
||||
|
||||
- (void)willStartEditingBookmarkTitle
|
||||
{
|
||||
[Statistics logEvent:kStatEventName(kStatPlacePage, kStatRename)];
|
||||
// This method should be оverridden.
|
||||
}
|
||||
|
||||
- (void)willFinishEditingBookmarkTitle:(NSString *)title
|
||||
{
|
||||
self.basePlacePageView.titleLabel.text = title;
|
||||
[self.basePlacePageView layoutIfNeeded];
|
||||
}
|
||||
|
||||
- (IBAction)didTap:(UITapGestureRecognizer *)sender
|
||||
{
|
||||
// This method should be оverridden if you want to process custom tap.
|
||||
|
|
|
@ -1,10 +1,22 @@
|
|||
#import "MWMTableViewCell.h"
|
||||
|
||||
@protocol MWMPlacePageBookmarkDelegate <NSObject>
|
||||
|
||||
- (void)reloadBookmark;
|
||||
- (void)editBookmarkTap;
|
||||
- (void)moreTap;
|
||||
|
||||
@end
|
||||
|
||||
@class MWMPlacePage;
|
||||
|
||||
@interface MWMPlacePageBookmarkCell : MWMTableViewCell
|
||||
|
||||
- (void)config:(MWMPlacePage *)placePage forHeight:(BOOL)forHeight;
|
||||
- (void)configWithText:(NSString *)text
|
||||
delegate:(id<MWMPlacePageBookmarkDelegate>)delegate
|
||||
placePageWidth:(CGFloat)width
|
||||
isOpen:(BOOL)isOpen
|
||||
isHtml:(BOOL)isHtml;
|
||||
|
||||
- (CGFloat)cellHeight;
|
||||
|
||||
|
|
|
@ -1,191 +1,173 @@
|
|||
#import "MWMBasePlacePageView.h"
|
||||
#import "MWMPlacePage.h"
|
||||
#import "MWMPlacePageBookmarkCell.h"
|
||||
#import "MWMPlacePageEntity.h"
|
||||
#import "MWMPlacePageViewManager.h"
|
||||
#import "MWMTextView.h"
|
||||
#import "Statistics.h"
|
||||
|
||||
extern CGFloat const kBookmarkCellHeight = 136.0;
|
||||
#import "UIColor+MapsMeColor.h"
|
||||
|
||||
static CGFloat const kSeparatorAndTitleHeight = 52.0;
|
||||
namespace
|
||||
{
|
||||
CGFloat const kBoundedTextViewHeight = 240.;
|
||||
CGFloat const kTextViewTopOffset = 12.;
|
||||
CGFloat const kMoreButtonHeight = 33.;
|
||||
CGFloat const kTextViewLeft = 16.;
|
||||
|
||||
static NSUInteger sWebViewHeight = 0;
|
||||
} // namespace
|
||||
|
||||
@interface MWMPlacePageBookmarkCell () <UITextFieldDelegate, UIWebViewDelegate>
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UITextField * title;
|
||||
@property (weak, nonatomic) IBOutlet UIButton * categoryButton;
|
||||
@property (weak, nonatomic) IBOutlet UIButton * markButton;
|
||||
@property (weak, nonatomic) IBOutlet UITextView * textView;
|
||||
@property (weak, nonatomic) IBOutlet UIButton * moreButton;
|
||||
@property (weak, nonatomic) IBOutlet UIButton * editButton;
|
||||
@property (weak, nonatomic) IBOutlet UIImageView * separator;
|
||||
@property (weak, nonatomic) IBOutlet UIImageView * gradient;
|
||||
@property (weak, nonatomic) IBOutlet UIImageView * spinner;
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UIView * note;
|
||||
@property (weak, nonatomic) IBOutlet UILabel * noteLabel;
|
||||
@property (weak, nonatomic) IBOutlet UIWebView * noteWebView;
|
||||
@property (weak, nonatomic) IBOutlet NSLayoutConstraint * noteViewHeight;
|
||||
@property (weak, nonatomic) IBOutlet UIButton * editBookmarkButton;
|
||||
@property (weak, nonatomic) IBOutlet NSLayoutConstraint * textViewTopOffset;
|
||||
@property (weak, nonatomic) IBOutlet NSLayoutConstraint * textViewBottomOffset;
|
||||
@property (weak, nonatomic) IBOutlet NSLayoutConstraint * textViewHeight;
|
||||
@property (weak, nonatomic) IBOutlet NSLayoutConstraint * moreButtonHeight;
|
||||
|
||||
@property (weak, nonatomic) MWMPlacePage * placePage;
|
||||
@property (weak, nonatomic) id<MWMPlacePageBookmarkDelegate> delegate;
|
||||
|
||||
@property (nonatomic) BOOL forHeight;
|
||||
|
||||
@property (nonatomic) NSString * webViewContent;
|
||||
@property (copy, nonatomic) NSAttributedString * attributedHtml;
|
||||
@property (copy, nonatomic) NSString * cachedHtml;
|
||||
|
||||
@end
|
||||
|
||||
@implementation MWMPlacePageBookmarkCell
|
||||
|
||||
- (void)config:(MWMPlacePage *)placePage forHeight:(BOOL)forHeight
|
||||
- (void)configWithText:(NSString *)text
|
||||
delegate:(id<MWMPlacePageBookmarkDelegate>)delegate
|
||||
placePageWidth:(CGFloat)width
|
||||
isOpen:(BOOL)isOpen
|
||||
isHtml:(BOOL)isHtml
|
||||
{
|
||||
self.placePage = placePage;
|
||||
self.forHeight = forHeight;
|
||||
|
||||
[self configNote];
|
||||
|
||||
if (forHeight && self.entity.isHTMLDescription)
|
||||
return;
|
||||
|
||||
self.title.text = self.entity.bookmarkTitle;
|
||||
[self.categoryButton setTitle:[NSString stringWithFormat:@"%@ >", self.entity.bookmarkCategory]
|
||||
forState:UIControlStateNormal];
|
||||
[self.markButton
|
||||
setImage:[UIImage imageNamed:[NSString stringWithFormat:@"%@-on", self.entity.bookmarkColor]]
|
||||
forState:UIControlStateNormal];
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self
|
||||
selector:@selector(keyboardWillShown:)
|
||||
name:UIKeyboardWillShowNotification
|
||||
object:nil];
|
||||
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self
|
||||
selector:@selector(keyboardWillBeHidden)
|
||||
name:UIKeyboardWillHideNotification
|
||||
object:nil];
|
||||
self.delegate = delegate;
|
||||
self.textView.width = width - 2 * kTextViewLeft;
|
||||
BOOL const isEmpty = text.length == 0;
|
||||
if (isEmpty)
|
||||
[self configEmptyDescription];
|
||||
else if (isHtml)
|
||||
[self configHtmlDescription:text isOpen:isOpen];
|
||||
else
|
||||
[self configPlaintTextDescription:text isOpen:isOpen];
|
||||
}
|
||||
|
||||
- (void)configNote
|
||||
- (void)configEmptyDescription
|
||||
{
|
||||
if (self.entity.bookmarkDescription.length == 0)
|
||||
self.textView.hidden = self.separator.hidden = self.gradient.hidden = self.moreButton.hidden = self.spinner.hidden = YES;
|
||||
self.textViewTopOffset.constant = self.textViewBottomOffset.constant = self.textViewHeight.constant =
|
||||
self.moreButtonHeight.constant = 0;
|
||||
}
|
||||
|
||||
- (void)startSpinner
|
||||
{
|
||||
self.editButton.hidden = YES;
|
||||
NSUInteger const animationImagesCount = 12;
|
||||
NSMutableArray * animationImages = [NSMutableArray arrayWithCapacity:animationImagesCount];
|
||||
NSString * postfix = [UIColor isNightMode] ? @"dark" : @"light";
|
||||
for (NSUInteger i = 0; i < animationImagesCount; ++i)
|
||||
animationImages[i] = [UIImage imageNamed:[NSString stringWithFormat:@"Spinner_%@_%@", @(i+1), postfix]];
|
||||
|
||||
self.spinner.animationDuration = 0.8;
|
||||
self.spinner.animationImages = animationImages;
|
||||
self.spinner.hidden = NO;
|
||||
[self.spinner startAnimating];
|
||||
}
|
||||
|
||||
- (void)stopSpinner
|
||||
{
|
||||
[self.spinner stopAnimating];
|
||||
self.editButton.hidden = NO;
|
||||
self.spinner.hidden = YES;
|
||||
}
|
||||
|
||||
- (void)configPlaintTextDescription:(NSString *)text isOpen:(BOOL)isOpen
|
||||
{
|
||||
self.spinner.hidden = YES;
|
||||
self.textView.scrollEnabled = YES;
|
||||
self.textViewTopOffset.constant = kTextViewTopOffset;
|
||||
self.textView.hidden = self.separator.hidden = NO;
|
||||
self.textView.text = text;
|
||||
CGFloat const textViewHeight = self.textView.contentSize.height;
|
||||
if (textViewHeight > kBoundedTextViewHeight && !isOpen)
|
||||
{
|
||||
self.note.hidden = YES;
|
||||
[self.editBookmarkButton setTitle:L(@"description") forState:UIControlStateNormal];
|
||||
self.textViewHeight.constant = kBoundedTextViewHeight;
|
||||
self.moreButton.hidden = self.gradient.hidden = NO;
|
||||
self.moreButtonHeight.constant = kMoreButtonHeight;
|
||||
self.textViewBottomOffset.constant = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
self.note.hidden = NO;
|
||||
[self.editBookmarkButton setTitle:L(@"edit") forState:UIControlStateNormal];
|
||||
if (self.entity.isHTMLDescription)
|
||||
self.textViewHeight.constant = textViewHeight;
|
||||
self.moreButton.hidden = self.gradient.hidden = YES;
|
||||
self.moreButtonHeight.constant = 0;
|
||||
self.textViewBottomOffset.constant = kTextViewTopOffset;
|
||||
}
|
||||
self.textView.scrollEnabled = NO;
|
||||
}
|
||||
|
||||
- (void)configHtmlDescription:(NSString *)text isOpen:(BOOL)isOpen
|
||||
{
|
||||
// html already was rendered and text is same as text which was cached into html
|
||||
if (self.attributedHtml && [self.cachedHtml isEqualToString:text])
|
||||
{
|
||||
self.textView.scrollEnabled = YES;
|
||||
self.textViewTopOffset.constant = kTextViewTopOffset;
|
||||
self.textView.hidden = self.separator.hidden = NO;
|
||||
self.textView.attributedText = self.attributedHtml;
|
||||
CGFloat const textViewHeight = self.textView.contentSize.height;
|
||||
if (textViewHeight > kBoundedTextViewHeight && !isOpen)
|
||||
{
|
||||
self.noteWebView.hidden = NO;
|
||||
self.noteLabel.hidden = YES;
|
||||
if (!self.forHeight && ![self.webViewContent isEqualToString:self.entity.bookmarkDescription])
|
||||
{
|
||||
sWebViewHeight = 0.0;
|
||||
self.webViewContent = self.entity.bookmarkDescription;
|
||||
[self.noteWebView loadHTMLString:self.entity.bookmarkDescription baseURL:nil];
|
||||
self.noteWebView.scrollView.scrollEnabled = NO;
|
||||
}
|
||||
self.textViewHeight.constant = kBoundedTextViewHeight;
|
||||
self.moreButton.hidden = self.gradient.hidden = NO;
|
||||
self.moreButtonHeight.constant = kMoreButtonHeight;
|
||||
self.textViewBottomOffset.constant = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
self.noteWebView.hidden = YES;
|
||||
self.noteLabel.hidden = NO;
|
||||
self.noteLabel.text = self.entity.bookmarkDescription;
|
||||
[self.noteLabel sizeToFit];
|
||||
self.noteViewHeight.constant = kSeparatorAndTitleHeight + self.noteLabel.height;
|
||||
self.textViewHeight.constant = textViewHeight;
|
||||
self.moreButton.hidden = self.gradient.hidden = YES;
|
||||
self.moreButtonHeight.constant = 0;
|
||||
self.textViewBottomOffset.constant = kTextViewTopOffset;
|
||||
}
|
||||
self.textView.scrollEnabled = NO;
|
||||
}
|
||||
else
|
||||
{
|
||||
[self configEmptyDescription];
|
||||
[self startSpinner];
|
||||
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^
|
||||
{
|
||||
self.cachedHtml = text;
|
||||
self.attributedHtml = [[NSAttributedString alloc]
|
||||
initWithData:[text dataUsingEncoding:NSUnicodeStringEncoding]
|
||||
options:@{NSDocumentTypeDocumentAttribute: NSHTMLTextDocumentType}
|
||||
documentAttributes:nil
|
||||
error:nil];
|
||||
dispatch_async(dispatch_get_main_queue(), ^
|
||||
{
|
||||
[self stopSpinner];
|
||||
[self.delegate reloadBookmark];
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
- (void)keyboardWillShown:(NSNotification *)aNotification
|
||||
- (IBAction)moreTap
|
||||
{
|
||||
if ([self.title isEditing])
|
||||
[self.placePage willStartEditingBookmarkTitle];
|
||||
}
|
||||
|
||||
- (void)keyboardWillBeHidden
|
||||
{
|
||||
if ([self.title isEditing])
|
||||
[self.placePage willFinishEditingBookmarkTitle:self.title.text.length > 0 ? self.title.text : self.entity.title];
|
||||
}
|
||||
|
||||
- (void)textFieldDidEndEditing:(UITextField *)textField
|
||||
{
|
||||
self.entity.bookmarkTitle = textField.text.length > 0 ? textField.text : self.entity.title;
|
||||
[self.entity synchronize];
|
||||
[textField resignFirstResponder];
|
||||
}
|
||||
|
||||
- (BOOL)textFieldShouldClear:(UITextField *)textField
|
||||
{
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (BOOL)textFieldShouldReturn:(UITextField *)textField
|
||||
{
|
||||
[textField resignFirstResponder];
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
if (!self.forHeight)
|
||||
[[NSNotificationCenter defaultCenter] removeObserver:self];
|
||||
}
|
||||
|
||||
- (IBAction)colorPickerButtonTap
|
||||
{
|
||||
[self.placePage changeBookmarkColor];
|
||||
[self endEditing:YES];
|
||||
}
|
||||
|
||||
- (IBAction)categoryButtonTap
|
||||
{
|
||||
[Statistics logEvent:kStatEventName(kStatPlacePage, kStatChangeBookmarkGroup)];
|
||||
[self.placePage changeBookmarkCategory];
|
||||
[self endEditing:YES];
|
||||
[self.delegate moreTap];
|
||||
}
|
||||
|
||||
- (IBAction)editTap
|
||||
{
|
||||
[Statistics logEvent:kStatEventName(kStatPlacePage, kStatChangeBookmarkDescription)];
|
||||
[self.placePage changeBookmarkDescription];
|
||||
[self endEditing:YES];
|
||||
}
|
||||
|
||||
- (MWMPlacePageEntity *)entity
|
||||
{
|
||||
return self.placePage.manager.entity;
|
||||
[self.delegate editBookmarkTap];
|
||||
}
|
||||
|
||||
- (CGFloat)cellHeight
|
||||
{
|
||||
CGFloat const noteViewHeight = self.entity.isHTMLDescription ? sWebViewHeight : self.noteViewHeight.constant;
|
||||
return kBookmarkCellHeight + ceil(self.note.hidden ? 0.0 : noteViewHeight);
|
||||
}
|
||||
|
||||
#pragma mark - UIWebViewDelegate
|
||||
|
||||
- (void)webViewDidFinishLoad:(UIWebView * _Nonnull)webView
|
||||
{
|
||||
webView.height = webView.scrollView.contentSize.height;
|
||||
NSUInteger webViewHeight = ceil(kSeparatorAndTitleHeight + webView.height);
|
||||
self.noteViewHeight.constant = webViewHeight;
|
||||
if (sWebViewHeight != webViewHeight)
|
||||
{
|
||||
sWebViewHeight = webViewHeight;
|
||||
[self.placePage reloadBookmark];
|
||||
}
|
||||
}
|
||||
|
||||
- (BOOL)webView:(UIWebView *)inWeb
|
||||
shouldStartLoadWithRequest:(NSURLRequest *)inRequest
|
||||
navigationType:(UIWebViewNavigationType)inType
|
||||
{
|
||||
if (inType == UIWebViewNavigationTypeLinkClicked)
|
||||
{
|
||||
[[UIApplication sharedApplication] openURL:[inRequest URL]];
|
||||
return NO;
|
||||
}
|
||||
return YES;
|
||||
return self.textViewTopOffset.constant + self.textViewHeight.constant +
|
||||
self.textViewBottomOffset.constant + self.moreButtonHeight.constant +
|
||||
self.separator.height + self.editButton.height;
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
#include "indexer/feature_meta.hpp"
|
||||
|
||||
#include "storage/index.hpp"
|
||||
|
||||
typedef NS_ENUM(NSUInteger, MWMPlacePageCellType)
|
||||
{
|
||||
MWMPlacePageCellTypePostcode = feature::Metadata::EType::FMD_COUNT,
|
||||
|
@ -36,7 +38,7 @@ using MWMPlacePageCellTypeValueMap = map<MWMPlacePageCellType, string>;
|
|||
@interface MWMPlacePageEntity : NSObject
|
||||
|
||||
@property (copy, nonatomic) NSString * title;
|
||||
@property (copy, nonatomic) NSString * category;
|
||||
@property (copy, nonatomic) NSString * subtitle;
|
||||
@property (copy, nonatomic) NSString * address;
|
||||
@property (copy, nonatomic) NSString * bookmarkTitle;
|
||||
@property (copy, nonatomic) NSString * bookmarkCategory;
|
||||
|
@ -63,5 +65,8 @@ using MWMPlacePageCellTypeValueMap = map<MWMPlacePageCellType, string>;
|
|||
|
||||
- (NSString *)getCellValue:(MWMPlacePageCellType)cellType;
|
||||
- (place_page::Info const &)info;
|
||||
// TODO (SeregaE, Ilia): uncoment this line and method's implementation in .mm file,
|
||||
// or please implement better solution.
|
||||
//- (storage::TCountryId const &)countryId;
|
||||
|
||||
@end
|
||||
|
|
|
@ -87,15 +87,16 @@ void initFieldsMap()
|
|||
{
|
||||
self.title = @(m_info.GetTitle().c_str());
|
||||
self.address = @(m_info.GetAddress().c_str());
|
||||
self.subtitle = @(m_info.GetSubtitle().c_str());
|
||||
}
|
||||
|
||||
- (void)configureFeature
|
||||
{
|
||||
// Category can also be custom-formatted, please check m_info getters.
|
||||
self.category = @(m_info.GetSubtitle().c_str());
|
||||
// TODO(Vlad): Refactor using osm::Props instead of direct Metadata access.
|
||||
feature::Metadata const & md = m_info.GetMetadata();
|
||||
for (auto const type : md.GetPresentTypes())
|
||||
auto const types = md.GetPresentTypes();
|
||||
for (auto const type : types)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
|
@ -123,7 +124,7 @@ void initFieldsMap()
|
|||
BookmarkData const & data = static_cast<Bookmark const *>(cat->GetUserMark(bac.second))->GetData();
|
||||
|
||||
self.bookmarkTitle = @(data.GetName().c_str());
|
||||
self.bookmarkCategory = @(cat->GetName().c_str());
|
||||
self.bookmarkCategory = @(m_info.GetBookmarkCategoryName().c_str());
|
||||
string const & description = data.GetDescription();
|
||||
self.bookmarkDescription = @(description.c_str());
|
||||
_isHTMLDescription = strings::IsHTML(description);
|
||||
|
@ -178,6 +179,12 @@ void initFieldsMap()
|
|||
return m_info.GetID();
|
||||
}
|
||||
|
||||
//- (storage::TCountryId const &)countryId
|
||||
//{
|
||||
// TODO(SeregaE): We probably should store countryId in instance of place_page::Info and here will be something like
|
||||
// return m_info.CountryId();
|
||||
//}
|
||||
|
||||
- (BOOL)isMyPosition
|
||||
{
|
||||
return m_info.IsMyPosition();
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
#import <UIKit/UIKit.h>
|
||||
|
||||
@class MWMiPhonePortraitPlacePage;
|
||||
|
||||
@interface MWMPlacePageNavigationBar : UIView
|
||||
@interface MWMPlacePageNavigationBar : SolidTouchView
|
||||
|
||||
+ (void)dismissNavigationBar;
|
||||
+ (void)showNavigationBarForPlacePage:(MWMiPhonePortraitPlacePage *)placePage;
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#import <objc/runtime.h>
|
||||
|
||||
static NSString * const kPlacePageNavigationBarNibName = @"PlacePageNavigationBar";
|
||||
static CGFloat const kNavigationBarHeight = 64.;
|
||||
static CGFloat const kNavigationBarHeight = 36.;
|
||||
|
||||
static inline CGPoint const openCenter(CGFloat xPosition)
|
||||
{
|
||||
|
@ -22,7 +22,6 @@ static inline CGPoint const dismissCenter(CGFloat xPosition)
|
|||
|
||||
@interface MWMPlacePageNavigationBar ()
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UILabel * titleLabel;
|
||||
@property (weak, nonatomic) MWMiPhonePortraitPlacePage * placePage;
|
||||
|
||||
@end
|
||||
|
@ -53,8 +52,6 @@ static inline CGPoint const dismissCenter(CGFloat xPosition)
|
|||
}
|
||||
|
||||
navBar.placePage = placePage;
|
||||
MWMPlacePageEntity * entity = placePage.manager.entity;
|
||||
navBar.titleLabel.text = entity.isMyPosition ? entity.bookmarkTitle : entity.title;
|
||||
[navBar show];
|
||||
}
|
||||
|
||||
|
@ -98,7 +95,7 @@ static inline CGPoint const dismissCenter(CGFloat xPosition)
|
|||
return navBar;
|
||||
}
|
||||
|
||||
- (IBAction)backTap:(id)sender
|
||||
- (IBAction)dismissTap
|
||||
{
|
||||
[Statistics logEvent:kStatEventName(kStatPlacePage, kStatBack)];
|
||||
[self dismiss];
|
||||
|
@ -111,10 +108,4 @@ static inline CGPoint const dismissCenter(CGFloat xPosition)
|
|||
self.origin = CGPointZero;
|
||||
}
|
||||
|
||||
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
|
||||
{
|
||||
// Prevent super call to stop event propagation
|
||||
// [super touchesBegan:touches withEvent:event];
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
@ -113,7 +113,7 @@ extern NSString * const kBookmarksChangedNotification;
|
|||
if (self.entity.isMyPosition)
|
||||
{
|
||||
BOOL hasSpeed;
|
||||
self.entity.category = [[MapsAppDelegate theApp].locationManager formattedSpeedAndAltitude:hasSpeed];
|
||||
self.entity.subtitle = [[MapsAppDelegate theApp].locationManager formattedSpeedAndAltitude:hasSpeed];
|
||||
}
|
||||
self.placePage.parentViewHeight = self.ownerViewController.view.height;
|
||||
[self.placePage configure];
|
||||
|
@ -219,8 +219,8 @@ extern NSString * const kBookmarksChangedNotification;
|
|||
name = self.entity.title;
|
||||
else if (self.entity.address.length > 0)
|
||||
name = self.entity.address;
|
||||
else if (self.entity.category.length > 0)
|
||||
name = self.entity.category;
|
||||
else if (self.entity.subtitle.length > 0)
|
||||
name = self.entity.subtitle;
|
||||
else if (self.entity.isBookmark)
|
||||
name = self.entity.bookmarkTitle;
|
||||
else
|
||||
|
@ -306,6 +306,7 @@ extern NSString * const kBookmarksChangedNotification;
|
|||
object:nil
|
||||
userInfo:nil];
|
||||
[self updateDistance];
|
||||
[self.placePage removeBookmark];
|
||||
}
|
||||
|
||||
- (void)reloadBookmark
|
||||
|
|
|
@ -3,5 +3,6 @@
|
|||
@interface MWMTextView : UITextView
|
||||
|
||||
@property (copy, nonatomic) NSString * placeholder;
|
||||
@property (nonatomic, readonly) UILabel * placeholderView;
|
||||
|
||||
@end
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
@interface MWMTextView ()
|
||||
|
||||
@property (nonatomic) UILabel * placeholderView;
|
||||
@property (nonatomic, readwrite) UILabel * placeholderView;
|
||||
|
||||
@end
|
||||
|
||||
|
|
|
@ -195,18 +195,6 @@ static CGFloat const kKeyboardOffset = 12.;
|
|||
}];
|
||||
}
|
||||
|
||||
- (void)willStartEditingBookmarkTitle
|
||||
{
|
||||
[super willStartEditingBookmarkTitle];
|
||||
[self updatePlacePagePosition];
|
||||
}
|
||||
|
||||
- (void)willFinishEditingBookmarkTitle:(NSString *)title
|
||||
{
|
||||
[super willFinishEditingBookmarkTitle:title];
|
||||
[self updatePlacePageLayoutAnimated:NO];
|
||||
}
|
||||
|
||||
- (void)addBookmark
|
||||
{
|
||||
[super addBookmark];
|
||||
|
@ -230,29 +218,6 @@ static CGFloat const kKeyboardOffset = 12.;
|
|||
[self updatePlacePageLayoutAnimated:YES];
|
||||
}
|
||||
|
||||
- (void)changeBookmarkColor
|
||||
{
|
||||
MWMBookmarkColorViewController * controller = [[MWMBookmarkColorViewController alloc] initWithNibName:[MWMBookmarkColorViewController className] bundle:nil];
|
||||
controller.iPadOwnerNavigationController = self.navigationController;
|
||||
controller.placePageManager = self.manager;
|
||||
[self.navigationController pushViewController:controller animated:YES];
|
||||
}
|
||||
|
||||
- (void)changeBookmarkCategory
|
||||
{
|
||||
SelectSetVC * controller = [[SelectSetVC alloc] initWithPlacePageManager:self.manager];
|
||||
controller.iPadOwnerNavigationController = self.navigationController;
|
||||
[self.navigationController pushViewController:controller animated:YES];
|
||||
}
|
||||
|
||||
- (void)changeBookmarkDescription
|
||||
{
|
||||
MWMBookmarkDescriptionViewController * controller = [[MWMBookmarkDescriptionViewController alloc] initWithPlacePageManager:self.manager];
|
||||
controller.iPadOwnerNavigationController = self.navigationController;
|
||||
[self.navigationController pushViewController:controller animated:YES];
|
||||
[self updatePlacePageLayoutAnimated:NO];
|
||||
}
|
||||
|
||||
- (IBAction)didPan:(UIPanGestureRecognizer *)sender
|
||||
{
|
||||
UIView * view = self.navigationController.view;
|
||||
|
@ -301,7 +266,7 @@ static CGFloat const kKeyboardOffset = 12.;
|
|||
UITableView * featureTable = self.basePlacePageView.featureTable;
|
||||
CGFloat const height = self.navigationController.view.height;
|
||||
CGFloat const tableContentHeight = featureTable.contentSize.height;
|
||||
CGFloat const headerHeight = self.basePlacePageView.separatorView.maxY;
|
||||
CGFloat const headerHeight = self.basePlacePageView.ppPreview.height;
|
||||
CGFloat const actionBarHeight = self.actionBar.height;
|
||||
CGFloat const anchorHeight = self.anchorImageView.height;
|
||||
CGFloat const availableTableHeight = height - headerHeight - actionBarHeight - anchorHeight;
|
||||
|
@ -318,18 +283,6 @@ static CGFloat const kKeyboardOffset = 12.;
|
|||
}
|
||||
}
|
||||
|
||||
- (void)keyboardWillShow:(NSNotification *)aNotification
|
||||
{
|
||||
[super keyboardWillShow:aNotification];
|
||||
[self refresh];
|
||||
}
|
||||
|
||||
- (void)keyboardWillHide
|
||||
{
|
||||
[super keyboardWillHide];
|
||||
[self refresh];
|
||||
}
|
||||
|
||||
- (CGFloat)getAvailableHeight
|
||||
{
|
||||
CGFloat const bottomOffset = self.keyboardHeight > 0.0 ? kKeyboardOffset : kBottomOffset;
|
||||
|
|
|
@ -66,7 +66,7 @@ typedef NS_ENUM(NSUInteger, MWMiPhoneLandscapePlacePageState)
|
|||
CGFloat const actionBarHeight = self.actionBar.height;
|
||||
UITableView * featureTable = self.basePlacePageView.featureTable;
|
||||
CGFloat const tableContentHeight = featureTable.contentSize.height;
|
||||
CGFloat const headerViewHeight = self.basePlacePageView.separatorView.maxY;
|
||||
CGFloat const headerViewHeight = self.basePlacePageView.ppPreview.height;
|
||||
CGFloat const availableTableHeight = height - headerViewHeight - actionBarHeight;
|
||||
CGFloat const externalHeight = tableContentHeight - availableTableHeight;
|
||||
if (externalHeight > 0)
|
||||
|
@ -137,32 +137,6 @@ typedef NS_ENUM(NSUInteger, MWMiPhoneLandscapePlacePageState)
|
|||
}
|
||||
}
|
||||
|
||||
- (void)willStartEditingBookmarkTitle
|
||||
{
|
||||
[super willStartEditingBookmarkTitle];
|
||||
CGFloat const statusBarHeight = [[UIApplication sharedApplication] statusBarFrame].size.height;
|
||||
MWMBasePlacePageView * basePPV = self.basePlacePageView;
|
||||
UITableView const * tableView = basePPV.featureTable;
|
||||
CGFloat const baseViewHeight = basePPV.height;
|
||||
CGFloat const tableHeight = tableView.contentSize.height;
|
||||
CGFloat const headerViewHeight = baseViewHeight - tableHeight;
|
||||
CGFloat const titleOriginY = tableHeight - kBookmarkCellHeight - tableView.contentOffset.y;
|
||||
|
||||
[UIView animateWithDuration:kDefaultAnimationDuration animations:^
|
||||
{
|
||||
self.basePlacePageView.transform = CGAffineTransformMakeTranslation(0., statusBarHeight - headerViewHeight - titleOriginY);
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)willFinishEditingBookmarkTitle:(NSString *)title
|
||||
{
|
||||
[super willFinishEditingBookmarkTitle:title];
|
||||
[UIView animateWithDuration:kDefaultAnimationDuration animations:^
|
||||
{
|
||||
self.basePlacePageView.transform = CGAffineTransformMakeTranslation(0., 0.);
|
||||
}];
|
||||
}
|
||||
|
||||
#pragma mark - Properties
|
||||
|
||||
- (void)setState:(MWMiPhoneLandscapePlacePageState)state
|
||||
|
|
|
@ -13,9 +13,6 @@
|
|||
|
||||
#include "Framework.h"
|
||||
|
||||
extern CGFloat const kBottomPlacePageOffset;
|
||||
extern CGFloat const kLabelsBetweenOffset;
|
||||
|
||||
typedef NS_ENUM(NSUInteger, MWMiPhonePortraitPlacePageState)
|
||||
{
|
||||
MWMiPhonePortraitPlacePageStateClosed,
|
||||
|
@ -192,12 +189,7 @@ typedef NS_ENUM(NSUInteger, MWMiPhonePortraitPlacePageState)
|
|||
MWMBasePlacePageView * basePPV = self.basePlacePageView;
|
||||
CGFloat const anchorHeight = self.anchorImageView.height;
|
||||
CGFloat const actionBarHeight = self.actionBar.height;
|
||||
BOOL const typeIsNotEmpty = basePPV.typeLabel.text.length > 0;
|
||||
BOOL const addressIsNotEmpty = basePPV.addressLabel.text.length > 0;
|
||||
CGFloat const titleHeight = basePPV.titleLabel.height + (typeIsNotEmpty ? kLabelsBetweenOffset : 0);
|
||||
CGFloat const typeHeight = typeIsNotEmpty ? basePPV.typeLabel.height + (addressIsNotEmpty ? kLabelsBetweenOffset : 0) : 0;
|
||||
CGFloat const addressHeight = addressIsNotEmpty ? basePPV.addressLabel.height : 0;
|
||||
return anchorHeight + titleHeight + typeHeight + addressHeight + kBottomPlacePageOffset + actionBarHeight;
|
||||
return anchorHeight + basePPV.ppPreview.height /*+ kBottomPlacePageOffset*/ + actionBarHeight - 1;
|
||||
}
|
||||
|
||||
#pragma mark - Actions
|
||||
|
@ -287,21 +279,6 @@ typedef NS_ENUM(NSUInteger, MWMiPhonePortraitPlacePageState)
|
|||
}
|
||||
}
|
||||
|
||||
- (void)willStartEditingBookmarkTitle
|
||||
{
|
||||
[super willStartEditingBookmarkTitle];
|
||||
if (self.isHover)
|
||||
self.state = MWMiPhonePortraitPlacePageStateHover;
|
||||
else
|
||||
self.state = MWMiPhonePortraitPlacePageStateOpen;
|
||||
}
|
||||
|
||||
- (void)willFinishEditingBookmarkTitle:(NSString *)title
|
||||
{
|
||||
[super willFinishEditingBookmarkTitle:title];
|
||||
[self refresh];
|
||||
}
|
||||
|
||||
- (void)setAnchorImage
|
||||
{
|
||||
NSString * anchorImageName = nil;
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#import "MWMAuthorizationCommon.h"
|
||||
#import "MWMAuthorizationLoginViewController.h"
|
||||
#import "MWMAuthorizationWebViewLoginViewController.h"
|
||||
#import "MWMEditBookmarkController.h"
|
||||
#import "MWMEditorViewController.h"
|
||||
#import "MWMFirstLaunchController.h"
|
||||
#import "MWMFrameworkListener.h"
|
||||
|
@ -872,6 +873,17 @@ BOOL gIsFirstMyPositionMode = YES;
|
|||
MWMAuthorizationWebViewLoginViewController * dvc = segue.destinationViewController;
|
||||
dvc.authType = MWMWebViewAuthorizationTypeGoogle;
|
||||
}
|
||||
else if ([segue.identifier isEqualToString:@"PP2BookmarkEditingIPAD"])
|
||||
{
|
||||
UINavigationController * nav = segue.destinationViewController;
|
||||
MWMEditBookmarkController * dvc = nav.viewControllers.firstObject;
|
||||
dvc.manager = sender;
|
||||
}
|
||||
else if ([segue.identifier isEqualToString:@"PP2BookmarkEditing"])
|
||||
{
|
||||
MWMEditBookmarkController * dvc = segue.destinationViewController;
|
||||
dvc.manager = sender;
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - Properties
|
||||
|
|
|
@ -1,159 +1,77 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9532" systemVersion="15D21" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
|
||||
<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="9530"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" rowHeight="223" id="jfp-wb-Z7G" customClass="MWMPlacePageBookmarkCell">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="223"/>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" rowHeight="253" id="zRR-Mr-Dr9" customClass="MWMPlacePageBookmarkCell">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="253"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="jfp-wb-Z7G" id="kUu-ao-FYN">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="222"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="zRR-Mr-Dr9" id="ToM-m7-TTO">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="252"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="ic_bookmark" translatesAutoresizingMaskIntoConstraints="NO" id="NJ3-lK-ziZ" userLabel="Bookmark icon">
|
||||
<rect key="frame" x="16" y="8" width="28" height="28"/>
|
||||
<textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" editable="NO" textAlignment="natural" translatesAutoresizingMaskIntoConstraints="NO" id="xBa-ZL-geT">
|
||||
<rect key="frame" x="16" y="12" width="288" height="161"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="28" id="puH-vO-c70"/>
|
||||
<constraint firstAttribute="height" constant="28" id="wNH-iS-hGK"/>
|
||||
<constraint firstAttribute="height" priority="750" constant="161" id="YwK-YQ-Gdj"/>
|
||||
</constraints>
|
||||
<string key="text">Lorem ipsum dolor sit er elit lamet, consectetaur cillium adipisicing pecu, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Nam liber te conscient to factor tum poen legum odioque civiuda.</string>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="14"/>
|
||||
<textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="coloring" value="MWMBlack"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</imageView>
|
||||
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" minimumFontSize="17" clearButtonMode="whileEditing" translatesAutoresizingMaskIntoConstraints="NO" id="VLh-WI-T7X" userLabel="Title">
|
||||
<rect key="frame" x="60" y="0.0" width="208" height="44"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="44" id="ycn-hE-8e1"/>
|
||||
</constraints>
|
||||
<color key="textColor" red="0.12941176469999999" green="0.12941176469999999" blue="0.12941176469999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="light" pointSize="16"/>
|
||||
<textInputTraits key="textInputTraits" autocapitalizationType="sentences" autocorrectionType="no" returnKeyType="done"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="localizedPlaceholder" value="name"/>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="colorName" value="blackPrimaryText"/>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="fontName" value="regular16"/>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="colorName" value="blackPrimaryText"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
<connections>
|
||||
<outlet property="delegate" destination="jfp-wb-Z7G" id="00o-sa-QS2"/>
|
||||
</connections>
|
||||
</textField>
|
||||
<button opaque="NO" contentMode="center" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Wax-9r-T5y" userLabel="Mark Button">
|
||||
<rect key="frame" x="280" y="8" width="28" height="28"/>
|
||||
</textView>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="gradient_light" translatesAutoresizingMaskIntoConstraints="NO" id="Dhv-uU-KIw">
|
||||
<rect key="frame" x="16" y="149" width="288" height="24"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="28" id="37w-94-KUu"/>
|
||||
<constraint firstAttribute="width" constant="28" id="Ty5-dA-bOy"/>
|
||||
</constraints>
|
||||
<state key="normal" image="placemark-red-on">
|
||||
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</state>
|
||||
<connections>
|
||||
<action selector="colorPickerButtonTap" destination="jfp-wb-Z7G" eventType="touchUpInside" id="2LS-Ru-Bhb"/>
|
||||
</connections>
|
||||
</button>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="separator_image" translatesAutoresizingMaskIntoConstraints="NO" id="6Sw-sF-BAZ">
|
||||
<rect key="frame" x="60" y="44" width="208" height="1"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="1" id="hnX-4Y-Bbu"/>
|
||||
<constraint firstAttribute="height" constant="24" id="3dE-qr-X2y"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="coloring" value="MWMSeparator"/>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="mwm_name" value="gradient"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</imageView>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="jxG-Qv-eKF" userLabel="Category Button">
|
||||
<rect key="frame" x="60" y="45" width="208" height="44"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" showsTouchWhenHighlighted="YES" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="N4K-Tt-uWI">
|
||||
<rect key="frame" x="0.0" y="173" width="320" height="33"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="44" id="8lM-kf-teP"/>
|
||||
<constraint firstAttribute="height" priority="750" constant="33" id="Z1L-dp-kDG"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" name="HelveticaNeue" family="Helvetica Neue" pointSize="14"/>
|
||||
<state key="normal" title="My marks >">
|
||||
<color key="titleColor" red="0.0" green="0.47843137250000001" blue="1" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<fontDescription key="fontDescription" name="HelveticaNeue" family="Helvetica Neue" pointSize="16"/>
|
||||
<inset key="contentEdgeInsets" minX="16" minY="0.0" maxX="9" maxY="0.0"/>
|
||||
<state key="normal" title="more">
|
||||
<color key="titleColor" red="0.1176470588" green="0.58823529409999997" blue="0.94117647059999998" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</state>
|
||||
<state key="highlighted" backgroundImage="dialog_btn_press"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="fontName" value="regular14"/>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="fontName" value="regular16"/>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="textColorName" value="linkBlue"/>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="textColorHighlightedName" value="linkBlueHighlighted"/>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="localizedText" value="bookmark_more"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
<connections>
|
||||
<action selector="categoryButtonTap" destination="jfp-wb-Z7G" eventType="touchUpInside" id="e4D-w3-PQb"/>
|
||||
<action selector="moreTap" destination="zRR-Mr-Dr9" eventType="touchUpInside" id="i0t-el-vaa"/>
|
||||
</connections>
|
||||
</button>
|
||||
<view hidden="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="f8i-PA-TJb" userLabel="Note">
|
||||
<rect key="frame" x="0.0" y="89" width="320" height="88"/>
|
||||
<subviews>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="separator_image" translatesAutoresizingMaskIntoConstraints="NO" id="PPH-o3-NeV">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="1"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="1" id="ktm-Nz-rdC"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="coloring" value="MWMSeparator"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Note" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="XF8-Ny-HSu" userLabel="Title">
|
||||
<rect key="frame" x="16" y="13" width="31" height="17"/>
|
||||
<fontDescription key="fontDescription" name="HelveticaNeue" family="Helvetica Neue" pointSize="14"/>
|
||||
<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="fontName" value="regular14"/>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="localizedText" value="description"/>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="colorName" value="blackSecondaryText"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" preferredMaxLayoutWidth="288" translatesAutoresizingMaskIntoConstraints="NO" id="fVU-OV-gcK">
|
||||
<rect key="frame" x="16" y="45" width="288" height="20"/>
|
||||
<fontDescription key="fontDescription" name="HelveticaNeue" family="Helvetica Neue" 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="regular17"/>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="colorName" value="blackPrimaryText"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</label>
|
||||
<webView contentMode="scaleToFill" scalesPageToFit="YES" translatesAutoresizingMaskIntoConstraints="NO" id="1yW-c7-l8L">
|
||||
<rect key="frame" x="16" y="37" width="288" height="51"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<dataDetectorType key="dataDetectorTypes" phoneNumber="YES" link="YES"/>
|
||||
<connections>
|
||||
<outlet property="delegate" destination="jfp-wb-Z7G" id="5hv-8L-gOi"/>
|
||||
</connections>
|
||||
</webView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="separator_image" translatesAutoresizingMaskIntoConstraints="NO" id="pNf-9c-nTn">
|
||||
<rect key="frame" x="16" y="207" width="304" height="1"/>
|
||||
<constraints>
|
||||
<constraint firstItem="1yW-c7-l8L" firstAttribute="top" secondItem="XF8-Ny-HSu" secondAttribute="bottom" constant="8" id="1Dv-8c-J8F"/>
|
||||
<constraint firstItem="fVU-OV-gcK" firstAttribute="top" secondItem="XF8-Ny-HSu" secondAttribute="bottom" constant="16" id="32Q-yX-6EP"/>
|
||||
<constraint firstItem="1yW-c7-l8L" firstAttribute="leading" secondItem="f8i-PA-TJb" secondAttribute="leading" constant="16" id="6vP-Tg-Q2p"/>
|
||||
<constraint firstItem="PPH-o3-NeV" firstAttribute="top" secondItem="f8i-PA-TJb" secondAttribute="top" id="Dpa-YG-Typ"/>
|
||||
<constraint firstAttribute="bottom" secondItem="1yW-c7-l8L" secondAttribute="bottom" id="EEq-tP-Q3r"/>
|
||||
<constraint firstAttribute="trailing" secondItem="PPH-o3-NeV" secondAttribute="trailing" id="FAe-rx-XNn"/>
|
||||
<constraint firstAttribute="trailing" secondItem="fVU-OV-gcK" secondAttribute="trailing" constant="16" id="FOU-f4-TaK"/>
|
||||
<constraint firstAttribute="trailing" secondItem="1yW-c7-l8L" secondAttribute="trailing" constant="16" id="HCK-RR-QTa"/>
|
||||
<constraint firstItem="fVU-OV-gcK" firstAttribute="leading" secondItem="f8i-PA-TJb" secondAttribute="leading" constant="16" id="OH6-73-FCW"/>
|
||||
<constraint firstAttribute="height" constant="88" id="P0o-9l-5ht"/>
|
||||
<constraint firstItem="XF8-Ny-HSu" firstAttribute="top" secondItem="PPH-o3-NeV" secondAttribute="bottom" constant="12" id="RpK-qu-swq"/>
|
||||
<constraint firstItem="PPH-o3-NeV" firstAttribute="leading" secondItem="f8i-PA-TJb" secondAttribute="leading" id="hgq-Hu-5tM"/>
|
||||
<constraint firstItem="XF8-Ny-HSu" firstAttribute="leading" secondItem="f8i-PA-TJb" secondAttribute="leading" constant="16" id="t8B-yg-VDs"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="separator_image" translatesAutoresizingMaskIntoConstraints="NO" id="jQd-Tp-1fN">
|
||||
<rect key="frame" x="16" y="177" width="304" height="1"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="1" id="NW5-jJ-qkf"/>
|
||||
<constraint firstAttribute="height" constant="1" id="Mip-wr-Wh8"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="coloring" value="MWMSeparator"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</imageView>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="8KR-m1-j51">
|
||||
<rect key="frame" x="0.0" y="178" width="320" height="44"/>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" showsTouchWhenHighlighted="YES" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="HGn-rC-iSu">
|
||||
<rect key="frame" x="0.0" y="208" width="320" height="44"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="44" id="5rE-hZ-GLl"/>
|
||||
<constraint firstAttribute="height" constant="44" id="OE2-XD-92k"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" name="HelveticaNeue" family="Helvetica Neue" pointSize="16"/>
|
||||
<inset key="contentEdgeInsets" minX="16" minY="0.0" maxX="9" maxY="0.0"/>
|
||||
|
@ -161,77 +79,64 @@
|
|||
<color key="titleColor" red="0.1176470588" green="0.58823529409999997" blue="0.94117647059999998" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</state>
|
||||
<state key="highlighted" backgroundImage="dialog_btn_press"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<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"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
<connections>
|
||||
<action selector="editTap" destination="jfp-wb-Z7G" eventType="touchUpInside" id="IKA-2o-75q"/>
|
||||
<action selector="editTap" destination="zRR-Mr-Dr9" eventType="touchUpInside" id="d1F-RO-oIi"/>
|
||||
</connections>
|
||||
</button>
|
||||
<imageView userInteractionEnabled="NO" contentMode="center" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="ic_arrow_gray_right" translatesAutoresizingMaskIntoConstraints="NO" id="meU-rN-T7y" userLabel="Gray Arrow">
|
||||
<rect key="frame" x="284" y="186" width="28" height="28"/>
|
||||
<imageView hidden="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="fnF-e8-fJX">
|
||||
<rect key="frame" x="142" y="212" width="36" height="36"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="28" id="XOd-bb-dsE"/>
|
||||
<constraint firstAttribute="width" constant="28" id="xnu-q1-DCI"/>
|
||||
<constraint firstAttribute="height" constant="36" id="Hzk-OR-6cV"/>
|
||||
<constraint firstAttribute="width" constant="36" id="rNt-AX-ShZ"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="coloring" value="MWMGray"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</imageView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstItem="8KR-m1-j51" firstAttribute="width" secondItem="f8i-PA-TJb" secondAttribute="width" id="7FM-xU-xDL"/>
|
||||
<constraint firstItem="Wax-9r-T5y" firstAttribute="leading" secondItem="VLh-WI-T7X" secondAttribute="trailing" constant="12" id="7mj-gk-N51"/>
|
||||
<constraint firstAttribute="bottom" secondItem="8KR-m1-j51" secondAttribute="bottom" constant="0.5" id="9NO-0R-Luf"/>
|
||||
<constraint firstItem="8KR-m1-j51" firstAttribute="centerX" secondItem="f8i-PA-TJb" secondAttribute="centerX" id="Fho-1G-DMQ"/>
|
||||
<constraint firstItem="6Sw-sF-BAZ" firstAttribute="width" secondItem="jxG-Qv-eKF" secondAttribute="width" id="JSz-z8-INP"/>
|
||||
<constraint firstAttribute="trailing" secondItem="jQd-Tp-1fN" secondAttribute="trailing" id="RPx-Nz-KRT"/>
|
||||
<constraint firstItem="6Sw-sF-BAZ" firstAttribute="width" secondItem="VLh-WI-T7X" secondAttribute="width" id="Rw1-ja-32Y"/>
|
||||
<constraint firstItem="jQd-Tp-1fN" firstAttribute="leading" secondItem="kUu-ao-FYN" secondAttribute="leading" constant="16" id="V9A-XV-GR9"/>
|
||||
<constraint firstItem="VLh-WI-T7X" firstAttribute="leading" secondItem="kUu-ao-FYN" secondAttribute="leading" constant="60" id="XuD-Lr-D6H"/>
|
||||
<constraint firstItem="NJ3-lK-ziZ" firstAttribute="leading" secondItem="kUu-ao-FYN" secondAttribute="leading" constant="16" id="Z9y-hZ-0pk"/>
|
||||
<constraint firstItem="6Sw-sF-BAZ" firstAttribute="centerX" secondItem="jxG-Qv-eKF" secondAttribute="centerX" id="aCl-Fa-gVd"/>
|
||||
<constraint firstItem="meU-rN-T7y" firstAttribute="trailing" secondItem="8KR-m1-j51" secondAttribute="trailing" constant="-8" id="f7Q-08-8Ix"/>
|
||||
<constraint firstItem="8KR-m1-j51" firstAttribute="top" secondItem="jQd-Tp-1fN" secondAttribute="bottom" id="gay-5M-3os"/>
|
||||
<constraint firstItem="f8i-PA-TJb" firstAttribute="top" secondItem="jxG-Qv-eKF" secondAttribute="bottom" id="jP6-dp-yga"/>
|
||||
<constraint firstItem="VLh-WI-T7X" firstAttribute="top" secondItem="kUu-ao-FYN" secondAttribute="top" id="juQ-wl-6VY"/>
|
||||
<constraint firstItem="f8i-PA-TJb" firstAttribute="leading" secondItem="kUu-ao-FYN" secondAttribute="leading" id="oCY-wT-Wsp"/>
|
||||
<constraint firstItem="Wax-9r-T5y" firstAttribute="centerY" secondItem="VLh-WI-T7X" secondAttribute="centerY" id="pb4-Hs-7GJ"/>
|
||||
<constraint firstItem="NJ3-lK-ziZ" firstAttribute="centerY" secondItem="VLh-WI-T7X" secondAttribute="centerY" id="qxx-I2-YpL"/>
|
||||
<constraint firstItem="jxG-Qv-eKF" firstAttribute="top" secondItem="6Sw-sF-BAZ" secondAttribute="bottom" id="rAw-cP-0GU"/>
|
||||
<constraint firstItem="6Sw-sF-BAZ" firstAttribute="centerX" secondItem="VLh-WI-T7X" secondAttribute="centerX" id="rH0-9H-b0M"/>
|
||||
<constraint firstAttribute="trailing" secondItem="f8i-PA-TJb" secondAttribute="trailing" id="ua5-7p-icx"/>
|
||||
<constraint firstItem="6Sw-sF-BAZ" firstAttribute="top" secondItem="VLh-WI-T7X" secondAttribute="bottom" id="w1u-Yh-IJP"/>
|
||||
<constraint firstItem="meU-rN-T7y" firstAttribute="centerY" secondItem="8KR-m1-j51" secondAttribute="centerY" id="x5H-j5-32G"/>
|
||||
<constraint firstAttribute="trailing" secondItem="Wax-9r-T5y" secondAttribute="trailing" constant="12" id="zy0-un-D4A"/>
|
||||
<constraint firstItem="xBa-ZL-geT" firstAttribute="leading" secondItem="ToM-m7-TTO" secondAttribute="leading" constant="16" id="11c-XV-D0u"/>
|
||||
<constraint firstItem="N4K-Tt-uWI" firstAttribute="leading" secondItem="ToM-m7-TTO" secondAttribute="leading" id="AuH-yD-ifs"/>
|
||||
<constraint firstAttribute="trailing" secondItem="xBa-ZL-geT" secondAttribute="trailing" constant="16" id="CfG-x5-kUe"/>
|
||||
<constraint firstItem="fnF-e8-fJX" firstAttribute="centerX" secondItem="ToM-m7-TTO" secondAttribute="centerX" id="Cto-1P-McJ"/>
|
||||
<constraint firstItem="fnF-e8-fJX" firstAttribute="centerY" secondItem="HGn-rC-iSu" secondAttribute="centerY" id="E4H-hn-2iS"/>
|
||||
<constraint firstAttribute="trailing" secondItem="pNf-9c-nTn" secondAttribute="trailing" id="Lrk-M0-sYN"/>
|
||||
<constraint firstItem="xBa-ZL-geT" firstAttribute="top" secondItem="ToM-m7-TTO" secondAttribute="top" constant="12" id="MyV-yB-DgV"/>
|
||||
<constraint firstItem="Dhv-uU-KIw" firstAttribute="bottom" secondItem="xBa-ZL-geT" secondAttribute="bottom" id="TGY-nw-Duy"/>
|
||||
<constraint firstItem="Dhv-uU-KIw" firstAttribute="leading" secondItem="ToM-m7-TTO" secondAttribute="leading" constant="16" id="WaK-zq-b0D"/>
|
||||
<constraint firstItem="HGn-rC-iSu" firstAttribute="top" secondItem="pNf-9c-nTn" secondAttribute="bottom" id="Y78-WB-aqI"/>
|
||||
<constraint firstAttribute="bottom" secondItem="HGn-rC-iSu" secondAttribute="bottom" priority="750" id="a6X-bn-oBk"/>
|
||||
<constraint firstAttribute="trailing" secondItem="N4K-Tt-uWI" secondAttribute="trailing" id="bhV-il-6XY"/>
|
||||
<constraint firstItem="N4K-Tt-uWI" firstAttribute="top" secondItem="xBa-ZL-geT" secondAttribute="bottom" id="bnG-0N-QfF"/>
|
||||
<constraint firstAttribute="trailing" secondItem="Dhv-uU-KIw" secondAttribute="trailing" constant="16" id="cji-10-Cku"/>
|
||||
<constraint firstItem="pNf-9c-nTn" firstAttribute="leading" secondItem="ToM-m7-TTO" secondAttribute="leading" constant="16" id="d4M-92-bKQ"/>
|
||||
<constraint firstItem="HGn-rC-iSu" firstAttribute="leading" secondItem="ToM-m7-TTO" secondAttribute="leading" id="jEr-Sr-JQG"/>
|
||||
<constraint firstAttribute="trailing" secondItem="HGn-rC-iSu" secondAttribute="trailing" id="kWR-Sx-TtR"/>
|
||||
<constraint firstItem="pNf-9c-nTn" firstAttribute="top" secondItem="N4K-Tt-uWI" secondAttribute="bottom" constant="1" id="zBo-YF-0Ew"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="backgroundColorName" value="white"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</tableViewCellContentView>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="backgroundColorName" value="white"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
<connections>
|
||||
<outlet property="categoryButton" destination="jxG-Qv-eKF" id="pom-En-q4u"/>
|
||||
<outlet property="editBookmarkButton" destination="8KR-m1-j51" id="VNq-cx-CxM"/>
|
||||
<outlet property="markButton" destination="Wax-9r-T5y" id="PlC-Ww-Hpr"/>
|
||||
<outlet property="note" destination="f8i-PA-TJb" id="kAv-qp-HXO"/>
|
||||
<outlet property="noteLabel" destination="fVU-OV-gcK" id="Zes-4a-UyY"/>
|
||||
<outlet property="noteViewHeight" destination="P0o-9l-5ht" id="Wvg-zj-plp"/>
|
||||
<outlet property="noteWebView" destination="1yW-c7-l8L" id="BB2-eV-Y01"/>
|
||||
<outlet property="title" destination="VLh-WI-T7X" id="hXl-Pk-c5Y"/>
|
||||
<outlet property="editButton" destination="HGn-rC-iSu" id="aGz-Dx-QMy"/>
|
||||
<outlet property="gradient" destination="Dhv-uU-KIw" id="cBM-jx-32I"/>
|
||||
<outlet property="moreButton" destination="N4K-Tt-uWI" id="VbM-YT-kWH"/>
|
||||
<outlet property="moreButtonHeight" destination="Z1L-dp-kDG" id="h46-cm-7jz"/>
|
||||
<outlet property="separator" destination="pNf-9c-nTn" id="Bl8-Ca-YWu"/>
|
||||
<outlet property="spinner" destination="fnF-e8-fJX" id="JRf-Dk-rIE"/>
|
||||
<outlet property="textView" destination="xBa-ZL-geT" id="3IM-az-ueG"/>
|
||||
<outlet property="textViewBottomOffset" destination="bnG-0N-QfF" id="Uqk-h1-43w"/>
|
||||
<outlet property="textViewHeight" destination="YwK-YQ-Gdj" id="Y5w-GY-C2S"/>
|
||||
<outlet property="textViewTopOffset" destination="MyV-yB-DgV" id="Gq5-ho-Dc6"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="152" y="568"/>
|
||||
<point key="canvasLocation" x="291" y="436"/>
|
||||
</tableViewCell>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="ic_arrow_gray_right" width="28" height="28"/>
|
||||
<image name="ic_bookmark" width="28" height="28"/>
|
||||
<image name="placemark-red-on" width="28" height="28"/>
|
||||
<image name="dialog_btn_press" width="280" height="44"/>
|
||||
<image name="gradient_light" width="1" height="24"/>
|
||||
<image name="separator_image" width="1" height="1"/>
|
||||
</resources>
|
||||
</document>
|
||||
|
|
|
@ -1,51 +1,52 @@
|
|||
<?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="10116" systemVersion="15E65" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none">
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9529"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<view contentMode="scaleToFill" id="iN0-l3-epB" customClass="MWMPlacePageNavigationBar">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="64"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="36"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
|
||||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="WrL-L0-rh7">
|
||||
<rect key="frame" x="0.0" y="20" width="44" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<state key="normal" image="ic_down">
|
||||
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</state>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="ic_anchor_down" id="Lti-Pq-sp2">
|
||||
<rect key="frame" x="149" y="26" width="22" height="6"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="coloring" value="MWMBlack"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</imageView>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="Wa3-RR-5ge">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="36"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<connections>
|
||||
<action selector="backTap:" destination="iN0-l3-epB" eventType="touchUpInside" id="pLx-Dm-uVj"/>
|
||||
<action selector="dismissTap" destination="iN0-l3-epB" eventType="touchUpInside" id="FXv-uB-Rc8"/>
|
||||
</connections>
|
||||
</button>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Цвет метки" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="EGz-2I-iY7">
|
||||
<rect key="frame" x="52" y="31" width="232" height="21"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<nil key="highlightedColor"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="colorName" value="whitePrimaryText"/>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="fontName" value="regular17"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" red="0.12156862745098039" green="0.59999999999999998" blue="0.32156862745098036" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="backgroundColorName" value="primary"/>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="backgroundColorName" value="white"/>
|
||||
<userDefinedRuntimeAttribute type="color" keyPath="layer.shadowUIColor">
|
||||
<color key="value" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="layer.shadowRadius">
|
||||
<integer key="value" value="2"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="layer.shadowOpacity">
|
||||
<real key="value" value="0.23999999999999999"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="size" keyPath="layer.shadowOffset">
|
||||
<size key="value" width="0.0" height="2"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
<connections>
|
||||
<outlet property="titleLabel" destination="EGz-2I-iY7" id="1oN-Bg-1tt"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="335" y="266"/>
|
||||
</view>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="ic_down" width="44" height="44"/>
|
||||
<image name="ic_anchor_down" width="22" height="6"/>
|
||||
</resources>
|
||||
</document>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="10116" systemVersion="15D21" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none">
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="10117" systemVersion="15E65" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none">
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
|
||||
|
@ -43,8 +43,8 @@
|
|||
<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">
|
||||
<rect key="frame" x="36" y="20" width="247" height="23"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
|
||||
<rect key="frame" x="44" y="5" width="247" height="23"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="24"/>
|
||||
<color key="textColor" red="0.12549019610000001" green="0.12549019610000001" blue="0.12941176469999999" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
|
@ -54,8 +54,8 @@
|
|||
</userDefinedRuntimeAttributes>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Кафэ" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="TNu-JO-vJi">
|
||||
<rect key="frame" x="36" y="47" width="204" height="17"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<rect key="frame" x="44" y="45" width="204" height="17"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="light" pointSize="16"/>
|
||||
<color key="textColor" red="0.60784313729999995" green="0.60784313729999995" blue="0.60784313729999995" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
|
@ -65,18 +65,18 @@
|
|||
</userDefinedRuntimeAttributes>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="ул. Тверская, 21, Москва, 119571" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="eyV-C6-ull">
|
||||
<rect key="frame" x="36" y="67" width="287" height="17"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<rect key="frame" x="44" y="69" width="276" height="17"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="light" pointSize="16"/>
|
||||
<color key="textColor" red="0.60784313729999995" green="0.60784313729999995" blue="0.60784313729999995" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="colorName" value="blackSecondaryText"/>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="colorName" value="blackPrimaryText"/>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="fontName" value="regular14"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</label>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="separator_image" id="TRO-vz-04P">
|
||||
<rect key="frame" x="20" y="95" width="280" height="1"/>
|
||||
<rect key="frame" x="0.0" y="95" width="320" height="1"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
|
||||
<gestureRecognizers/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
|
@ -84,8 +84,8 @@
|
|||
</userDefinedRuntimeAttributes>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="500 mi" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="kGT-CI-UsC">
|
||||
<rect key="frame" x="239" y="45" width="57" height="21"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
|
||||
<rect key="frame" x="255" y="43" width="57" height="21"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="light" pointSize="16"/>
|
||||
<color key="textColor" red="0.12941176469999999" green="0.12941176469999999" blue="0.12941176469999999" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
|
@ -95,15 +95,15 @@
|
|||
</userDefinedRuntimeAttributes>
|
||||
</label>
|
||||
<imageView autoresizesSubviews="NO" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="img_direction_light" id="ExH-ug-j1j">
|
||||
<rect key="frame" x="225" y="43" width="20" height="20"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
|
||||
<rect key="frame" x="241" y="41" width="20" height="20"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="mwm_name" value="img_direction"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</imageView>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="X4O-iK-cA2">
|
||||
<rect key="frame" x="212" y="33" width="84" height="43"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
|
||||
<rect key="frame" x="228" y="31" width="84" height="43"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<state key="normal">
|
||||
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</state>
|
||||
|
@ -111,6 +111,33 @@
|
|||
<action selector="directionButtonTap" destination="8RI-YR-2UD" eventType="touchUpInside" id="dw3-kq-Pxp"/>
|
||||
</connections>
|
||||
</button>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="iI6-df-zdo">
|
||||
<rect key="frame" x="44" y="26" width="42" height="17"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<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="blackPrimaryText"/>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="fontName" value="medium14"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Открыто" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="PR2-bF-NQ3">
|
||||
<rect key="frame" x="44" y="57" width="204" height="17"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="light" pointSize="16"/>
|
||||
<color key="textColor" red="0.60784313729999995" green="0.60784313729999995" blue="0.60784313729999995" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="colorName" value="blackSecondaryText"/>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="fontName" value="regular14"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</label>
|
||||
<view contentMode="scaleToFill" id="YuG-4T-VZR">
|
||||
<rect key="frame" x="12" y="10" width="36" height="36"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<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>
|
||||
|
@ -137,11 +164,15 @@
|
|||
<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"/>
|
||||
<outlet property="downloadProgressView" destination="YuG-4T-VZR" id="ABY-Qc-sia"/>
|
||||
<outlet property="externalTitleLabel" destination="iI6-df-zdo" id="FZj-pe-UPk"/>
|
||||
<outlet property="featureTable" destination="hZM-Gs-BbS" id="iBU-Iq-8go"/>
|
||||
<outlet property="ownerPlacePage" destination="-1" id="ptD-bf-NPp"/>
|
||||
<outlet property="placeScheduleLabel" destination="PR2-bF-NQ3" id="tzh-x6-JbL"/>
|
||||
<outlet property="ppPreview" destination="Eil-hi-tf9" id="Cgy-ik-ouz"/>
|
||||
<outlet property="separatorView" destination="TRO-vz-04P" id="zgT-Vz-9R2"/>
|
||||
<outlet property="subtitleLabel" destination="TNu-JO-vJi" id="ABY-eN-8UH"/>
|
||||
<outlet property="titleLabel" destination="T1Y-Oq-6fg" id="ifK-nU-q7x"/>
|
||||
<outlet property="typeLabel" destination="TNu-JO-vJi" id="mWV-cH-KMk"/>
|
||||
</connections>
|
||||
</view>
|
||||
</subviews>
|
||||
|
|
|
@ -2,18 +2,18 @@
|
|||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x",
|
||||
"filename" : "ic_download_light@1x.png"
|
||||
"filename" : "gradient_dark.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x",
|
||||
"filename" : "ic_download_light@2x.png"
|
||||
"filename" : "gradient_dark@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x",
|
||||
"filename" : "ic_download_light@3x.png"
|
||||
"filename" : "gradient_dark@3x.png",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
BIN
iphone/Maps/Images.xcassets/Place Page/gradient_dark.imageset/gradient_dark.png
vendored
Normal file
After Width: | Height: | Size: 136 B |
BIN
iphone/Maps/Images.xcassets/Place Page/gradient_dark.imageset/gradient_dark@2x.png
vendored
Normal file
After Width: | Height: | Size: 269 B |
BIN
iphone/Maps/Images.xcassets/Place Page/gradient_dark.imageset/gradient_dark@3x.png
vendored
Normal file
After Width: | Height: | Size: 365 B |
|
@ -2,18 +2,18 @@
|
|||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x",
|
||||
"filename" : "color_picker_red_on.png"
|
||||
"filename" : "gradient_light.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x",
|
||||
"filename" : "color_picker_red_on@2x.png"
|
||||
"filename" : "gradient_light@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x",
|
||||
"filename" : "color_picker_red_on@3x.png"
|
||||
"filename" : "gradient_light@3x.png",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
BIN
iphone/Maps/Images.xcassets/Place Page/gradient_light.imageset/gradient_light.png
vendored
Normal file
After Width: | Height: | Size: 86 B |
BIN
iphone/Maps/Images.xcassets/Place Page/gradient_light.imageset/gradient_light@2x.png
vendored
Normal file
After Width: | Height: | Size: 102 B |
BIN
iphone/Maps/Images.xcassets/Place Page/gradient_light.imageset/gradient_light@3x.png
vendored
Normal file
After Width: | Height: | Size: 123 B |
26
iphone/Maps/Images.xcassets/Place Page/ic_anchor_down.imageset/Contents.json
vendored
Normal file
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "ic_anchor_down.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "ic_anchor_down@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "ic_anchor_down@3x.png",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
},
|
||||
"properties" : {
|
||||
"template-rendering-intent" : "template"
|
||||
}
|
||||
}
|
BIN
iphone/Maps/Images.xcassets/Place Page/ic_anchor_down.imageset/ic_anchor_down.png
vendored
Normal file
After Width: | Height: | Size: 175 B |
BIN
iphone/Maps/Images.xcassets/Place Page/ic_anchor_down.imageset/ic_anchor_down@2x.png
vendored
Normal file
After Width: | Height: | Size: 268 B |
BIN
iphone/Maps/Images.xcassets/Place Page/ic_anchor_down.imageset/ic_anchor_down@3x.png
vendored
Normal file
After Width: | Height: | Size: 332 B |
23
iphone/Maps/Images.xcassets/Place Page/img_placemark-blue-off.imageset/Contents.json
vendored
Normal file
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "img_placemark-blue-off.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "img_placemark-blue-off@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "img_placemark-blue-off@3x.png",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
BIN
iphone/Maps/Images.xcassets/Place Page/img_placemark-blue-off.imageset/img_placemark-blue-off.png
vendored
Normal file
After Width: | Height: | Size: 173 B |
BIN
iphone/Maps/Images.xcassets/Place Page/img_placemark-blue-off.imageset/img_placemark-blue-off@2x.png
vendored
Normal file
After Width: | Height: | Size: 264 B |
BIN
iphone/Maps/Images.xcassets/Place Page/img_placemark-blue-off.imageset/img_placemark-blue-off@3x.png
vendored
Normal file
After Width: | Height: | Size: 348 B |
23
iphone/Maps/Images.xcassets/Place Page/img_placemark-blue-on.imageset/Contents.json
vendored
Normal file
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "img_placemark-blue-on.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "img_placemark-blue-on@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "img_placemark-blue-on@3x.png",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
BIN
iphone/Maps/Images.xcassets/Place Page/img_placemark-blue-on.imageset/img_placemark-blue-on.png
vendored
Normal file
After Width: | Height: | Size: 408 B |
BIN
iphone/Maps/Images.xcassets/Place Page/img_placemark-blue-on.imageset/img_placemark-blue-on@2x.png
vendored
Normal file
After Width: | Height: | Size: 800 B |
BIN
iphone/Maps/Images.xcassets/Place Page/img_placemark-blue-on.imageset/img_placemark-blue-on@3x.png
vendored
Normal file
After Width: | Height: | Size: 1.1 KiB |
23
iphone/Maps/Images.xcassets/Place Page/img_placemark-brown-off.imageset/Contents.json
vendored
Normal file
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "img_placemark-brown-off.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "img_placemark-brown-off@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "img_placemark-brown-off@3x.png",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
BIN
iphone/Maps/Images.xcassets/Place Page/img_placemark-brown-off.imageset/img_placemark-brown-off.png
vendored
Normal file
After Width: | Height: | Size: 171 B |
After Width: | Height: | Size: 264 B |
After Width: | Height: | Size: 348 B |
23
iphone/Maps/Images.xcassets/Place Page/img_placemark-brown-on.imageset/Contents.json
vendored
Normal file
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "img_placemark-brown-on.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "img_placemark-brown-on@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "img_placemark-brown-on@3x.png",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
BIN
iphone/Maps/Images.xcassets/Place Page/img_placemark-brown-on.imageset/img_placemark-brown-on.png
vendored
Normal file
After Width: | Height: | Size: 408 B |
BIN
iphone/Maps/Images.xcassets/Place Page/img_placemark-brown-on.imageset/img_placemark-brown-on@2x.png
vendored
Normal file
After Width: | Height: | Size: 807 B |
BIN
iphone/Maps/Images.xcassets/Place Page/img_placemark-brown-on.imageset/img_placemark-brown-on@3x.png
vendored
Normal file
After Width: | Height: | Size: 1.1 KiB |
23
iphone/Maps/Images.xcassets/Place Page/img_placemark-green-off.imageset/Contents.json
vendored
Normal file
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "img_placemark-green-off.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "img_placemark-green-off@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "img_placemark-green-off@3x.png",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
BIN
iphone/Maps/Images.xcassets/Place Page/img_placemark-green-off.imageset/img_placemark-green-off.png
vendored
Normal file
After Width: | Height: | Size: 174 B |
After Width: | Height: | Size: 264 B |
After Width: | Height: | Size: 348 B |
23
iphone/Maps/Images.xcassets/Place Page/img_placemark-green-on.imageset/Contents.json
vendored
Normal file
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "img_placemark-green-on.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "img_placemark-green-on@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "img_placemark-green-on@3x.png",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
BIN
iphone/Maps/Images.xcassets/Place Page/img_placemark-green-on.imageset/img_placemark-green-on.png
vendored
Normal file
After Width: | Height: | Size: 408 B |
BIN
iphone/Maps/Images.xcassets/Place Page/img_placemark-green-on.imageset/img_placemark-green-on@2x.png
vendored
Normal file
After Width: | Height: | Size: 800 B |
BIN
iphone/Maps/Images.xcassets/Place Page/img_placemark-green-on.imageset/img_placemark-green-on@3x.png
vendored
Normal file
After Width: | Height: | Size: 1.1 KiB |
23
iphone/Maps/Images.xcassets/Place Page/img_placemark-orange-off.imageset/Contents.json
vendored
Normal file
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "img_placemark-orange-off.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "img_placemark-orange-off@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "img_placemark-orange-off@3x.png",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 161 B |
After Width: | Height: | Size: 255 B |
After Width: | Height: | Size: 348 B |
23
iphone/Maps/Images.xcassets/Place Page/img_placemark-orange-on.imageset/Contents.json
vendored
Normal file
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "img_placemark-orange-on.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "img_placemark-orange-on@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "img_placemark-orange-on@3x.png",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
BIN
iphone/Maps/Images.xcassets/Place Page/img_placemark-orange-on.imageset/img_placemark-orange-on.png
vendored
Normal file
After Width: | Height: | Size: 408 B |
After Width: | Height: | Size: 773 B |
After Width: | Height: | Size: 1.1 KiB |
23
iphone/Maps/Images.xcassets/Place Page/img_placemark-pink-off.imageset/Contents.json
vendored
Normal file
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "img_placemark-pin-off.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "img_placemark-pin-off@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "img_placemark-pin-off@3x.png",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
BIN
iphone/Maps/Images.xcassets/Place Page/img_placemark-pink-off.imageset/img_placemark-pin-off.png
vendored
Normal file
After Width: | Height: | Size: 173 B |
BIN
iphone/Maps/Images.xcassets/Place Page/img_placemark-pink-off.imageset/img_placemark-pin-off@2x.png
vendored
Normal file
After Width: | Height: | Size: 264 B |
BIN
iphone/Maps/Images.xcassets/Place Page/img_placemark-pink-off.imageset/img_placemark-pin-off@3x.png
vendored
Normal file
After Width: | Height: | Size: 348 B |
23
iphone/Maps/Images.xcassets/Place Page/img_placemark-pink-on.imageset/Contents.json
vendored
Normal file
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "img_placemark-pin-on.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "img_placemark-pin-on@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "img_placemark-pin-on@3x.png",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
BIN
iphone/Maps/Images.xcassets/Place Page/img_placemark-pink-on.imageset/img_placemark-pin-on.png
vendored
Normal file
After Width: | Height: | Size: 407 B |
BIN
iphone/Maps/Images.xcassets/Place Page/img_placemark-pink-on.imageset/img_placemark-pin-on@2x.png
vendored
Normal file
After Width: | Height: | Size: 777 B |
BIN
iphone/Maps/Images.xcassets/Place Page/img_placemark-pink-on.imageset/img_placemark-pin-on@3x.png
vendored
Normal file
After Width: | Height: | Size: 1 KiB |
23
iphone/Maps/Images.xcassets/Place Page/img_placemark-purple-off.imageset/Contents.json
vendored
Normal file
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "img_placemark-purple-off.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "img_placemark-purple-off@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "img_placemark-purple-off@3x.png",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 174 B |
After Width: | Height: | Size: 264 B |