Merge pull request #4667 from igrechuhin/MAPSME-2599

[ios] Added filters support to search UI.
This commit is contained in:
Vlad Mihaylenko 2016-11-08 11:43:53 +04:00 committed by GitHub
commit 6607e1fb57
49 changed files with 1825 additions and 602 deletions

View file

@ -420,6 +420,7 @@ typedef NS_ENUM(NSUInteger, MWMBottomMenuViewCell) {
[Statistics logEvent:kStatMenu withParameters:@{kStatButton : kStatBookmarks}];
[Alohalytics logEvent:kAlohalyticsTapEventKey withValue:@"bookmarks"];
self.state = self.restoreState;
[self.delegate closeInfoScreens];
[self.controller openBookmarks];
}

View file

@ -15,7 +15,6 @@
#import "MWMRoutePreview.h"
#import "MWMRouter.h"
#import "MWMSearchManager.h"
#import "MWMSearchView.h"
#import "MWMSideButtons.h"
#import "MWMTaxiPreviewDataSource.h"
#import "MapViewController.h"
@ -119,7 +118,6 @@ extern NSString * const kAlohalyticsTapEventKey;
// Workaround needs for setting correct left bound while landscape place page is open.
self.navigationManager.leftBound = 0;
[self.placePageManager willRotateToInterfaceOrientation:toInterfaceOrientation];
[self.searchManager willRotateToInterfaceOrientation:toInterfaceOrientation duration:duration];
}
- (void)viewWillTransitionToSize:(CGSize)size
@ -302,7 +300,8 @@ extern NSString * const kAlohalyticsTapEventKey;
UIView * ownerView = self.ownerController.view;
for (UIView * view in views)
[ownerView addSubview:view];
[ownerView bringSubviewToFront:self.searchManager.view];
for (UIView * view in self.searchManager.topViews)
[ownerView bringSubviewToFront:view];
if (IPAD)
{
[ownerView bringSubviewToFront:self.menuController.view];
@ -331,7 +330,9 @@ extern NSString * const kAlohalyticsTapEventKey;
{
[UIView animateWithDuration:kDefaultAnimationDuration
animations:^{
self.searchManager.view.alpha = bound > 0 ? 0. : 1.;
CGFloat const alpha = bound > 0 ? 0. : 1.;
for (UIView * view in self.searchManager.topViews)
view.alpha = alpha;
}
completion:^(BOOL finished) {
self.searchManager.state = MWMSearchManagerStateHidden;
@ -475,7 +476,7 @@ extern NSString * const kAlohalyticsTapEventKey;
- (MWMSearchManager *)searchManager
{
if (!_searchManager)
_searchManager = [[MWMSearchManager alloc] initWithParentView:self.ownerController.view];
_searchManager = [[MWMSearchManager alloc] init];
return _searchManager;
}

View file

@ -0,0 +1,7 @@
#import "MWMSearchTableViewController.h"
@interface MWMSearchChangeModeView : UIView
- (void)updateForState:(MWMSearchManagerState)state;
@end

View file

@ -0,0 +1,99 @@
#import "MWMSearchChangeModeView.h"
#import "MWMButton.h"
#import "MWMSearch.h"
#import "UIButton+RuntimeAttributes.h"
#import "UIColor+MapsMeColor.h"
extern NSString * const kSearchStateWillChangeNotification;
extern NSString * const kSearchStateKey;
@interface MWMSearchChangeModeView ()<MWMSearchObserver>
@property(weak, nonatomic) IBOutlet UIButton * changeModeButton;
@property(weak, nonatomic) IBOutlet UIButton * filterButton;
@property(weak, nonatomic) IBOutlet MWMButton * cancelFilterButton;
@property(weak, nonatomic) IBOutlet NSLayoutConstraint * filterButtoniPadX;
@end
@implementation MWMSearchChangeModeView
- (void)awakeFromNib
{
[super awakeFromNib];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(searchStateWillChange:)
name:kSearchStateWillChangeNotification
object:nil];
[MWMSearch addObserver:self];
self.filterButtoniPadX.priority = IPAD ? UILayoutPriorityDefaultHigh : UILayoutPriorityDefaultLow;
}
- (void)dealloc { [[NSNotificationCenter defaultCenter] removeObserver:self]; }
- (void)updateForState:(MWMSearchManagerState)state
{
UIButton * changeModeButton = self.changeModeButton;
if (IPAD)
{
changeModeButton.hidden = YES;
return;
}
switch (state)
{
case MWMSearchManagerStateTableSearch:
self.backgroundColor = [UIColor pressBackground];
[changeModeButton setTitle:L(@"search_on_map") forState:UIControlStateNormal];
break;
case MWMSearchManagerStateMapSearch:
self.backgroundColor = [UIColor white];
[changeModeButton setTitle:L(@"search_in_table") forState:UIControlStateNormal];
break;
default: break;
}
}
- (void)updateFilterButtons:(BOOL)isFilterResults
{
BOOL const hasFilter = [MWMSearch hasFilter];
BOOL const hide = !(isFilterResults || hasFilter);
self.filterButton.hidden = hide;
self.cancelFilterButton.hidden = hide;
if (hide)
return;
if (hasFilter)
{
[self.filterButton setBackgroundColorName:@"linkBlue"];
[self.filterButton setBackgroundHighlightedColorName:@"linkBlueHighlighted"];
[self.filterButton setTitleColor:[UIColor white] forState:UIControlStateNormal];
[self.cancelFilterButton setImage:[UIImage imageNamed:@"ic_clear_filters"]
forState:UIControlStateNormal];
self.cancelFilterButton.coloring = MWMButtonColoringWhite;
[self bringSubviewToFront:self.cancelFilterButton];
}
else
{
[self.filterButton setBackgroundColorName:@"clearColor"];
[self.filterButton setBackgroundHighlightedColorName:@"clearColor"];
[self.filterButton setTitleColor:[UIColor linkBlue] forState:UIControlStateNormal];
[self.cancelFilterButton setImage:[UIImage imageNamed:@"ic_filter"]
forState:UIControlStateNormal];
self.cancelFilterButton.coloring = MWMButtonColoringBlue;
[self sendSubviewToBack:self.cancelFilterButton];
}
}
#pragma mark - MWMSearchObserver
- (void)onSearchStarted { [self updateFilterButtons:[MWMSearch isHotelResults]]; }
- (void)onSearchCompleted { [self updateFilterButtons:[MWMSearch isHotelResults]]; }
#pragma mark - Notifications
- (void)searchStateWillChange:(NSNotification *)notification
{
MWMSearchManagerState const state =
MWMSearchManagerState([[notification userInfo][kSearchStateKey] unsignedIntegerValue]);
[self updateForState:state];
}
@end

View file

@ -1,3 +1,3 @@
@interface MWMSearchContentView : UIView
@interface MWMSearchContentView : SolidTouchView
@end

View file

@ -0,0 +1,7 @@
#import "MWMSearchManager.h"
@interface MWMSearchManager (Filter)
- (void)clearFilter;
@end

View file

@ -0,0 +1,134 @@
#import "MWMSearch.h"
#import "MWMSearchFilterTransitioningDelegate.h"
#import "MWMSearchFilterViewController.h"
#import "MWMSearchManager+Filter.h"
#import "UIColor+MapsMeColor.h"
#import "UIFont+MapsMeFonts.h"
@interface MWMSearchManager ()<UIPopoverPresentationControllerDelegate>
@property(weak, nonatomic, readonly) UIViewController * ownerController;
@property(weak, nonatomic) IBOutlet UIButton * actionBarViewFilterButton;
@property(nonatomic) MWMSearchFilterTransitioningDelegate * filterTransitioningDelegate;
@end
@implementation MWMSearchManager (Filter)
- (IBAction)updateFilter
{
MWMSearchFilterViewController * filter = [MWMSearch getFilter];
UINavigationController * navController =
[[UINavigationController alloc] initWithRootViewController:filter];
UIViewController * ownerController = self.ownerController;
if (IPAD)
{
navController.modalPresentationStyle = UIModalPresentationPopover;
UIPopoverPresentationController * popover = navController.popoverPresentationController;
popover.sourceView = self.actionBarViewFilterButton;
popover.sourceRect = self.actionBarViewFilterButton.bounds;
popover.permittedArrowDirections = UIPopoverArrowDirectionLeft;
popover.delegate = self;
}
else
{
navController.modalPresentationStyle = UIModalPresentationCustom;
self.filterTransitioningDelegate = [[MWMSearchFilterTransitioningDelegate alloc] init];
ownerController.transitioningDelegate = self.filterTransitioningDelegate;
navController.transitioningDelegate = self.filterTransitioningDelegate;
}
[self configNavigationBar:navController.navigationBar];
[self configNavigationItem:navController.topViewController.navigationItem];
[ownerController presentViewController:navController animated:YES completion:nil];
}
- (IBAction)clearFilter { [MWMSearch clearFilter]; }
- (void)configNavigationBar:(UINavigationBar *)navBar
{
UIColor * white = [UIColor white];
navBar.tintColor = white;
navBar.barTintColor = white;
[navBar setBackgroundImage:nil forBarMetrics:UIBarMetricsDefault];
navBar.shadowImage = [UIImage imageWithColor:[UIColor fadeBackground]];
navBar.titleTextAttributes = @{
NSForegroundColorAttributeName : [UIColor blackPrimaryText],
NSFontAttributeName : [UIFont regular17]
};
navBar.translucent = NO;
}
- (void)configNavigationItem:(UINavigationItem *)navItem
{
UIFont * regular17 = [UIFont regular17];
UIColor * linkBlue = [UIColor linkBlue];
UIColor * linkBlueHighlighted = [UIColor linkBlueHighlighted];
UIColor * lightGrayColor = [UIColor lightGrayColor];
navItem.title = L(@"filters");
navItem.rightBarButtonItem =
[[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone
target:self
action:@selector(doneAction)];
[navItem.rightBarButtonItem setTitleTextAttributes:@{
NSForegroundColorAttributeName : linkBlue,
NSFontAttributeName : regular17
}
forState:UIControlStateNormal];
[navItem.rightBarButtonItem setTitleTextAttributes:@{
NSForegroundColorAttributeName : linkBlueHighlighted,
}
forState:UIControlStateHighlighted];
[navItem.rightBarButtonItem setTitleTextAttributes:@{
NSForegroundColorAttributeName : lightGrayColor,
}
forState:UIControlStateDisabled];
navItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:L(@"reset")
style:UIBarButtonItemStylePlain
target:self
action:@selector(resetAction)];
[navItem.leftBarButtonItem setTitleTextAttributes:@{
NSForegroundColorAttributeName : linkBlue,
NSFontAttributeName : regular17
}
forState:UIControlStateNormal];
[navItem.leftBarButtonItem setTitleTextAttributes:@{
NSForegroundColorAttributeName : linkBlueHighlighted,
}
forState:UIControlStateHighlighted];
[navItem.leftBarButtonItem setTitleTextAttributes:@{
NSForegroundColorAttributeName : lightGrayColor,
}
forState:UIControlStateDisabled];
}
#pragma mark - Actions
- (void)doneAction
{
[MWMSearch update];
[self.ownerController dismissViewControllerAnimated:YES completion:nil];
}
- (void)resetAction
{
[self clearFilter];
[self.ownerController dismissViewControllerAnimated:YES completion:nil];
}
#pragma mark - UIPopoverPresentationControllerDelegate
- (BOOL)popoverPresentationControllerShouldDismissPopover:
(UIPopoverPresentationController *)popoverPresentationController
{
[MWMSearch update];
return YES;
}
@end

View file

@ -0,0 +1,7 @@
#import "MWMSearchManager.h"
@interface MWMSearchManager (Layout)
- (void)layoutTopViews;
@end

View file

@ -0,0 +1,149 @@
#import "Common.h"
#import "MWMSearchManager+Layout.h"
namespace
{
CGFloat const kWidthForiPad = 320.0;
} // namespace
@interface MWMSearchManager ()
@property(nonatomic) IBOutlet UIView * searchBarView;
@property(nonatomic) IBOutlet UIView * actionBarView;
@property(nonatomic) IBOutlet UIView * contentView;
@property(nonatomic) NSLayoutConstraint * actionBarViewBottom;
@property(weak, nonatomic, readonly) UIViewController * ownerController;
@end
@implementation MWMSearchManager (Layout)
- (void)layoutTopViews
{
UIView * searchBarView = self.searchBarView;
UIView * actionBarView = self.actionBarView;
UIView * contentView = self.contentView;
UIView * parentView = self.ownerController.view;
searchBarView.translatesAutoresizingMaskIntoConstraints = NO;
actionBarView.translatesAutoresizingMaskIntoConstraints = NO;
contentView.translatesAutoresizingMaskIntoConstraints = NO;
NSLayoutConstraint * searchBarViewTop =
[NSLayoutConstraint constraintWithItem:searchBarView
attribute:NSLayoutAttributeTop
relatedBy:NSLayoutRelationEqual
toItem:parentView
attribute:NSLayoutAttributeTop
multiplier:1
constant:statusBarHeight()];
NSLayoutConstraint * searchBarViewLeft =
[NSLayoutConstraint constraintWithItem:searchBarView
attribute:NSLayoutAttributeLeft
relatedBy:NSLayoutRelationEqual
toItem:parentView
attribute:NSLayoutAttributeLeft
multiplier:1
constant:0];
NSLayoutConstraint * actionBarViewTop =
[NSLayoutConstraint constraintWithItem:actionBarView
attribute:NSLayoutAttributeTop
relatedBy:NSLayoutRelationEqual
toItem:searchBarView
attribute:NSLayoutAttributeBottom
multiplier:1
constant:0];
actionBarViewTop.priority = UILayoutPriorityDefaultLow + 10;
NSLayoutConstraint * actionBarViewLeft =
[NSLayoutConstraint constraintWithItem:actionBarView
attribute:NSLayoutAttributeLeft
relatedBy:NSLayoutRelationEqual
toItem:parentView
attribute:NSLayoutAttributeLeft
multiplier:1
constant:0];
NSLayoutConstraint * actionBarViewWidth =
[NSLayoutConstraint constraintWithItem:actionBarView
attribute:NSLayoutAttributeWidth
relatedBy:NSLayoutRelationEqual
toItem:searchBarView
attribute:NSLayoutAttributeWidth
multiplier:1
constant:0];
self.actionBarViewBottom = [NSLayoutConstraint constraintWithItem:actionBarView
attribute:NSLayoutAttributeBottom
relatedBy:NSLayoutRelationEqual
toItem:parentView
attribute:NSLayoutAttributeBottom
multiplier:1
constant:0];
self.actionBarViewBottom.priority = UILayoutPriorityDefaultLow;
NSLayoutConstraint * contentViewTop =
[NSLayoutConstraint constraintWithItem:contentView
attribute:NSLayoutAttributeTop
relatedBy:NSLayoutRelationEqual
toItem:actionBarView
attribute:NSLayoutAttributeBottom
multiplier:1
constant:0];
contentViewTop.priority = UILayoutPriorityDefaultLow;
NSLayoutConstraint * contentViewBottom =
[NSLayoutConstraint constraintWithItem:contentView
attribute:NSLayoutAttributeBottom
relatedBy:NSLayoutRelationEqual
toItem:parentView
attribute:NSLayoutAttributeBottom
multiplier:1
constant:0];
contentViewBottom.priority = UILayoutPriorityDefaultLow + 10;
NSLayoutConstraint * contentViewLeft =
[NSLayoutConstraint constraintWithItem:contentView
attribute:NSLayoutAttributeLeft
relatedBy:NSLayoutRelationEqual
toItem:parentView
attribute:NSLayoutAttributeLeft
multiplier:1
constant:0];
NSLayoutConstraint * contentViewWidth =
[NSLayoutConstraint constraintWithItem:contentView
attribute:NSLayoutAttributeWidth
relatedBy:NSLayoutRelationEqual
toItem:searchBarView
attribute:NSLayoutAttributeWidth
multiplier:1
constant:0];
[parentView addConstraints:@[
searchBarViewTop, searchBarViewLeft, actionBarViewTop, actionBarViewLeft, actionBarViewWidth,
self.actionBarViewBottom, contentViewTop, contentViewLeft, contentViewWidth, contentViewBottom
]];
if (IPAD)
{
NSLayoutConstraint * searchBarViewWidth =
[NSLayoutConstraint constraintWithItem:searchBarView
attribute:NSLayoutAttributeWidth
relatedBy:NSLayoutRelationEqual
toItem:nil
attribute:NSLayoutAttributeNotAnAttribute
multiplier:1
constant:kWidthForiPad];
[parentView addConstraint:searchBarViewWidth];
}
else
{
NSLayoutConstraint * searchBarViewRight =
[NSLayoutConstraint constraintWithItem:searchBarView
attribute:NSLayoutAttributeRight
relatedBy:NSLayoutRelationEqual
toItem:parentView
attribute:NSLayoutAttributeRight
multiplier:1
constant:0];
[parentView addConstraint:searchBarViewRight];
}
}
@end

View file

@ -1,7 +1,6 @@
#import "MWMAlertViewController.h"
#import "MWMMapDownloaderTypes.h"
#import "MWMSearchTextField.h"
#import "MWMSearchView.h"
typedef NS_ENUM(NSUInteger, MWMSearchManagerState)
{
@ -17,10 +16,7 @@ typedef NS_ENUM(NSUInteger, MWMSearchManagerState)
@property (nonatomic) MWMSearchManagerState state;
@property (nonnull, nonatomic, readonly) UIView * view;
- (nullable instancetype)init __attribute__((unavailable("init is not available")));
- (nullable instancetype)initWithParentView:(nonnull UIView *)view;
@property(nonatomic) IBOutletCollection(UIView) NSArray * topViews;
- (void)mwm_refreshUI;
@ -28,8 +24,6 @@ typedef NS_ENUM(NSUInteger, MWMSearchManagerState)
#pragma mark - Layout
- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
duration:(NSTimeInterval)duration;
- (void)viewWillTransitionToSize:(CGSize)size
withTransitionCoordinator:(nonnull id<UIViewControllerTransitionCoordinator>)coordinator;

View file

@ -1,4 +1,5 @@
#import "MWMSearchManager.h"
#import "Common.h"
#import "MWMConsole.h"
#import "MWMFrameworkListener.h"
#import "MWMLocationManager.h"
@ -6,11 +7,18 @@
#import "MWMNoMapsViewController.h"
#import "MWMRouter.h"
#import "MWMSearch.h"
#import "MWMSearchChangeModeView.h"
#import "MWMSearchFilterTransitioningDelegate.h"
#import "MWMSearchManager+Filter.h"
#import "MWMSearchManager+Layout.h"
#import "MWMSearchTabButtonsView.h"
#import "MWMSearchTabbedViewController.h"
#import "MWMSearchTableViewController.h"
#import "MapViewController.h"
#import "MapsAppDelegate.h"
#import "Statistics.h"
#import "UIColor+MapsMeColor.h"
#import "UIFont+MapsMeFonts.h"
#import "3party/Alohalytics/src/alohalytics_objc.h"
@ -24,13 +32,37 @@ extern NSString * const kAlohalyticsTapEventKey;
extern NSString * const kSearchStateWillChangeNotification = @"SearchStateWillChangeNotification";
extern NSString * const kSearchStateKey = @"SearchStateKey";
namespace
{
typedef NS_ENUM(NSUInteger, MWMSearchManagerActionBarState) {
MWMSearchManagerActionBarStateHidden,
MWMSearchManagerActionBarStateTabBar,
MWMSearchManagerActionBarStateModeFilter
};
} // namespace
@interface MWMSearchManager ()<MWMSearchTableViewProtocol, MWMSearchTabbedViewProtocol,
MWMSearchTabButtonsViewProtocol, UITextFieldDelegate,
MWMFrameworkStorageObserver>
MWMFrameworkStorageObserver, MWMSearchObserver>
@property(weak, nonatomic) UIView * parentView;
@property(nonatomic) IBOutlet MWMSearchView * rootView;
@property(weak, nonatomic) IBOutlet UIView * contentView;
@property(weak, nonatomic, readonly) UIViewController * ownerController;
@property(nonatomic) IBOutlet UIView * searchBarView;
@property(nonatomic) IBOutlet UIView * actionBarView;
@property(weak, nonatomic) IBOutlet NSLayoutConstraint * actionBarViewHeight;
@property(nonatomic) MWMSearchManagerActionBarState actionBarState;
@property(weak, nonatomic) IBOutlet UIButton * actionBarViewFilterButton;
@property(nonatomic) IBOutlet UIView * tabBarView;
@property(weak, nonatomic) IBOutlet NSLayoutConstraint * tabBarViewHeight;
@property(nonatomic) IBOutlet MWMSearchChangeModeView * changeModeView;
@property(weak, nonatomic) IBOutlet NSLayoutConstraint * changeModeViewHeight;
@property(weak, nonatomic) IBOutlet UIButton * filterButton;
@property(nonatomic) IBOutlet UIView * contentView;
@property(nonatomic) NSLayoutConstraint * actionBarViewBottom;
@property(nonatomic) IBOutletCollection(MWMSearchTabButtonsView) NSArray * tabButtons;
@property(weak, nonatomic) IBOutlet NSLayoutConstraint * scrollIndicatorOffset;
@ -41,34 +73,40 @@ extern NSString * const kSearchStateKey = @"SearchStateKey";
@property(nonatomic) MWMSearchTableViewController * tableViewController;
@property(nonatomic) MWMNoMapsViewController * noMapsController;
@property(nonatomic) MWMSearchFilterTransitioningDelegate * filterTransitioningDelegate;
@end
@implementation MWMSearchManager
- (nullable instancetype)initWithParentView:(nonnull UIView *)view
- (nullable instancetype)init
{
self = [super init];
if (self)
{
[NSBundle.mainBundle loadNibNamed:@"MWMSearchView" owner:self options:nil];
self.parentView = view;
self.state = MWMSearchManagerStateHidden;
[MWMSearch addObserver:self];
}
return self;
}
- (void)mwm_refreshUI
{
[self.rootView mwm_refreshUI];
if (self.state == MWMSearchManagerStateHidden)
return;
[self.searchBarView mwm_refreshUI];
[self.actionBarView mwm_refreshUI];
[self.contentView mwm_refreshUI];
[self.tabBarView mwm_refreshUI];
[self.tabbedController mwm_refreshUI];
[self.tableViewController mwm_refreshUI];
[self.noMapsController mwm_refreshUI];
if ([MWMSearch hasFilter])
[[MWMSearch getFilter] mwm_refreshUI];
}
- (void)beginSearch
{
if (self.state == MWMSearchManagerStateDefault)
if (self.state != MWMSearchManagerStateHidden)
self.state = MWMSearchManagerStateTableSearch;
}
@ -77,26 +115,22 @@ extern NSString * const kSearchStateKey = @"SearchStateKey";
if (self.state != MWMSearchManagerStateHidden)
self.state = MWMSearchManagerStateDefault;
self.searchTextField.text = @"";
[self clearFilter];
[MWMSearch clear];
}
#pragma mark - Actions
- (IBAction)textFieldDidBeginEditing:(UITextField *)textField
{
if (self.state == MWMSearchManagerStateMapSearch)
self.state = MWMSearchManagerStateTableSearch;
}
- (IBAction)textFieldDidEndEditing:(UITextField *)textField
{
if (textField.text.length == 0 && self.state != MWMSearchManagerStateHidden)
if (textField.text.length == 0)
[self endSearch];
}
- (IBAction)textFieldTextDidChange:(UITextField *)textField
{
NSString * text = textField.text;
[self clearFilter];
if (text.length > 0)
{
if ([MWMConsole performCommand:text])
@ -134,13 +168,6 @@ extern NSString * const kSearchStateKey = @"SearchStateKey";
#pragma mark - Layout
- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
duration:(NSTimeInterval)duration
{
[self.navigationController willRotateToInterfaceOrientation:toInterfaceOrientation
duration:duration];
}
- (void)viewWillTransitionToSize:(CGSize)size
withTransitionCoordinator:(id<UIViewControllerTransitionCoordinator>)coordinator
{
@ -149,11 +176,15 @@ extern NSString * const kSearchStateKey = @"SearchStateKey";
#pragma mark - UITextFieldDelegate
- (BOOL)textFieldShouldReturn:(nonnull UITextField *)textField
- (void)textFieldDidBeginEditing:(UITextField *)textField
{
BOOL const isEmpty = (textField.text.length == 0);
self.state = isEmpty ? MWMSearchManagerStateDefault : MWMSearchManagerStateTableSearch;
}
- (BOOL)textFieldShouldReturn:(UITextField *)textField
{
[textField resignFirstResponder];
if (textField.text.length != 0)
self.state = MWMSearchManagerStateMapSearch;
return YES;
}
@ -231,8 +262,6 @@ extern NSString * const kSearchStateKey = @"SearchStateKey";
- (void)updateTopController
{
UIViewController * selfTopVC = self.topController;
self.rootView.tabBarIsVisible =
self.state == MWMSearchManagerStateDefault && [selfTopVC isEqual:self.tabbedController];
if ([selfTopVC isEqual:self.navigationController.topViewController])
return;
NSMutableArray * viewControllers = [self.navigationController.viewControllers mutableCopy];
@ -244,48 +273,102 @@ extern NSString * const kSearchStateKey = @"SearchStateKey";
{
[self endSearch];
[self.tabbedController resetSelectedTab];
self.tableViewController = nil;
self.noMapsController = nil;
self.rootView.isVisible = NO;
[self viewHidden:YES];
}
- (void)changeToDefaultState
{
self.view.alpha = 1.;
[self updateTopController];
[self.navigationController popToRootViewControllerAnimated:NO];
[self.parentView addSubview:self.rootView];
self.rootView.compact = NO;
self.rootView.isVisible = YES;
self.actionBarState = MWMSearchManagerActionBarStateTabBar;
[self animateConstraints:^{
self.actionBarViewBottom.priority = UILayoutPriorityDefaultLow;
}];
[self viewHidden:NO];
if (self.topController != self.noMapsController)
[self.searchTextField becomeFirstResponder];
}
- (void)changeToTableSearchState
{
[self changeToDefaultState];
self.rootView.compact = NO;
self.rootView.tabBarIsVisible = NO;
[self updateTopController];
[self.navigationController popToRootViewControllerAnimated:NO];
self.actionBarState = MWMSearchManagerActionBarStateHidden;
[self animateConstraints:^{
self.actionBarViewBottom.priority = UILayoutPriorityDefaultLow;
}];
[self viewHidden:NO];
[MWMSearch setSearchOnMap:NO];
[self.tableViewController reloadData];
if (![self.navigationController.viewControllers containsObject:self.tableViewController])
[self.navigationController pushViewController:self.tableViewController animated:NO];
}
- (void)changeToMapSearchState
{
[self changeToDefaultState];
[self updateTopController];
[self.navigationController popToRootViewControllerAnimated:NO];
self.actionBarState = MWMSearchManagerActionBarStateModeFilter;
[self animateConstraints:^{
self.actionBarViewBottom.priority = UILayoutPriorityDefaultHigh;
}];
[self viewHidden:NO];
[MWMSearch setSearchOnMap:YES];
[self.tableViewController reloadData];
GetFramework().DeactivateMapSelection(true);
[self.searchTextField resignFirstResponder];
self.rootView.compact = YES;
[MWMSearch setSearchOnMap:YES];
if ([MWMNavigationDashboardManager manager].state == MWMNavigationDashboardStateNavigation)
{
self.searchTextField.text = @"";
[self.tabbedController resetSelectedTab];
self.tableViewController = nil;
self.noMapsController = nil;
self.rootView.isVisible = NO;
}
}
- (void)animateConstraints:(TMWMVoidBlock)block
{
UIView * parentView = self.ownerController.view;
[parentView layoutIfNeeded];
block();
[UIView animateWithDuration:kDefaultAnimationDuration
animations:^{
[parentView layoutIfNeeded];
}];
}
#pragma mark - MWMSearchObserver
- (void)onSearchCompleted
{
if (self.state != MWMSearchManagerStateTableSearch)
return;
[self animateConstraints:^{
BOOL hideActionBar = false;
if (IPAD)
hideActionBar = !([MWMSearch isHotelResults] || [MWMSearch hasFilter]);
else
hideActionBar = ([MWMSearch suggestionsCount] != 0);
self.actionBarState = hideActionBar ? MWMSearchManagerActionBarStateHidden
: MWMSearchManagerActionBarStateModeFilter;
}];
}
#pragma mark - Filters
- (IBAction)changeMode
{
switch (self.state)
{
case MWMSearchManagerStateTableSearch: self.state = MWMSearchManagerStateMapSearch; break;
case MWMSearchManagerStateMapSearch: self.state = MWMSearchManagerStateTableSearch;
default: break;
}
}
@ -305,31 +388,23 @@ extern NSString * const kSearchStateKey = @"SearchStateKey";
- (UIViewController *)topController
{
if (self.state == MWMSearchManagerStateHidden ||
GetFramework().GetStorage().HaveDownloadedCountries())
[MWMFrameworkListener removeObserver:self];
[MWMSearch removeObserver:self.tableViewController];
self.noMapsController = nil;
switch (self.state)
{
return self.tabbedController;
}
else
{
if (!self.noMapsController)
{
UIStoryboard * storyboard =
[UIStoryboard storyboardWithName:@"Mapsme" bundle:[NSBundle mainBundle]];
self.noMapsController =
[storyboard instantiateViewControllerWithIdentifier:@"MWMNoMapsViewController"];
}
return self.noMapsController;
}
}
- (void)setNoMapsController:(MWMNoMapsViewController *)noMapsController
{
_noMapsController = noMapsController;
if (noMapsController)
case MWMSearchManagerStateHidden: return self.tabbedController;
case MWMSearchManagerStateDefault:
if (GetFramework().GetStorage().HaveDownloadedCountries())
return self.tabbedController;
self.noMapsController = [MWMNoMapsViewController controller];
[MWMFrameworkListener addObserver:self];
else
[MWMFrameworkListener removeObserver:self];
return self.noMapsController;
case MWMSearchManagerStateTableSearch:
[MWMSearch addObserver:self.tableViewController];
return self.tableViewController;
case MWMSearchManagerStateMapSearch: return self.tableViewController;
}
}
- (MWMSearchTabbedViewController *)tabbedController
@ -399,5 +474,79 @@ extern NSString * const kSearchStateKey = @"SearchStateKey";
[[MWMMapViewControlsManager manager] searchViewDidEnterState:state];
}
- (UIView *)view { return self.rootView; }
- (void)viewHidden:(BOOL)hidden
{
UIView * searchBarView = self.searchBarView;
UIView * actionBarView = self.actionBarView;
UIView * contentView = self.contentView;
UIView * parentView = self.ownerController.view;
if (hidden)
{
[[MWMMapViewControlsManager manager] searchFrameUpdated:{}];
}
else
{
if (searchBarView.superview == parentView)
return;
[parentView addSubview:searchBarView];
[parentView addSubview:actionBarView];
[parentView addSubview:contentView];
[self layoutTopViews];
[[MWMMapViewControlsManager manager] searchFrameUpdated:self.searchBarView.frame];
}
[UIView animateWithDuration:kDefaultAnimationDuration
animations:^{
CGFloat const alpha = hidden ? 0 : 1;
searchBarView.alpha = alpha;
actionBarView.alpha = alpha;
contentView.alpha = alpha;
}
completion:^(BOOL finished) {
if (!hidden)
return;
[searchBarView removeFromSuperview];
[actionBarView removeFromSuperview];
[contentView removeFromSuperview];
}];
}
- (void)setChangeModeView:(MWMSearchChangeModeView *)changeModeView
{
_changeModeView = changeModeView;
[changeModeView updateForState:self.state];
}
- (void)setActionBarState:(MWMSearchManagerActionBarState)actionBarState
{
if (_actionBarState == actionBarState)
return;
_actionBarState = actionBarState;
switch (actionBarState)
{
case MWMSearchManagerActionBarStateHidden:
self.tabBarView.hidden = YES;
self.changeModeView.hidden = YES;
self.actionBarViewHeight.priority = UILayoutPriorityDefaultHigh;
self.tabBarViewHeight.priority = UILayoutPriorityDefaultLow;
self.changeModeViewHeight.priority = UILayoutPriorityDefaultLow;
break;
case MWMSearchManagerActionBarStateTabBar:
self.tabBarView.hidden = NO;
self.changeModeView.hidden = YES;
self.actionBarViewHeight.priority = UILayoutPriorityDefaultLow;
self.tabBarViewHeight.priority = UILayoutPriorityDefaultHigh;
self.changeModeViewHeight.priority = UILayoutPriorityDefaultLow;
break;
case MWMSearchManagerActionBarStateModeFilter:
self.tabBarView.hidden = YES;
self.changeModeView.hidden = NO;
self.actionBarViewHeight.priority = UILayoutPriorityDefaultLow;
self.tabBarViewHeight.priority = UILayoutPriorityDefaultLow;
self.changeModeViewHeight.priority = UILayoutPriorityDefaultHigh;
break;
}
}
- (UIViewController *)ownerController { return [MapViewController controller]; }
@end

View file

@ -1,17 +0,0 @@
@class MWMSearchTabButtonsView;
@protocol MWMSearchViewProtocol <NSObject>
- (void)searchFrameUpdated:(CGRect)frame;
@end
@interface MWMSearchView : SolidTouchView
@property (nonatomic) BOOL isVisible;
@property (nonatomic) BOOL tabBarIsVisible;
@property (nonatomic) BOOL compact;
@end

View file

@ -1,147 +0,0 @@
#import "MWMSearchView.h"
#import "Common.h"
#import "MWMMapViewControlsManager.h"
#import "MWMSearchTabButtonsView.h"
static CGFloat constexpr kWidthForiPad = 320.0;
@interface MWMSearchView ()
@property (weak, nonatomic) IBOutlet UIView * searchBar;
@property (weak, nonatomic) IBOutlet UIView * infoWrapper;
@property (weak, nonatomic) IBOutlet UIView * tabBar;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint * tabBarTopOffset;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint * tabBarHeight;
@property (nonatomic) CGFloat correctMinX;
@end
@implementation MWMSearchView
- (void)awakeFromNib
{
[super awakeFromNib];
self.autoresizingMask = UIViewAutoresizingFlexibleHeight;
self.correctMinX = -kWidthForiPad;
CALayer * sl = self.layer;
CALayer * sbl = self.searchBar.layer;
CALayer * tbl = self.tabBar.layer;
CGFloat const scale = UIScreen.mainScreen.scale;
sl.shouldRasterize = sbl.shouldRasterize = tbl.shouldRasterize = YES;
sl.rasterizationScale = sbl.rasterizationScale = tbl.rasterizationScale = scale;
}
- (void)mwm_refreshUI
{
[self.searchBar mwm_refreshUI];
[self.infoWrapper mwm_refreshUI];
}
- (void)setFrame:(CGRect)frame
{
BOOL const equal = CGRectEqualToRect(super.frame, frame);
super.frame = frame;
if (!equal && self.superview && self.isVisible && (IPAD || self.compact))
[[MWMMapViewControlsManager manager] searchFrameUpdated:frame];
}
- (void)layoutSubviews
{
[super layoutSubviews];
if (IPAD)
{
self.frame = {{self.correctMinX, 0.0}, {kWidthForiPad, self.superview.height}};
}
else
{
self.frame = self.superview.bounds;
if (self.compact)
self.height = self.searchBar.minY + self.searchBar.height;
}
if (self.tabBarIsVisible)
self.tabBar.hidden = NO;
CGFloat const tabBarHeight = self.height > self.width ? 64.0 : 44.0;
self.tabBarHeight.constant = tabBarHeight;
self.tabBarTopOffset.constant = self.tabBarIsVisible ? 0.0 : -tabBarHeight;
self.searchBar.layer.shadowRadius = self.tabBarIsVisible ? 0.0 : 2.0;
[UIView animateWithDuration:kDefaultAnimationDuration animations:^
{
[self.tabBar.subviews enumerateObjectsUsingBlock:^(MWMSearchTabButtonsView * btn, NSUInteger idx, BOOL *stop)
{
[btn setNeedsLayout];
}];
if (!self.tabBarIsVisible)
self.tabBar.hidden = YES;
[self.tabBar layoutIfNeeded];
}];
[super layoutSubviews];
}
#pragma mark - Properties
- (void)setIsVisible:(BOOL)isVisible
{
if (_isVisible == isVisible)
return;
_isVisible = isVisible;
self.minY = 0.0;
self.height = self.superview.height;
if (IPAD)
{
if (isVisible)
self.hidden = NO;
self.correctMinX = self.minX = isVisible ? -kWidthForiPad : 0.0;
[UIView animateWithDuration:kDefaultAnimationDuration animations:^
{
self.correctMinX = self.minX = isVisible ? 0.0: -kWidthForiPad;
}
completion:^(BOOL finished)
{
if (!isVisible)
{
self.hidden = YES;
[self removeFromSuperview];
}
}];
}
else
{
self.hidden = !isVisible;
if (!isVisible)
[self removeFromSuperview];
}
[self setNeedsLayout];
}
- (void)setTabBarIsVisible:(BOOL)tabBarIsVisible
{
if (_tabBarIsVisible == tabBarIsVisible)
return;
_tabBarIsVisible = tabBarIsVisible;
[self setNeedsLayout];
}
- (void)setCompact:(BOOL)compact
{
if (IPAD)
return;
_compact = compact;
if (!compact)
self.infoWrapper.hidden = NO;
[UIView animateWithDuration:kDefaultAnimationDuration animations:^
{
self.infoWrapper.alpha = compact ? 0.0 : 1.0;
}
completion:^(BOOL finished)
{
if (compact)
self.infoWrapper.hidden = YES;
self.autoresizingMask = compact ? UIViewAutoresizingFlexibleWidth : UIViewAutoresizingFlexibleHeight;
[self setNeedsLayout];
}];
}
@end

View file

@ -1,187 +1,180 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="10117" systemVersion="15G31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES">
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="11542" systemVersion="16B2555" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11524"/>
<capability name="Aspect ratio constraints" minToolsVersion="5.1"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="MWMSearchManager">
<connections>
<outlet property="actionBarView" destination="j3Y-13-kVB" id="bK1-Q3-bqK"/>
<outlet property="actionBarViewFilterButton" destination="hzG-6h-WLq" id="Fty-3F-vdv"/>
<outlet property="actionBarViewHeight" destination="d2f-Ky-6ce" id="c7u-nA-Gyt"/>
<outlet property="changeModeView" destination="Ysx-Oh-UYF" id="FpT-aA-52q"/>
<outlet property="changeModeViewHeight" destination="RoV-rx-XeQ" id="CwN-02-N5r"/>
<outlet property="contentView" destination="u9y-bx-NGd" id="A03-AI-DbY"/>
<outlet property="rootView" destination="qlt-2e-w3m" id="yqq-AG-own"/>
<outlet property="filterButton" destination="hzG-6h-WLq" id="GuU-HC-7iC"/>
<outlet property="scrollIndicator" destination="G6M-wl-tUg" id="1Nv-0J-Oaa"/>
<outlet property="scrollIndicatorOffset" destination="pXP-hL-DL3" id="pKG-un-cWZ"/>
<outlet property="searchBarView" destination="HcT-Cg-vp3" id="2V7-yP-Zef"/>
<outlet property="searchTextField" destination="hna-zw-Zor" id="IK9-Wx-pk8"/>
<outlet property="tabBarView" destination="Smx-UL-Mcd" id="yDV-Kv-Lui"/>
<outlet property="tabBarViewHeight" destination="JxX-35-uQe" id="O94-IB-u3E"/>
<outletCollection property="tabButtons" destination="yHM-kd-o0T" id="UV5-50-cQR"/>
<outletCollection property="tabButtons" destination="YT7-kp-bFI" id="RY3-K3-Vim"/>
<outletCollection property="topViews" destination="HcT-Cg-vp3" id="d2H-tu-zIE"/>
<outletCollection property="topViews" destination="j3Y-13-kVB" id="s8E-zl-SfH"/>
<outletCollection property="topViews" destination="u9y-bx-NGd" id="mAw-CD-QQV"/>
</connections>
</placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view contentMode="scaleToFill" id="qlt-2e-w3m" customClass="MWMSearchView">
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="HcT-Cg-vp3" userLabel="SearchBar" customClass="SolidTouchView">
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="grH-Hm-JRD" userLabel="InfoWrapper">
<rect key="frame" x="0.0" y="64" width="320" height="504"/>
<subviews>
<view clipsSubviews="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="u9y-bx-NGd" userLabel="Content" customClass="MWMSearchContentView">
<rect key="frame" x="0.0" y="64" width="320" height="440"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="backgroundColorName" value="white"/>
</userDefinedRuntimeAttributes>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Smx-UL-Mcd" userLabel="TabBar">
<rect key="frame" x="0.0" y="0.0" width="320" height="64"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="yHM-kd-o0T" userLabel="History" customClass="MWMSearchTabButtonsView">
<rect key="frame" x="0.0" y="0.0" width="160" height="60"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="image" keyPath="iconImage" value="ic_history_tab"/>
<userDefinedRuntimeAttribute type="string" keyPath="localizedText" value="history"/>
</userDefinedRuntimeAttributes>
<connections>
<outlet property="delegate" destination="-1" id="Rfz-3u-nB0"/>
</connections>
</view>
<view tag="1" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="YT7-kp-bFI" userLabel="Categories" customClass="MWMSearchTabButtonsView">
<rect key="frame" x="160" y="0.0" width="160" height="60"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="localizedText" value="categories"/>
<userDefinedRuntimeAttribute type="image" keyPath="iconImage" value="ic_category_tab"/>
</userDefinedRuntimeAttributes>
<connections>
<outlet property="delegate" destination="-1" id="HFa-nc-cL3"/>
</connections>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="G6M-wl-tUg" userLabel="ScrollIndicator">
<rect key="frame" x="0.0" y="60" width="160" height="4"/>
<color key="backgroundColor" red="0.1176470588" green="0.58823529409999997" blue="0.94117647059999998" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="height" constant="4" id="k6i-ll-1hB"/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="backgroundColorName" value="linkBlue"/>
</userDefinedRuntimeAttributes>
</view>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="yHM-kd-o0T" firstAttribute="top" secondItem="Smx-UL-Mcd" secondAttribute="top" id="3j1-jw-8LX"/>
<constraint firstItem="YT7-kp-bFI" firstAttribute="leading" secondItem="yHM-kd-o0T" secondAttribute="trailing" id="CPz-Zq-Upl"/>
<constraint firstItem="yHM-kd-o0T" firstAttribute="leading" secondItem="Smx-UL-Mcd" secondAttribute="leading" id="CiG-5j-NML"/>
<constraint firstItem="G6M-wl-tUg" firstAttribute="top" secondItem="yHM-kd-o0T" secondAttribute="bottom" id="F8A-7M-DZD"/>
<constraint firstAttribute="trailing" secondItem="YT7-kp-bFI" secondAttribute="trailing" id="FaM-kd-VGc"/>
<constraint firstItem="G6M-wl-tUg" firstAttribute="top" secondItem="YT7-kp-bFI" secondAttribute="bottom" id="PJH-Uk-AKu"/>
<constraint firstItem="yHM-kd-o0T" firstAttribute="width" secondItem="G6M-wl-tUg" secondAttribute="width" id="Sh9-x5-DW0"/>
<constraint firstAttribute="height" constant="64" id="U1L-sF-oFx"/>
<constraint firstItem="YT7-kp-bFI" firstAttribute="width" secondItem="yHM-kd-o0T" secondAttribute="width" id="UIr-Jy-xTu"/>
<constraint firstItem="YT7-kp-bFI" firstAttribute="top" secondItem="Smx-UL-Mcd" secondAttribute="top" id="fBe-s6-zJz"/>
<constraint firstItem="G6M-wl-tUg" firstAttribute="leading" secondItem="Smx-UL-Mcd" secondAttribute="leading" id="pXP-hL-DL3"/>
<constraint firstAttribute="bottom" secondItem="G6M-wl-tUg" secondAttribute="bottom" id="v8p-Lf-3HF"/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="layer.shadowRadius">
<integer key="value" value="2"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="color" keyPath="layer.shadowUIColor">
<color key="value" red="0.0" green="0.0" blue="0.0" alpha="0.23999999999999999" colorSpace="calibratedRGB"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="number" keyPath="layer.shadowOpacity">
<integer key="value" value="1"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="size" keyPath="layer.shadowOffset">
<size key="value" width="0.0" height="0.0"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="string" keyPath="backgroundColorName" value="white"/>
</userDefinedRuntimeAttributes>
</view>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="8lb-Vi-0oJ" userLabel="StatusBarBackground">
<rect key="frame" x="0.0" y="-20" width="320" height="20"/>
<color key="backgroundColor" red="0.12549019610000001" green="0.59607843140000005" blue="0.32156862749999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="u9y-bx-NGd" firstAttribute="top" secondItem="Smx-UL-Mcd" secondAttribute="bottom" id="D3P-cI-mTV"/>
<constraint firstItem="u9y-bx-NGd" firstAttribute="centerX" secondItem="Smx-UL-Mcd" secondAttribute="centerX" id="Obn-RT-JF1"/>
<constraint firstAttribute="centerX" secondItem="Smx-UL-Mcd" secondAttribute="centerX" id="cZL-tC-JsE"/>
<constraint firstAttribute="width" secondItem="Smx-UL-Mcd" secondAttribute="width" id="ggO-ka-9vl"/>
<constraint firstItem="u9y-bx-NGd" firstAttribute="width" secondItem="Smx-UL-Mcd" secondAttribute="width" id="stA-ZK-6ZL"/>
<constraint firstItem="Smx-UL-Mcd" firstAttribute="top" secondItem="grH-Hm-JRD" secondAttribute="top" id="wq0-ta-MXo"/>
<constraint firstAttribute="bottom" secondItem="u9y-bx-NGd" secondAttribute="bottom" id="ztw-wn-pBJ"/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="backgroundColorName" value="white"/>
</userDefinedRuntimeAttributes>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="HcT-Cg-vp3" userLabel="SearchBar">
<rect key="frame" x="0.0" y="20" width="320" height="44"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="8lb-Vi-0oJ" userLabel="StatusBarBackground">
<rect key="frame" x="0.0" y="-20" width="320" height="20"/>
<color key="backgroundColor" red="0.12549019610000001" green="0.59607843140000005" blue="0.32156862749999998" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="height" constant="20" id="uq8-gE-5iC"/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="backgroundColorName" value="primary"/>
</userDefinedRuntimeAttributes>
</view>
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" adjustsFontSizeToFit="NO" minimumFontSize="17" clearButtonMode="always" translatesAutoresizingMaskIntoConstraints="NO" id="hna-zw-Zor" userLabel="Search" customClass="MWMSearchTextField">
<rect key="frame" x="8" y="4" width="246" height="36"/>
<fontDescription key="fontDescription" name="HelveticaNeue" family="Helvetica Neue" pointSize="14"/>
<textInputTraits key="textInputTraits" autocorrectionType="no" returnKeyType="search"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="backgroundColorName" value="white"/>
<userDefinedRuntimeAttribute type="string" keyPath="localizedPlaceholder" value="search"/>
<userDefinedRuntimeAttribute type="string" keyPath="_placeholderLabel.colorName" value="blackHintText"/>
</userDefinedRuntimeAttributes>
<connections>
<action selector="textFieldDidBeginEditing:" destination="-1" eventType="editingDidBegin" id="MvO-ga-X7R"/>
<action selector="textFieldDidEndEditing:" destination="-1" eventType="editingDidEnd" id="1NS-lr-9DA"/>
<action selector="textFieldTextDidChange:" destination="-1" eventType="editingChanged" id="lni-qP-88W"/>
<outlet property="delegate" destination="-1" id="1dg-Kn-jnV"/>
</connections>
</textField>
<button opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="wordWrap" translatesAutoresizingMaskIntoConstraints="NO" id="5Hu-71-uqb">
<rect key="frame" x="254" y="0.0" width="66" height="44"/>
<constraints>
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="66" id="vlY-Wi-Dvw"/>
</constraints>
<fontDescription key="fontDescription" name="HelveticaNeue" family="Helvetica Neue" pointSize="15"/>
<inset key="contentEdgeInsets" minX="4" minY="0.0" maxX="4" maxY="0.0"/>
<state key="normal" title="Cancel">
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
</state>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="localizedText" value="cancel"/>
<userDefinedRuntimeAttribute type="string" keyPath="textColorName" value="whitePrimaryText"/>
</userDefinedRuntimeAttributes>
<connections>
<action selector="cancelButtonPressed" destination="-1" eventType="touchUpInside" id="8EF-82-bpl"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" red="0.12549019607843137" green="0.59607843137254901" blue="0.32156862745098036" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="height" constant="44" id="92s-Aa-9VQ"/>
<constraint firstAttribute="bottom" secondItem="hna-zw-Zor" secondAttribute="bottom" constant="4" id="JRS-Wn-APP"/>
<constraint firstItem="hna-zw-Zor" firstAttribute="top" secondItem="HcT-Cg-vp3" secondAttribute="top" constant="4" id="OpQ-jn-TbX"/>
<constraint firstItem="5Hu-71-uqb" firstAttribute="leading" secondItem="hna-zw-Zor" secondAttribute="trailing" id="UnO-5R-Vaq"/>
<constraint firstAttribute="trailing" secondItem="8lb-Vi-0oJ" secondAttribute="trailing" id="cOI-Bb-dVh"/>
<constraint firstItem="5Hu-71-uqb" firstAttribute="top" secondItem="HcT-Cg-vp3" secondAttribute="top" id="jGx-GC-U0a"/>
<constraint firstAttribute="trailing" secondItem="5Hu-71-uqb" secondAttribute="trailing" id="lsP-Aa-SwK"/>
<constraint firstItem="8lb-Vi-0oJ" firstAttribute="top" secondItem="HcT-Cg-vp3" secondAttribute="top" constant="-20" id="noI-hv-7dz"/>
<constraint firstAttribute="bottom" secondItem="5Hu-71-uqb" secondAttribute="bottom" id="qqg-dK-O8g"/>
<constraint firstItem="hna-zw-Zor" firstAttribute="leading" secondItem="HcT-Cg-vp3" secondAttribute="leading" constant="8" id="tLC-W9-2XZ"/>
<constraint firstItem="8lb-Vi-0oJ" firstAttribute="leading" secondItem="HcT-Cg-vp3" secondAttribute="leading" id="wB0-LU-IyU"/>
<constraint firstAttribute="height" constant="20" id="uq8-gE-5iC"/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="backgroundColorName" value="primary"/>
</userDefinedRuntimeAttributes>
</view>
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" adjustsFontSizeToFit="NO" minimumFontSize="17" clearButtonMode="always" translatesAutoresizingMaskIntoConstraints="NO" id="hna-zw-Zor" userLabel="Search" customClass="MWMSearchTextField">
<rect key="frame" x="8" y="4" width="246" height="36"/>
<fontDescription key="fontDescription" name="HelveticaNeue" family="Helvetica Neue" pointSize="14"/>
<textInputTraits key="textInputTraits" autocorrectionType="no" returnKeyType="search"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="backgroundColorName" value="white"/>
<userDefinedRuntimeAttribute type="string" keyPath="localizedPlaceholder" value="search"/>
<userDefinedRuntimeAttribute type="string" keyPath="_placeholderLabel.colorName" value="blackHintText"/>
</userDefinedRuntimeAttributes>
<connections>
<action selector="textFieldDidEndEditing:" destination="-1" eventType="editingDidEnd" id="1NS-lr-9DA"/>
<action selector="textFieldTextDidChange:" destination="-1" eventType="editingChanged" id="lni-qP-88W"/>
<outlet property="delegate" destination="-1" id="1dg-Kn-jnV"/>
</connections>
</textField>
<button opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="wordWrap" translatesAutoresizingMaskIntoConstraints="NO" id="5Hu-71-uqb">
<rect key="frame" x="254" y="0.0" width="66" height="44"/>
<constraints>
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="66" id="vlY-Wi-Dvw"/>
</constraints>
<fontDescription key="fontDescription" name="HelveticaNeue" family="Helvetica Neue" pointSize="15"/>
<inset key="contentEdgeInsets" minX="4" minY="0.0" maxX="4" maxY="0.0"/>
<state key="normal" title="Cancel">
<color key="titleShadowColor" red="0.5" green="0.5" blue="0.5" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</state>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="localizedText" value="cancel"/>
<userDefinedRuntimeAttribute type="string" keyPath="textColorName" value="whitePrimaryText"/>
</userDefinedRuntimeAttributes>
<connections>
<action selector="cancelButtonPressed" destination="-1" eventType="touchUpInside" id="8EF-82-bpl"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" red="0.12549019607843137" green="0.59607843137254901" blue="0.32156862745098036" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" constant="44" id="92s-Aa-9VQ"/>
<constraint firstAttribute="bottom" secondItem="hna-zw-Zor" secondAttribute="bottom" constant="4" id="JRS-Wn-APP"/>
<constraint firstItem="hna-zw-Zor" firstAttribute="top" secondItem="HcT-Cg-vp3" secondAttribute="top" constant="4" id="OpQ-jn-TbX"/>
<constraint firstItem="5Hu-71-uqb" firstAttribute="leading" secondItem="hna-zw-Zor" secondAttribute="trailing" id="UnO-5R-Vaq"/>
<constraint firstAttribute="trailing" secondItem="8lb-Vi-0oJ" secondAttribute="trailing" id="cOI-Bb-dVh"/>
<constraint firstItem="5Hu-71-uqb" firstAttribute="top" secondItem="HcT-Cg-vp3" secondAttribute="top" id="jGx-GC-U0a"/>
<constraint firstAttribute="trailing" secondItem="5Hu-71-uqb" secondAttribute="trailing" id="lsP-Aa-SwK"/>
<constraint firstItem="8lb-Vi-0oJ" firstAttribute="top" secondItem="HcT-Cg-vp3" secondAttribute="top" constant="-20" id="noI-hv-7dz"/>
<constraint firstAttribute="bottom" secondItem="5Hu-71-uqb" secondAttribute="bottom" id="qqg-dK-O8g"/>
<constraint firstItem="hna-zw-Zor" firstAttribute="leading" secondItem="HcT-Cg-vp3" secondAttribute="leading" constant="8" id="tLC-W9-2XZ"/>
<constraint firstItem="8lb-Vi-0oJ" firstAttribute="leading" secondItem="HcT-Cg-vp3" secondAttribute="leading" id="wB0-LU-IyU"/>
</constraints>
<nil key="simulatedStatusBarMetrics"/>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="backgroundColorName" value="primary"/>
<userDefinedRuntimeAttribute type="number" keyPath="layer.shadowRadius">
<integer key="value" value="2"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="color" keyPath="layer.shadowUIColor">
<color key="value" red="0.0" green="0.0" blue="0.0" alpha="0.23999999999999999" colorSpace="custom" customColorSpace="sRGB"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="number" keyPath="layer.shadowOpacity">
<integer key="value" value="1"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="size" keyPath="layer.shadowOffset">
<size key="value" width="0.0" height="0.0"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
<point key="canvasLocation" x="236" y="-242"/>
</view>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="j3Y-13-kVB" userLabel="ActionBar" customClass="SolidTouchView">
<rect key="frame" x="0.0" y="0.0" width="320" height="48"/>
<subviews>
<view clipsSubviews="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Smx-UL-Mcd" userLabel="TabBar">
<rect key="frame" x="0.0" y="0.0" width="320" height="64"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="yHM-kd-o0T" userLabel="History" customClass="MWMSearchTabButtonsView">
<rect key="frame" x="0.0" y="0.0" width="160" height="60"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="image" keyPath="iconImage" value="ic_history_tab"/>
<userDefinedRuntimeAttribute type="string" keyPath="localizedText" value="history"/>
</userDefinedRuntimeAttributes>
<connections>
<outlet property="delegate" destination="-1" id="Rfz-3u-nB0"/>
</connections>
</view>
<view tag="1" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="YT7-kp-bFI" userLabel="Categories" customClass="MWMSearchTabButtonsView">
<rect key="frame" x="160" y="0.0" width="160" height="60"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="localizedText" value="categories"/>
<userDefinedRuntimeAttribute type="image" keyPath="iconImage" value="ic_category_tab"/>
</userDefinedRuntimeAttributes>
<connections>
<outlet property="delegate" destination="-1" id="HFa-nc-cL3"/>
</connections>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="G6M-wl-tUg" userLabel="ScrollIndicator">
<rect key="frame" x="0.0" y="60" width="160" height="4"/>
<color key="backgroundColor" red="0.1176470588" green="0.58823529409999997" blue="0.94117647059999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" constant="4" id="k6i-ll-1hB"/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="backgroundColorName" value="linkBlue"/>
</userDefinedRuntimeAttributes>
</view>
</subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="yHM-kd-o0T" firstAttribute="top" secondItem="Smx-UL-Mcd" secondAttribute="top" id="3j1-jw-8LX"/>
<constraint firstItem="YT7-kp-bFI" firstAttribute="leading" secondItem="yHM-kd-o0T" secondAttribute="trailing" id="CPz-Zq-Upl"/>
<constraint firstItem="yHM-kd-o0T" firstAttribute="leading" secondItem="Smx-UL-Mcd" secondAttribute="leading" id="CiG-5j-NML"/>
<constraint firstItem="G6M-wl-tUg" firstAttribute="top" secondItem="yHM-kd-o0T" secondAttribute="bottom" id="F8A-7M-DZD"/>
<constraint firstAttribute="trailing" secondItem="YT7-kp-bFI" secondAttribute="trailing" id="FaM-kd-VGc"/>
<constraint firstAttribute="height" priority="750" constant="64" id="JxX-35-uQe">
<variation key="heightClass=compact" constant="44"/>
</constraint>
<constraint firstItem="G6M-wl-tUg" firstAttribute="top" secondItem="YT7-kp-bFI" secondAttribute="bottom" id="PJH-Uk-AKu"/>
<constraint firstItem="yHM-kd-o0T" firstAttribute="width" secondItem="G6M-wl-tUg" secondAttribute="width" id="Sh9-x5-DW0"/>
<constraint firstItem="YT7-kp-bFI" firstAttribute="width" secondItem="yHM-kd-o0T" secondAttribute="width" id="UIr-Jy-xTu"/>
<constraint firstItem="YT7-kp-bFI" firstAttribute="top" secondItem="Smx-UL-Mcd" secondAttribute="top" id="fBe-s6-zJz"/>
<constraint firstItem="G6M-wl-tUg" firstAttribute="leading" secondItem="Smx-UL-Mcd" secondAttribute="leading" id="pXP-hL-DL3"/>
<constraint firstAttribute="bottom" secondItem="G6M-wl-tUg" secondAttribute="bottom" id="v8p-Lf-3HF"/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="layer.shadowRadius">
<integer key="value" value="2"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="color" keyPath="layer.shadowUIColor">
<color key="value" red="0.0" green="0.0" blue="0.0" alpha="0.23999999999999999" colorSpace="calibratedRGB"/>
<color key="value" red="0.0" green="0.0" blue="0.0" alpha="0.23999999999999999" colorSpace="custom" customColorSpace="sRGB"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="number" keyPath="layer.shadowOpacity">
<integer key="value" value="1"/>
@ -189,45 +182,119 @@
<userDefinedRuntimeAttribute type="size" keyPath="layer.shadowOffset">
<size key="value" width="0.0" height="0.0"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="string" keyPath="backgroundColorName" value="white"/>
</userDefinedRuntimeAttributes>
</view>
<view hidden="YES" clipsSubviews="YES" contentMode="scaleToFill" verticalCompressionResistancePriority="400" translatesAutoresizingMaskIntoConstraints="NO" id="Ysx-Oh-UYF" customClass="MWMSearchChangeModeView">
<rect key="frame" x="0.0" y="0.0" width="320" height="48"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="240" verticalCompressionResistancePriority="400" contentHorizontalAlignment="left" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="JhV-gM-MgM">
<rect key="frame" x="0.0" y="0.0" width="207" height="48"/>
<inset key="contentEdgeInsets" minX="16" minY="0.0" maxX="0.0" maxY="0.0"/>
<state key="normal" title="Search on map"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="fontName" value="bold17"/>
<userDefinedRuntimeAttribute type="string" keyPath="textColorName" value="linkBlue"/>
<userDefinedRuntimeAttribute type="string" keyPath="localizedText" value="search_on_map"/>
</userDefinedRuntimeAttributes>
<connections>
<action selector="changeMode" destination="-1" eventType="touchUpInside" id="nbm-wH-tyA"/>
</connections>
</button>
<button hidden="YES" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="right" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="hzG-6h-WLq" customClass="MWMStartButton">
<rect key="frame" x="215" y="6" width="99" height="36"/>
<constraints>
<constraint firstAttribute="height" constant="36" id="2Ex-Nf-Iig"/>
</constraints>
<inset key="contentEdgeInsets" minX="42" minY="0.0" maxX="16" maxY="0.0"/>
<state key="normal" title="Filter">
<color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</state>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="fontName" value="regular17"/>
<userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
<integer key="value" value="4"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="string" keyPath="localizedText" value="filter"/>
<userDefinedRuntimeAttribute type="string" keyPath="textColorName" value="white"/>
<userDefinedRuntimeAttribute type="string" keyPath="backgroundColorName" value="linkBlue"/>
<userDefinedRuntimeAttribute type="string" keyPath="backgroundHighlightedColorName" value="linkBlueHighlighted"/>
</userDefinedRuntimeAttributes>
<connections>
<action selector="updateFilter" destination="-1" eventType="touchUpInside" id="Dpe-pe-Kps"/>
</connections>
</button>
<button hidden="YES" opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="vUE-KN-mbf" customClass="MWMButton">
<rect key="frame" x="215" y="6" width="36" height="36"/>
<constraints>
<constraint firstAttribute="width" secondItem="vUE-KN-mbf" secondAttribute="height" multiplier="1:1" id="UHQ-XS-Sxz"/>
</constraints>
<color key="tintColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<state key="normal" image="ic_clear_filters"/>
<connections>
<action selector="clearFilter" destination="-1" eventType="touchUpInside" id="7mj-0w-Qch"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="hzG-6h-WLq" firstAttribute="centerY" secondItem="Ysx-Oh-UYF" secondAttribute="centerY" id="1N7-rG-2fp"/>
<constraint firstItem="vUE-KN-mbf" firstAttribute="leading" secondItem="hzG-6h-WLq" secondAttribute="leading" id="5Wx-qc-fqQ"/>
<constraint firstItem="JhV-gM-MgM" firstAttribute="height" secondItem="Ysx-Oh-UYF" secondAttribute="height" id="Bfm-GU-HJ9"/>
<constraint firstAttribute="height" priority="250" constant="48" id="RoV-rx-XeQ"/>
<constraint firstAttribute="trailing" secondItem="hzG-6h-WLq" secondAttribute="trailing" priority="500" constant="6" id="VY6-c5-vkY"/>
<constraint firstItem="vUE-KN-mbf" firstAttribute="top" secondItem="hzG-6h-WLq" secondAttribute="top" id="fK9-QU-t1N"/>
<constraint firstItem="hzG-6h-WLq" firstAttribute="centerX" secondItem="Ysx-Oh-UYF" secondAttribute="centerX" priority="250" id="ff5-qG-Ys6"/>
<constraint firstItem="vUE-KN-mbf" firstAttribute="bottom" secondItem="hzG-6h-WLq" secondAttribute="bottom" id="hsI-F8-c35"/>
<constraint firstItem="hzG-6h-WLq" firstAttribute="leading" secondItem="JhV-gM-MgM" secondAttribute="trailing" priority="500" constant="8" id="iMA-u6-5S9"/>
<constraint firstItem="JhV-gM-MgM" firstAttribute="leading" secondItem="Ysx-Oh-UYF" secondAttribute="leading" id="iwa-86-Rhh"/>
<constraint firstItem="JhV-gM-MgM" firstAttribute="top" secondItem="Ysx-Oh-UYF" secondAttribute="top" id="y3t-5r-CMa"/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="backgroundColorName" value="pressBackground"/>
</userDefinedRuntimeAttributes>
<connections>
<outlet property="cancelFilterButton" destination="vUE-KN-mbf" id="dwF-9p-lgq"/>
<outlet property="changeModeButton" destination="JhV-gM-MgM" id="LFr-bo-q9U"/>
<outlet property="filterButton" destination="hzG-6h-WLq" id="sHx-Ku-nSw"/>
<outlet property="filterButtoniPadX" destination="ff5-qG-Ys6" id="Qan-eT-VF9"/>
</connections>
</view>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="grH-Hm-JRD" firstAttribute="top" secondItem="HcT-Cg-vp3" secondAttribute="bottom" id="6u9-eF-rU6"/>
<constraint firstAttribute="bottom" secondItem="grH-Hm-JRD" secondAttribute="bottom" id="HgS-sO-zcO"/>
<constraint firstItem="HcT-Cg-vp3" firstAttribute="centerX" secondItem="grH-Hm-JRD" secondAttribute="centerX" id="MLg-DM-m1P"/>
<constraint firstItem="HcT-Cg-vp3" firstAttribute="width" secondItem="grH-Hm-JRD" secondAttribute="width" id="MgO-bz-vxh"/>
<constraint firstItem="HcT-Cg-vp3" firstAttribute="top" secondItem="qlt-2e-w3m" secondAttribute="top" constant="20" id="OqS-Bt-SrV"/>
<constraint firstAttribute="trailing" secondItem="HcT-Cg-vp3" secondAttribute="trailing" id="fue-yU-Sug"/>
<constraint firstItem="HcT-Cg-vp3" firstAttribute="leading" secondItem="qlt-2e-w3m" secondAttribute="leading" id="zLj-Dx-QRd"/>
<constraint firstAttribute="bottom" secondItem="Smx-UL-Mcd" secondAttribute="bottom" priority="400" id="45d-2I-giP"/>
<constraint firstAttribute="trailing" secondItem="Smx-UL-Mcd" secondAttribute="trailing" id="8o3-5l-8dh"/>
<constraint firstItem="Smx-UL-Mcd" firstAttribute="top" secondItem="j3Y-13-kVB" secondAttribute="top" id="MUE-ck-4aX"/>
<constraint firstAttribute="bottom" secondItem="Ysx-Oh-UYF" secondAttribute="bottom" priority="400" id="aBS-8P-zF4"/>
<constraint firstAttribute="height" priority="250" id="d2f-Ky-6ce"/>
<constraint firstAttribute="trailing" secondItem="Ysx-Oh-UYF" secondAttribute="trailing" id="dJU-g3-WqH"/>
<constraint firstItem="Ysx-Oh-UYF" firstAttribute="leading" secondItem="j3Y-13-kVB" secondAttribute="leading" id="rHd-Vw-BK1"/>
<constraint firstItem="Ysx-Oh-UYF" firstAttribute="top" secondItem="j3Y-13-kVB" secondAttribute="top" id="vZg-em-Rn2"/>
<constraint firstItem="Smx-UL-Mcd" firstAttribute="leading" secondItem="j3Y-13-kVB" secondAttribute="leading" id="xn7-7r-8VD"/>
</constraints>
<nil key="simulatedStatusBarMetrics"/>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="layer.shadowRadius">
<integer key="value" value="2"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="color" keyPath="layer.shadowUIColor">
<color key="value" white="0.0" alpha="0.23999999999999999" colorSpace="calibratedWhite"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="number" keyPath="layer.shadowOpacity">
<integer key="value" value="1"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="size" keyPath="layer.shadowOffset">
<size key="value" width="3" height="0.0"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="string" keyPath="backgroundColorName" value="white"/>
</userDefinedRuntimeAttributes>
<connections>
<outlet property="infoWrapper" destination="grH-Hm-JRD" id="CLw-RM-gVN"/>
<outlet property="searchBar" destination="HcT-Cg-vp3" id="FtT-Dm-poQ"/>
<outlet property="tabBar" destination="Smx-UL-Mcd" id="hGo-I2-jz7"/>
<outlet property="tabBarHeight" destination="U1L-sF-oFx" id="EuL-7z-2dA"/>
<outlet property="tabBarTopOffset" destination="wq0-ta-MXo" id="Qih-E6-6fa"/>
</connections>
<point key="canvasLocation" x="236" y="280"/>
<point key="canvasLocation" x="236" y="-58"/>
</view>
<view clipsSubviews="YES" contentMode="scaleToFill" id="u9y-bx-NGd" userLabel="Content" customClass="MWMSearchContentView">
<rect key="frame" x="0.0" y="0.0" width="320" height="402"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="simulatedStatusBarMetrics"/>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="backgroundColorName" value="white"/>
</userDefinedRuntimeAttributes>
<point key="canvasLocation" x="236" y="229"/>
</view>
</objects>
<resources>
<image name="ic_category_tab" width="28" height="28"/>
<image name="ic_clear_filters" width="36" height="36"/>
<image name="ic_history_tab" width="28" height="28"/>
</resources>
</document>

View file

@ -1,8 +1,9 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9531" systemVersion="15A284" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="11201" systemVersion="16A323" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9529"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11161"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
@ -11,13 +12,12 @@
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<tableViewCellContentView key="contentView" 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"/>
<frame key="frameInset" width="320" height="43"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Show On Map" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="0Ch-mz-VzP">
<rect key="frame" x="16" y="12" width="288" height="21"/>
<fontDescription key="fontDescription" name="HelveticaNeue-Bold" family="Helvetica Neue" pointSize="17"/>
<color key="textColor" red="0.12549019610000001" green="0.58823529409999997" blue="0.95294117649999999" alpha="1" colorSpace="calibratedRGB"/>
<color key="textColor" red="0.12549019610000001" green="0.58823529409999997" blue="0.95294117649999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="fontName" value="bold17"/>
@ -26,8 +26,7 @@
</userDefinedRuntimeAttributes>
</label>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="e49-Z8-rFG" userLabel="Separator">
<rect key="frame" x="0.0" y="43" width="320" height="1"/>
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.12" colorSpace="calibratedRGB"/>
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.12" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="xjZ-xF-fdl"/>
</constraints>

View file

@ -1,10 +1,5 @@
#import "MWMSearchNoResults.h"
@interface MWMSearchTableView : UIView
@property(weak, nonatomic) IBOutlet UITableView * tableView;
- (void)addNoResultsView:(MWMSearchNoResults *)view;
- (void)removeNoResultsView;
- (void)hideNoResultsView:(BOOL)hide;
@end

View file

@ -1,5 +1,6 @@
#import "MWMSearchTableView.h"
#import "MWMKeyboard.h"
#import "MWMSearchNoResults.h"
@interface MWMSearchTableView ()<MWMKeyboardObserver>
@ -7,6 +8,7 @@
@property(weak, nonatomic) IBOutlet UIView * noResultsContainer;
@property(weak, nonatomic) IBOutlet UIView * noResultsWrapper;
@property(nonatomic) MWMSearchNoResults * noResultsView;
@end
@ -21,18 +23,19 @@
[MWMKeyboard addObserver:self];
}
- (void)addNoResultsView:(MWMSearchNoResults *)view
- (void)hideNoResultsView:(BOOL)hide
{
[self removeNoResultsView];
self.noResultsContainer.hidden = NO;
[self.noResultsWrapper addSubview:view];
[self onKeyboardAnimation];
}
- (void)removeNoResultsView
{
self.noResultsContainer.hidden = YES;
[self.noResultsWrapper.subviews makeObjectsPerformSelector:@selector(removeFromSuperview)];
if (hide)
{
self.noResultsContainer.hidden = YES;
[self.noResultsView removeFromSuperview];
}
else
{
self.noResultsContainer.hidden = NO;
[self.noResultsWrapper addSubview:self.noResultsView];
[self onKeyboardAnimation];
}
}
#pragma mark - MWMKeyboard
@ -53,4 +56,16 @@
if (self.superview)
[self layoutIfNeeded];
}
- (MWMSearchNoResults *)noResultsView
{
if (!_noResultsView)
{
_noResultsView = [MWMSearchNoResults viewWithImage:[UIImage imageNamed:@"img_search_not_found"]
title:nil
text:L(@"search_not_found_query")];
}
return _noResultsView;
}
@end

View file

@ -1,3 +1,4 @@
#import "MWMSearch.h"
#import "MWMSearchManager.h"
#import "MWMSearchTabbedViewProtocol.h"
#import "MWMSearchTextField.h"
@ -8,7 +9,7 @@
namespace search
{
class Result;
}
} // search
@protocol MWMSearchTableViewProtocol<MWMSearchTabbedViewProtocol>
@ -20,9 +21,11 @@ class Result;
@end
@interface MWMSearchTableViewController : MWMViewController
@interface MWMSearchTableViewController : MWMViewController<MWMSearchObserver>
- (nonnull instancetype)init __attribute__((unavailable("init is not available")));
- (nonnull instancetype)initWithDelegate:(nonnull id<MWMSearchTableViewProtocol>)delegate;
- (void)reloadData;
@end

View file

@ -1,6 +1,6 @@
#import "MWMSearchTableViewController.h"
#import "MWMLocationManager.h"
#import "MWMSearch.h"
#import "MWMSearchChangeModeView.h"
#import "MWMSearchCommonCell.h"
#import "MWMSearchShowOnMapCell.h"
#import "MWMSearchSuggestionCell.h"
@ -8,14 +8,13 @@
#import "Macros.h"
#import "MapsAppDelegate.h"
#import "Statistics.h"
#import "ToastView.h"
static NSString * const kTableShowOnMapCell = @"MWMSearchShowOnMapCell";
static NSString * const kTableSuggestionCell = @"MWMSearchSuggestionCell";
static NSString * const kTableCommonCell = @"MWMSearchCommonCell";
namespace
{
typedef NS_ENUM(NSUInteger, MWMSearchTableCellType) {
MWMSearchTableCellTypeOnMap,
MWMSearchTableCellTypeSuggestion,
MWMSearchTableCellTypeCommon
};
@ -24,19 +23,17 @@ NSString * identifierForType(MWMSearchTableCellType type)
{
switch (type)
{
case MWMSearchTableCellTypeOnMap: return kTableShowOnMapCell;
case MWMSearchTableCellTypeSuggestion: return kTableSuggestionCell;
case MWMSearchTableCellTypeCommon: return kTableCommonCell;
}
}
} // namespace
@interface MWMSearchTableViewController ()<UITableViewDataSource, UITableViewDelegate,
MWMSearchObserver>
@interface MWMSearchTableViewController ()<UITableViewDataSource, UITableViewDelegate>
@property(weak, nonatomic) IBOutlet UITableView * tableView;
@property(nonatomic) MWMSearchCommonCell * commonSizingCell;
@property(nonatomic) MWMSearchNoResults * noResultsView;
@property(weak, nonatomic) id<MWMSearchTableViewProtocol> delegate;
@ -61,64 +58,37 @@ NSString * identifierForType(MWMSearchTableCellType type)
- (void)viewWillAppear:(BOOL)animated
{
[super viewWillAppear:animated];
[MWMSearch addObserver:self];
[self.tableView reloadData];
}
- (void)viewWillDisappear:(BOOL)animated
{
[super viewWillDisappear:animated];
[MWMSearch removeObserver:self];
self.tableView.hidden = NO;
[(MWMSearchTableView *)self.view hideNoResultsView:YES];
[self reloadData];
}
- (void)mwm_refreshUI { [self.view mwm_refreshUI]; }
- (void)setupTableView
{
[self.tableView registerNib:[UINib nibWithNibName:kTableShowOnMapCell bundle:nil]
forCellReuseIdentifier:kTableShowOnMapCell];
[self.tableView registerNib:[UINib nibWithNibName:kTableSuggestionCell bundle:nil]
forCellReuseIdentifier:kTableSuggestionCell];
[self.tableView registerNib:[UINib nibWithNibName:kTableCommonCell bundle:nil]
forCellReuseIdentifier:kTableCommonCell];
UITableView * tableView = self.tableView;
[tableView registerNib:[UINib nibWithNibName:kTableSuggestionCell bundle:nil]
forCellReuseIdentifier:kTableSuggestionCell];
[tableView registerNib:[UINib nibWithNibName:kTableCommonCell bundle:nil]
forCellReuseIdentifier:kTableCommonCell];
}
- (MWMSearchTableCellType)cellTypeForIndexPath:(NSIndexPath *)indexPath
{
size_t const numSuggests = [MWMSearch suggestionsCount];
if (numSuggests > 0)
{
return indexPath.row < numSuggests ? MWMSearchTableCellTypeSuggestion
: MWMSearchTableCellTypeCommon;
}
else
{
MWMRoutingPlaneMode const m = MapsAppDelegate.theApp.routingPlaneMode;
if (IPAD || m == MWMRoutingPlaneModeSearchSource || m == MWMRoutingPlaneModeSearchDestination)
return MWMSearchTableCellTypeCommon;
else
return indexPath.row == 0 ? MWMSearchTableCellTypeOnMap : MWMSearchTableCellTypeCommon;
}
if (numSuggests > 0 && indexPath.row < numSuggests)
return MWMSearchTableCellTypeSuggestion;
return MWMSearchTableCellTypeCommon;
}
- (search::Result const &)searchResultForIndexPath:(NSIndexPath *)indexPath
{
MWMSearchTableCellType firstCellType =
[self cellTypeForIndexPath:[NSIndexPath indexPathForRow:0 inSection:0]];
NSUInteger const searchPosition =
indexPath.row - (firstCellType == MWMSearchTableCellTypeOnMap ? 1 : 0);
return [MWMSearch resultAtIndex:searchPosition];
return [MWMSearch resultAtIndex:indexPath.row];
}
- (void)reloadData { [self.tableView reloadData]; }
#pragma mark - Layout
- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
duration:(NSTimeInterval)duration
{
dispatch_async(dispatch_get_main_queue(), ^{
[self onSearchResultsUpdated];
});
}
- (void)viewWillTransitionToSize:(CGSize)size
withTransitionCoordinator:(id<UIViewControllerTransitionCoordinator>)coordinator
{
@ -133,10 +103,7 @@ NSString * identifierForType(MWMSearchTableCellType type)
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
MWMSearchTableCellType firstCellType =
[self cellTypeForIndexPath:[NSIndexPath indexPathForRow:0 inSection:0]];
BOOL const showOnMap = firstCellType == MWMSearchTableCellTypeOnMap;
return [MWMSearch resultsCount] + (showOnMap ? 1 : 0);
return [MWMSearch resultsCount];
}
- (UITableViewCell *)tableView:(UITableView *)tableView
@ -163,7 +130,6 @@ NSString * identifierForType(MWMSearchTableCellType type)
{
switch ([self cellTypeForIndexPath:indexPath])
{
case MWMSearchTableCellTypeOnMap: return MWMSearchShowOnMapCell.cellHeight;
case MWMSearchTableCellTypeSuggestion: return MWMSearchSuggestionCell.cellHeight;
case MWMSearchTableCellTypeCommon: return MWMSearchCommonCell.defaultCellHeight;
}
@ -174,7 +140,6 @@ NSString * identifierForType(MWMSearchTableCellType type)
MWMSearchTableCellType const cellType = [self cellTypeForIndexPath:indexPath];
switch (cellType)
{
case MWMSearchTableCellTypeOnMap: return MWMSearchShowOnMapCell.cellHeight;
case MWMSearchTableCellTypeSuggestion: return MWMSearchSuggestionCell.cellHeight;
case MWMSearchTableCellTypeCommon:
[self.commonSizingCell config:[self searchResultForIndexPath:indexPath] forHeight:YES];
@ -188,7 +153,6 @@ NSString * identifierForType(MWMSearchTableCellType type)
{
switch ([self cellTypeForIndexPath:indexPath])
{
case MWMSearchTableCellTypeOnMap: break;
case MWMSearchTableCellTypeSuggestion:
[self configSuggestionCell:(MWMSearchSuggestionCell *)cell
result:[self searchResultForIndexPath:indexPath]
@ -204,28 +168,19 @@ NSString * identifierForType(MWMSearchTableCellType type)
{
MWMSearchTableCellType cellType = [self cellTypeForIndexPath:indexPath];
id<MWMSearchTableViewProtocol> delegate = self.delegate;
if (cellType == MWMSearchTableCellTypeOnMap)
search::Result const & result = [self searchResultForIndexPath:indexPath];
if (cellType == MWMSearchTableCellTypeSuggestion)
{
MWMSearchTextField * textField = delegate.searchTextField;
[MWMSearch saveQuery:textField.text forInputLocale:textField.textInputMode.primaryLanguage];
delegate.state = MWMSearchManagerStateMapSearch;
NSString * suggestionString = @(result.GetSuggestionString());
[Statistics logEvent:kStatEventName(kStatSearch, kStatSelectResult)
withParameters:@{kStatValue : suggestionString, kStatScreen : kStatSearch}];
[delegate searchText:suggestionString forInputLocale:nil];
}
else
{
search::Result const & result = [self searchResultForIndexPath:indexPath];
if (cellType == MWMSearchTableCellTypeSuggestion)
{
NSString * suggestionString = @(result.GetSuggestionString());
[Statistics logEvent:kStatEventName(kStatSearch, kStatSelectResult)
withParameters:@{kStatValue : suggestionString, kStatScreen : kStatSearch}];
[delegate searchText:suggestionString forInputLocale:nil];
}
else
{
MWMSearchTextField * textField = delegate.searchTextField;
[MWMSearch saveQuery:textField.text forInputLocale:textField.textInputMode.primaryLanguage];
[delegate processSearchWithResult:result];
}
MWMSearchTextField * textField = delegate.searchTextField;
[MWMSearch saveQuery:textField.text forInputLocale:textField.textInputMode.primaryLanguage];
[delegate processSearchWithResult:result];
}
}
@ -233,19 +188,9 @@ NSString * identifierForType(MWMSearchTableCellType type)
- (void)onSearchCompleted
{
MWMSearchTableView * view = (MWMSearchTableView *)self.view;
if ([MWMSearch resultsCount] == 0)
{
view.tableView.hidden = YES;
[view addNoResultsView:self.noResultsView];
if ([MWMSearch isSearchOnMap])
[[[ToastView alloc] initWithMessage:L(@"search_not_found_query")] show];
}
else
{
view.tableView.hidden = NO;
[view removeNoResultsView];
}
BOOL const noResults = [MWMSearch resultsCount] == 0;
self.tableView.hidden = noResults;
[(MWMSearchTableView *)self.view hideNoResultsView:!noResults];
}
- (void)onSearchResultsUpdated
@ -254,7 +199,7 @@ NSString * identifierForType(MWMSearchTableCellType type)
return;
self.commonSizingCell = nil;
[self.tableView reloadData];
[self reloadData];
}
#pragma mark - Properties
@ -266,15 +211,4 @@ NSString * identifierForType(MWMSearchTableCellType type)
return _commonSizingCell;
}
- (MWMSearchNoResults *)noResultsView
{
if (!_noResultsView)
{
_noResultsView = [MWMSearchNoResults viewWithImage:[UIImage imageNamed:@"img_search_not_found"]
title:nil
text:L(@"search_not_found_query")];
}
return _noResultsView;
}
@end

View file

@ -1,9 +1,10 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="10117" systemVersion="15G1004" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="11201" systemVersion="16A323" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11161"/>
<capability name="Aspect ratio constraints" minToolsVersion="5.1"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="MWMSearchTableViewController">
@ -18,27 +19,24 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="NsS-9j-1hr">
<rect key="frame" x="0.0" y="0.0" width="320" height="460"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="0ed-oS-Uw6">
<rect key="frame" x="0.0" y="70" width="320" height="320"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="width" constant="320" id="iu3-jC-BuA"/>
<constraint firstAttribute="width" secondItem="0ed-oS-Uw6" secondAttribute="height" multiplier="1:1" priority="999" id="rBn-RY-c74"/>
</constraints>
</view>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="0ed-oS-Uw6" firstAttribute="centerY" secondItem="NsS-9j-1hr" secondAttribute="centerY" id="3os-g7-XiN"/>
<constraint firstItem="0ed-oS-Uw6" firstAttribute="centerX" secondItem="NsS-9j-1hr" secondAttribute="centerX" id="N4N-MH-XVw"/>
<constraint firstItem="0ed-oS-Uw6" firstAttribute="height" relation="lessThanOrEqual" secondItem="NsS-9j-1hr" secondAttribute="height" id="aad-2C-r3O"/>
</constraints>
</view>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" keyboardDismissMode="onDrag" style="plain" separatorStyle="none" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" translatesAutoresizingMaskIntoConstraints="NO" id="oZD-Er-6fn">
<rect key="frame" x="0.0" y="0.0" width="320" height="460"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" keyboardDismissMode="onDrag" style="plain" separatorStyle="none" rowHeight="44" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="oZD-Er-6fn">
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<inset key="separatorInset" minX="15" minY="0.0" maxX="0.0" maxY="0.0"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="backgroundColorName" value="white"/>
@ -49,16 +47,16 @@
</connections>
</tableView>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="oZD-Er-6fn" firstAttribute="top" secondItem="i5M-Pr-FkT" secondAttribute="top" id="9cU-AY-lQv"/>
<constraint firstItem="NsS-9j-1hr" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="C7g-sy-qp4"/>
<constraint firstAttribute="trailing" secondItem="oZD-Er-6fn" secondAttribute="trailing" id="DoP-hv-QXb"/>
<constraint firstAttribute="bottom" secondItem="NsS-9j-1hr" secondAttribute="bottom" id="P9i-5E-bpw"/>
<constraint firstAttribute="bottom" secondItem="NsS-9j-1hr" secondAttribute="bottom" priority="750" id="P9i-5E-bpw"/>
<constraint firstItem="NsS-9j-1hr" firstAttribute="top" secondItem="i5M-Pr-FkT" secondAttribute="top" id="csW-fl-Sp0"/>
<constraint firstAttribute="trailing" secondItem="NsS-9j-1hr" secondAttribute="trailing" id="dIC-Mf-12H"/>
<constraint firstItem="oZD-Er-6fn" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="iKy-dd-6Jt"/>
<constraint firstAttribute="bottom" secondItem="oZD-Er-6fn" secondAttribute="bottom" id="rgu-oY-7XC"/>
<constraint firstAttribute="bottom" secondItem="oZD-Er-6fn" secondAttribute="bottom" priority="750" id="rgu-oY-7XC"/>
</constraints>
<nil key="simulatedStatusBarMetrics"/>
<nil key="simulatedTopBarMetrics"/>
@ -71,7 +69,6 @@
<outlet property="noResultsBottomOffset" destination="P9i-5E-bpw" id="qTI-X5-KzS"/>
<outlet property="noResultsContainer" destination="NsS-9j-1hr" id="BfV-Wz-ztf"/>
<outlet property="noResultsWrapper" destination="0ed-oS-Uw6" id="RbW-yn-sl8"/>
<outlet property="tableView" destination="oZD-Er-6fn" id="MfW-RH-aRM"/>
</connections>
</view>
</objects>

View file

@ -2,4 +2,6 @@
@interface MWMNoMapsViewController : MWMViewController
+ (MWMNoMapsViewController *)controller;
@end

View file

@ -1,8 +1,15 @@
#import "MWMNoMapsViewController.h"
#import "MWMMapViewControlsManager.h"
#import "UIViewController+Navigation.h"
@implementation MWMNoMapsViewController
+ (MWMNoMapsViewController *)controller
{
return
[[UIViewController mainStoryboard] instantiateViewControllerWithIdentifier:[self className]];
}
- (IBAction)downloadMaps
{
[[MWMMapViewControlsManager manager] actionDownloadMaps:mwm::DownloaderMode::Available];

View file

@ -0,0 +1,3 @@
@interface MWMSearchFilterPresentationController : UIPresentationController
@end

View file

@ -0,0 +1,133 @@
#import "MWMSearchFilterPresentationController.h"
#import "MWMSearch.h"
#import "UIColor+MapsMeColor.h"
namespace
{
CGFloat const kiPhonePortraitHeightPercentage = 0.7;
CGPoint originForParentSize(CGSize size)
{
if (size.width > size.height)
return {};
return {0, size.height * (1 - kiPhonePortraitHeightPercentage)};
}
CGSize sizeForParentSize(CGSize size)
{
if (size.width > size.height)
return size;
return {size.width, size.height * kiPhonePortraitHeightPercentage};
}
} // namespace
@interface MWMSearchFilterPresentationController ()
@property(nonatomic) UIView * chromeView;
@end
@implementation MWMSearchFilterPresentationController
- (instancetype)initWithPresentedViewController:(UIViewController *)presentedViewController
presentingViewController:(UIViewController *)presentingViewController
{
self = [super initWithPresentedViewController:presentedViewController
presentingViewController:presentingViewController];
if (self)
{
_chromeView = [[UIView alloc] initWithFrame:{}];
_chromeView.backgroundColor = [UIColor blackStatusBarBackground];
_chromeView.alpha = 0;
auto rec =
[[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(chromeViewTapped:)];
[_chromeView addGestureRecognizer:rec];
}
return self;
}
#pragma mark - Gesture recognizers
- (void)chromeViewTapped:(UIGestureRecognizer *)gesture
{
if (gesture.state != UIGestureRecognizerStateEnded)
return;
[MWMSearch update];
[self.presentingViewController dismissViewControllerAnimated:YES completion:nil];
}
#pragma mark - Layout
- (CGRect)frameOfPresentedViewInContainerView
{
auto const size = self.containerView.bounds.size;
return {originForParentSize(size), sizeForParentSize(size)};
}
- (CGSize)sizeForChildContentContainer:(id<UIContentContainer>)container
withParentContainerSize:(CGSize)parentSize
{
return sizeForParentSize(parentSize);
}
- (void)containerViewWillLayoutSubviews
{
self.chromeView.frame = self.containerView.bounds;
self.presentedView.frame = [self frameOfPresentedViewInContainerView];
}
#pragma mark - Style
- (BOOL)shouldPresentInFullscreen { return YES; }
- (UIModalPresentationStyle)adaptivePresentationStyle { return UIModalPresentationFullScreen; }
#pragma mark - Presentation
- (void)presentationTransitionWillBegin
{
UIView * chromeView = self.chromeView;
UIView * containerView = self.containerView;
chromeView.frame = containerView.bounds;
chromeView.alpha = 0;
[containerView insertSubview:chromeView atIndex:0];
id<UIViewControllerTransitionCoordinator> coordinator =
self.presentedViewController.transitionCoordinator;
if (coordinator)
{
[coordinator
animateAlongsideTransition:^(id<UIViewControllerTransitionCoordinatorContext> context) {
chromeView.alpha = 1;
}
completion:nil];
}
else
{
chromeView.alpha = 1;
}
}
- (void)dismissalTransitionWillBegin
{
UIView * chromeView = self.chromeView;
id<UIViewControllerTransitionCoordinator> coordinator =
self.presentedViewController.transitionCoordinator;
if (coordinator)
{
[coordinator
animateAlongsideTransition:^(id<UIViewControllerTransitionCoordinatorContext> context) {
chromeView.alpha = 0;
}
completion:nil];
}
else
{
chromeView.alpha = 0;
}
}
@end

View file

@ -0,0 +1,5 @@
@interface MWMSearchFilterTransitioning : NSObject<UIViewControllerAnimatedTransitioning>
@property(nonatomic) BOOL isPresentation;
@end

View file

@ -0,0 +1,63 @@
#import "MWMSearchFilterTransitioning.h"
#import "Common.h"
@implementation MWMSearchFilterTransitioning
- (instancetype)init
{
self = [super init];
if (self)
_isPresentation = NO;
return self;
}
- (NSTimeInterval)transitionDuration:(id<UIViewControllerContextTransitioning>)transitionContext
{
return kDefaultAnimationDuration;
}
- (void)animateTransition:(id<UIViewControllerContextTransitioning>)transitionContext
{
UIViewController * fromVC =
[transitionContext viewControllerForKey:UITransitionContextFromViewControllerKey];
UIViewController * toVC =
[transitionContext viewControllerForKey:UITransitionContextToViewControllerKey];
if (!toVC || !fromVC)
return;
UIView * fromView = fromVC.view;
UIView * toView = toVC.view;
UIView * containerView = [transitionContext containerView];
if (self.isPresentation)
[containerView addSubview:toView];
UIViewController * animatingVC = self.isPresentation ? toVC : fromVC;
UIView * animatingView = animatingVC.view;
CGRect const finalFrameForVC = [transitionContext finalFrameForViewController:animatingVC];
CGRect initialFrameForVC = finalFrameForVC;
initialFrameForVC.origin.y += initialFrameForVC.size.height;
CGRect const initialFrame = self.isPresentation ? initialFrameForVC : finalFrameForVC;
CGRect const finalFrame = self.isPresentation ? finalFrameForVC : initialFrameForVC;
animatingView.frame = initialFrame;
[UIView animateWithDuration:[self transitionDuration:transitionContext]
delay:0
usingSpringWithDamping:300
initialSpringVelocity:5.0
options:UIViewAnimationOptionAllowUserInteraction
animations:^{
animatingView.frame = finalFrame;
}
completion:^(BOOL finished) {
if (!self.isPresentation)
[fromView removeFromSuperview];
[transitionContext completeTransition:YES];
}];
}
@end

View file

@ -0,0 +1,3 @@
@interface MWMSearchFilterTransitioningDelegate : NSObject<UIViewControllerTransitioningDelegate>
@end

View file

@ -0,0 +1,34 @@
#import "MWMSearchFilterTransitioningDelegate.h"
#import "MWMSearchFilterPresentationController.h"
#import "MWMSearchFilterTransitioning.h"
@implementation MWMSearchFilterTransitioningDelegate
- (UIPresentationController *)
presentationControllerForPresentedViewController:(UIViewController *)presented
presentingViewController:(UIViewController *)presenting
sourceViewController:(UIViewController *)source
{
return [[MWMSearchFilterPresentationController alloc] initWithPresentedViewController:presented
presentingViewController:presenting];
}
- (id<UIViewControllerAnimatedTransitioning>)
animationControllerForPresentedController:(UIViewController *)presented
presentingController:(UIViewController *)presenting
sourceController:(UIViewController *)source
{
auto animationController = [[MWMSearchFilterTransitioning alloc] init];
animationController.isPresentation = YES;
return animationController;
}
- (id<UIViewControllerAnimatedTransitioning>)animationControllerForDismissedController:
(UIViewController *)dismissed
{
auto animationController = [[MWMSearchFilterTransitioning alloc] init];
animationController.isPresentation = NO;
return animationController;
}
@end

View file

@ -0,0 +1,11 @@
#import "MWMTableViewController.h"
#include "search/hotels_filter.hpp"
@interface MWMSearchFilterViewController : MWMTableViewController
+ (MWMSearchFilterViewController *)controller;
- (shared_ptr<search::hotels_filter::Rule>)rules;
@end

View file

@ -0,0 +1,20 @@
#import "MWMSearchFilterViewController_Protected.h"
@implementation MWMSearchFilterViewController
+ (MWMSearchFilterViewController *)controller
{
// Must be implemented in subclasses.
[self doesNotRecognizeSelector:_cmd];
return nil;
}
+ (MWMSearchFilterViewController *)controllerWithIdentifier:(NSString *)identifier
{
auto storyboard = [UIStoryboard storyboardWithName:@"MWMSearchFilters" bundle:nil];
return [storyboard instantiateViewControllerWithIdentifier:identifier];
}
- (void)mwm_refreshUI { [self.view mwm_refreshUI]; }
- (shared_ptr<search::hotels_filter::Rule>)rules { return nullptr; }
@end

View file

@ -0,0 +1,7 @@
#import "MWMSearchFilterViewController.h"
@interface MWMSearchFilterViewController (Protected)
+ (MWMSearchFilterViewController *)controllerWithIdentifier:(NSString *)identifier;
@end

View file

@ -0,0 +1,176 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="11542" systemVersion="16B2555" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11524"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--Search Hotels Filter View Controller-->
<scene sceneID="Rgk-Uh-KhM">
<objects>
<tableViewController storyboardIdentifier="MWMSearchHotelsFilterViewController" useStoryboardIdentifierAsRestorationIdentifier="YES" id="ba5-kG-Q6e" customClass="MWMSearchHotelsFilterViewController" sceneMemberID="viewController">
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="static" style="grouped" separatorStyle="default" rowHeight="48" sectionHeaderHeight="28" sectionFooterHeight="18" id="h41-fx-HZL">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/>
<sections>
<tableViewSection headerTitle="rating" id="nxP-KI-Mxt">
<cells>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" id="S86-4W-dBQ">
<rect key="frame" x="0.0" y="56" width="375" height="48"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="S86-4W-dBQ" id="k1w-ko-jKp">
<rect key="frame" x="0.0" y="0.0" width="375" height="47"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="wordWrap" translatesAutoresizingMaskIntoConstraints="NO" id="3XN-J7-em8">
<rect key="frame" x="0.0" y="0.0" width="93" height="47.5"/>
<color key="tintColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<state key="normal" title="ANY"/>
<connections>
<action selector="changeRating:" destination="ba5-kG-Q6e" eventType="touchUpInside" id="Pa2-eu-Wah"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="wordWrap" translatesAutoresizingMaskIntoConstraints="NO" id="Zkg-9y-Z28">
<rect key="frame" x="94" y="0.0" width="93" height="47.5"/>
<color key="tintColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<state key="normal" title="7.0+"/>
<state key="disabled">
<color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</state>
<connections>
<action selector="changeRating:" destination="ba5-kG-Q6e" eventType="touchUpInside" id="WKP-9d-IZZ"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="wordWrap" translatesAutoresizingMaskIntoConstraints="NO" id="X6d-fl-45M">
<rect key="frame" x="188" y="0.0" width="93" height="47.5"/>
<color key="tintColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<state key="normal" title="8.0+"/>
<connections>
<action selector="changeRating:" destination="ba5-kG-Q6e" eventType="touchUpInside" id="5dd-p2-AQm"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="wordWrap" translatesAutoresizingMaskIntoConstraints="NO" id="s7t-4f-3jf">
<rect key="frame" x="282" y="0.0" width="93" height="47.5"/>
<color key="tintColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<state key="normal" title="9.0+"/>
<connections>
<action selector="changeRating:" destination="ba5-kG-Q6e" eventType="touchUpInside" id="VeU-7D-nmL"/>
</connections>
</button>
</subviews>
<constraints>
<constraint firstAttribute="trailing" secondItem="s7t-4f-3jf" secondAttribute="trailing" id="0HE-4Q-tcV"/>
<constraint firstItem="3XN-J7-em8" firstAttribute="top" secondItem="k1w-ko-jKp" secondAttribute="top" id="2cf-SF-H9J"/>
<constraint firstItem="3XN-J7-em8" firstAttribute="width" secondItem="Zkg-9y-Z28" secondAttribute="width" id="8aj-Y4-3hI"/>
<constraint firstItem="X6d-fl-45M" firstAttribute="top" secondItem="k1w-ko-jKp" secondAttribute="top" id="Fir-ad-qrK"/>
<constraint firstItem="s7t-4f-3jf" firstAttribute="leading" secondItem="X6d-fl-45M" secondAttribute="trailing" constant="1" id="HIv-c2-V2I"/>
<constraint firstItem="X6d-fl-45M" firstAttribute="width" secondItem="s7t-4f-3jf" secondAttribute="width" id="LEq-XC-YxP"/>
<constraint firstAttribute="bottom" secondItem="3XN-J7-em8" secondAttribute="bottom" id="X6N-M7-EPf"/>
<constraint firstItem="Zkg-9y-Z28" firstAttribute="leading" secondItem="3XN-J7-em8" secondAttribute="trailing" constant="1" id="YYA-yc-USl"/>
<constraint firstItem="3XN-J7-em8" firstAttribute="leading" secondItem="k1w-ko-jKp" secondAttribute="leading" id="jSz-Oe-fHi"/>
<constraint firstAttribute="bottom" secondItem="Zkg-9y-Z28" secondAttribute="bottom" id="rMR-zk-TOw"/>
<constraint firstItem="Zkg-9y-Z28" firstAttribute="width" secondItem="X6d-fl-45M" secondAttribute="width" id="srM-9Y-kMU"/>
<constraint firstAttribute="bottom" secondItem="s7t-4f-3jf" secondAttribute="bottom" id="v98-aC-TOi"/>
<constraint firstItem="X6d-fl-45M" firstAttribute="leading" secondItem="Zkg-9y-Z28" secondAttribute="trailing" constant="1" id="vRU-AP-dZP"/>
<constraint firstItem="Zkg-9y-Z28" firstAttribute="top" secondItem="k1w-ko-jKp" secondAttribute="top" id="vdQ-SU-7i3"/>
<constraint firstItem="s7t-4f-3jf" firstAttribute="top" secondItem="k1w-ko-jKp" secondAttribute="top" id="xb2-G6-Ncy"/>
<constraint firstAttribute="bottom" secondItem="X6d-fl-45M" secondAttribute="bottom" id="yf7-5l-fTe"/>
</constraints>
</tableViewCellContentView>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="backgroundColorName" value="blackDividers"/>
</userDefinedRuntimeAttributes>
</tableViewCell>
</cells>
</tableViewSection>
<tableViewSection headerTitle="price category" id="QJt-NN-Pll">
<cells>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" id="v9h-eu-GaI">
<rect key="frame" x="0.0" y="161" width="375" height="48"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="v9h-eu-GaI" id="BUk-m8-14p">
<rect key="frame" x="0.0" y="0.0" width="375" height="47"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="wordWrap" translatesAutoresizingMaskIntoConstraints="NO" id="mqG-GU-eru">
<rect key="frame" x="0.0" y="0.0" width="124.5" height="47.5"/>
<color key="tintColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<state key="normal" title="$"/>
<connections>
<action selector="priceChange:" destination="ba5-kG-Q6e" eventType="touchUpInside" id="hRE-0J-1EF"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="wordWrap" translatesAutoresizingMaskIntoConstraints="NO" id="G1g-Nv-ywz">
<rect key="frame" x="125.5" y="0.0" width="124.5" height="47.5"/>
<color key="tintColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<state key="normal" title="$$"/>
<connections>
<action selector="priceChange:" destination="ba5-kG-Q6e" eventType="touchUpInside" id="Wci-4d-Wx1"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="wordWrap" translatesAutoresizingMaskIntoConstraints="NO" id="bJB-5R-Lwq">
<rect key="frame" x="251" y="0.0" width="124" height="47.5"/>
<color key="tintColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<state key="normal" title="$$$"/>
<connections>
<action selector="priceChange:" destination="ba5-kG-Q6e" eventType="touchUpInside" id="Ivf-0t-ijz"/>
</connections>
</button>
</subviews>
<constraints>
<constraint firstItem="G1g-Nv-ywz" firstAttribute="width" secondItem="bJB-5R-Lwq" secondAttribute="width" id="2Rq-QB-wKr"/>
<constraint firstItem="bJB-5R-Lwq" firstAttribute="top" secondItem="BUk-m8-14p" secondAttribute="top" id="Do1-VA-ZF5"/>
<constraint firstItem="bJB-5R-Lwq" firstAttribute="leading" secondItem="G1g-Nv-ywz" secondAttribute="trailing" constant="1" id="G1k-10-O9x"/>
<constraint firstItem="G1g-Nv-ywz" firstAttribute="leading" secondItem="mqG-GU-eru" secondAttribute="trailing" constant="1" id="SpC-Ga-1eL"/>
<constraint firstAttribute="bottom" secondItem="bJB-5R-Lwq" secondAttribute="bottom" id="Vb5-be-4J1"/>
<constraint firstAttribute="bottom" secondItem="G1g-Nv-ywz" secondAttribute="bottom" id="VcP-lH-ev9"/>
<constraint firstAttribute="trailing" secondItem="bJB-5R-Lwq" secondAttribute="trailing" id="Wth-2N-NDF"/>
<constraint firstItem="mqG-GU-eru" firstAttribute="top" secondItem="BUk-m8-14p" secondAttribute="top" id="bhx-Qd-RSN"/>
<constraint firstItem="G1g-Nv-ywz" firstAttribute="top" secondItem="BUk-m8-14p" secondAttribute="top" id="jle-uq-3IR"/>
<constraint firstItem="mqG-GU-eru" firstAttribute="leading" secondItem="BUk-m8-14p" secondAttribute="leading" id="nMS-Dx-9Ry"/>
<constraint firstItem="mqG-GU-eru" firstAttribute="width" secondItem="G1g-Nv-ywz" secondAttribute="width" id="pbq-DX-uvw"/>
<constraint firstAttribute="bottom" secondItem="mqG-GU-eru" secondAttribute="bottom" id="vft-M7-INB"/>
</constraints>
</tableViewCellContentView>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="backgroundColorName" value="blackDividers"/>
</userDefinedRuntimeAttributes>
</tableViewCell>
</cells>
</tableViewSection>
</sections>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="backgroundColorName" value="pressBackground"/>
</userDefinedRuntimeAttributes>
<connections>
<outlet property="dataSource" destination="ba5-kG-Q6e" id="kJJ-6Q-QN1"/>
<outlet property="delegate" destination="ba5-kG-Q6e" id="1rN-r0-boA"/>
</connections>
</tableView>
<connections>
<outlet property="price1" destination="mqG-GU-eru" id="Vdq-8n-6T8"/>
<outlet property="price2" destination="G1g-Nv-ywz" id="J1S-Eq-dPu"/>
<outlet property="price3" destination="bJB-5R-Lwq" id="7Tn-t1-wvS"/>
<outlet property="rating7" destination="Zkg-9y-Z28" id="Qef-va-SOU"/>
<outlet property="rating8" destination="X6d-fl-45M" id="7T3-fw-02d"/>
<outlet property="rating9" destination="s7t-4f-3jf" id="AHM-SF-VeU"/>
<outlet property="ratingAny" destination="3XN-J7-em8" id="wdf-m0-jhw"/>
<outletCollection property="ratings" destination="3XN-J7-em8" id="CEA-kd-bg3"/>
<outletCollection property="ratings" destination="Zkg-9y-Z28" id="e0h-ZA-PXe"/>
<outletCollection property="ratings" destination="X6d-fl-45M" id="NEr-fZ-JQN"/>
<outletCollection property="ratings" destination="s7t-4f-3jf" id="79W-E7-ojF"/>
</connections>
</tableViewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="bP0-hk-aQt" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="115" y="40"/>
</scene>
</scenes>
</document>

View file

@ -0,0 +1,5 @@
#import "MWMSearchFilterViewController.h"
@interface MWMSearchHotelsFilterViewController : MWMSearchFilterViewController
@end

View file

@ -0,0 +1,152 @@
#import "MWMSearchHotelsFilterViewController.h"
#import "MWMSearchFilterViewController_Protected.h"
#import "UIColor+MapsMeColor.h"
#import "UIFont+MapsMeFonts.h"
#import "UIKitCategories.h"
namespace
{
NSAttributedString * makeString(NSString * primaryText, NSDictionary * primaryAttrs,
NSString * secondaryText, NSDictionary * secondaryAttrs)
{
auto str = [[NSMutableAttributedString alloc] initWithString:primaryText attributes:primaryAttrs];
if (secondaryText.length != 0)
{
auto secText = [NSString stringWithFormat:@"\n%@", secondaryText];
auto secStr = [[NSAttributedString alloc] initWithString:secText attributes:secondaryAttrs];
[str appendAttributedString:secStr];
}
return str.copy;
}
void configButton(UIButton * button, NSString * primaryText, NSString * secondaryText)
{
UIFont * regular17 = [UIFont regular17];
UIFont * regular10 = [UIFont regular10];
UIColor * white = [UIColor white];
UIImage * linkBlueImage = [UIImage imageWithColor:[UIColor linkBlue]];
[button setBackgroundImage:[UIImage imageWithColor:white] forState:UIControlStateNormal];
[button setBackgroundImage:linkBlueImage forState:UIControlStateSelected];
[button setBackgroundImage:linkBlueImage
forState:UIControlStateSelected | UIControlStateHighlighted];
NSDictionary * primarySelected =
@{NSFontAttributeName : regular17, NSForegroundColorAttributeName : white};
NSDictionary * secondarySelected =
@{NSFontAttributeName : regular10, NSForegroundColorAttributeName : white};
NSAttributedString * titleSelected =
makeString(primaryText, primarySelected, secondaryText, secondarySelected);
[button setAttributedTitle:titleSelected forState:UIControlStateSelected];
[button setAttributedTitle:titleSelected
forState:UIControlStateSelected | UIControlStateHighlighted];
NSDictionary * primaryNormal = @{
NSFontAttributeName : regular17,
NSForegroundColorAttributeName : [UIColor blackPrimaryText]
};
NSDictionary * secondaryNormal = @{
NSFontAttributeName : regular10,
NSForegroundColorAttributeName : [UIColor blackSecondaryText]
};
NSAttributedString * titleNormal =
makeString(primaryText, primaryNormal, secondaryText, secondaryNormal);
[button setAttributedTitle:titleNormal forState:UIControlStateNormal];
button.titleLabel.textAlignment = NSTextAlignmentCenter;
}
} // namespace
@interface MWMSearchHotelsFilterViewController ()
@property(nonatomic) IBOutletCollection(UIButton) NSArray * ratings;
@property(weak, nonatomic) IBOutlet UIButton * ratingAny;
@property(weak, nonatomic) IBOutlet UIButton * rating7;
@property(weak, nonatomic) IBOutlet UIButton * rating8;
@property(weak, nonatomic) IBOutlet UIButton * rating9;
@property(weak, nonatomic) IBOutlet UIButton * price1;
@property(weak, nonatomic) IBOutlet UIButton * price2;
@property(weak, nonatomic) IBOutlet UIButton * price3;
@end
@implementation MWMSearchHotelsFilterViewController
+ (MWMSearchHotelsFilterViewController *)controller
{
NSString * identifier = [MWMSearchHotelsFilterViewController className];
return static_cast<MWMSearchHotelsFilterViewController *>(
[self controllerWithIdentifier:identifier]);
}
- (void)viewDidLoad
{
[super viewDidLoad];
configButton(self.ratingAny, L(@"any"), nil);
configButton(self.rating7, L(@"7.0+"), L(@"good"));
configButton(self.rating8, L(@"8.0+"), L(@"very_good"));
configButton(self.rating9, L(@"9.0+"), L(@"excellent"));
configButton(self.price1, L(@"$"), nil);
configButton(self.price2, L(@"$$"), nil);
configButton(self.price3, L(@"$$$"), nil);
[self changeRating:self.ratingAny];
self.price1.selected = NO;
self.price2.selected = NO;
self.price3.selected = NO;
}
- (shared_ptr<search::hotels_filter::Rule>)rules
{
using namespace search::hotels_filter;
shared_ptr<Rule> ratingRule;
if (self.rating7.selected)
ratingRule = Ge<Rating>(7.0);
else if (self.rating8.selected)
ratingRule = Ge<Rating>(8.0);
else if (self.rating9.selected)
ratingRule = Ge<Rating>(9.0);
shared_ptr<Rule> priceRule;
if (self.price1.selected)
priceRule = Or(priceRule, Eq<PriceRate>(1));
if (self.price2.selected)
priceRule = Or(priceRule, Eq<PriceRate>(2));
if (self.price3.selected)
priceRule = Or(priceRule, Eq<PriceRate>(3));
if (!ratingRule && !priceRule)
return nullptr;
return And(ratingRule, priceRule);
}
#pragma mark - Actions
- (IBAction)changeRating:(UIButton *)sender
{
for (UIButton * button in self.ratings)
button.selected = NO;
sender.selected = YES;
}
- (IBAction)priceChange:(UIButton *)sender { sender.selected = !sender.selected; }
#pragma mark - UITableViewDataSource
- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section
{
switch (section)
{
case 0: return L(@"rating");
case 1: return L(@"price_category");
default: return nil;
}
}
@end

View file

@ -1,3 +1,4 @@
#import "MWMSearchFilterViewController.h"
#import "MWMSearchObserver.h"
#include "search/result.hpp"
@ -13,6 +14,7 @@
+ (void)showResult:(search::Result const &)result;
+ (search::Result &)resultAtIndex:(NSUInteger)index;
+ (void)update;
+ (void)clear;
+ (BOOL)isSearchOnMap;
@ -21,6 +23,12 @@
+ (NSUInteger)suggestionsCount;
+ (NSUInteger)resultsCount;
+ (BOOL)isHotelResults;
+ (BOOL)hasFilter;
+ (MWMSearchFilterViewController *)getFilter;
+ (void)clearFilter;
- (instancetype)init __attribute__((unavailable("unavailable")));
- (instancetype)copy __attribute__((unavailable("unavailable")));
- (instancetype)copyWithZone:(NSZone *)zone __attribute__((unavailable("unavailable")));

View file

@ -2,10 +2,13 @@
#import <Crashlytics/Crashlytics.h>
#import "Common.h"
#import "MWMLocationManager.h"
#import "MWMSearchHotelsFilterViewController.h"
#import "ToastView.h"
#include "Framework.h"
#include "search/everywhere_search_params.hpp"
#include "search/hotels_classifier.hpp"
#include "search/query_saver.hpp"
#include "search/viewport_search_params.hpp"
@ -21,13 +24,14 @@ using TObservers = NSHashTable<__kindof TObserver>;
@property(nonatomic) BOOL searchOnMap;
@property(nonatomic) BOOL textChanged;
@property(nonatomic) BOOL everywhereSearchActive;
@property(nonatomic) BOOL viewportSearchActive;
@property(nonatomic) TObservers * observers;
@property(nonatomic) NSTimeInterval lastSearchTimestamp;
@property(nonatomic) BOOL isHotelResults;
@property(nonatomic) MWMSearchFilterViewController * filter;
@end
@implementation MWMSearch
@ -35,6 +39,7 @@ using TObservers = NSHashTable<__kindof TObserver>;
search::EverywhereSearchParams m_everywhereParams;
search::ViewportSearchParams m_viewportParams;
search::Results m_results;
string m_filterQuery;
}
#pragma mark - Instance
@ -71,7 +76,7 @@ using TObservers = NSHashTable<__kindof TObserver>;
return;
if (results.IsEndMarker())
{
self.everywhereSearchActive = NO;
[self checkIsHotelResults:results];
[self onSearchCompleted];
}
else
@ -89,52 +94,63 @@ using TObservers = NSHashTable<__kindof TObserver>;
if (!self)
return;
if (IPAD)
{
GetFramework().SearchEverywhere(self->m_everywhereParams);
self.everywhereSearchActive = YES;
}
self.viewportSearchActive = YES;
[self onSearchStarted];
};
}
{
__weak auto weakSelf = self;
m_viewportParams.m_onCompleted = [weakSelf](search::Results const & results) {
// TODO (@igrechuhin): do something useful with |results|.
__strong auto self = weakSelf;
if (!self)
return;
self.viewportSearchActive = NO;
if (results.IsEndedNormal())
[self checkIsHotelResults:results];
[self onSearchCompleted];
};
}
}
- (void)checkIsHotelResults:(search::Results const &)results
{
self.isHotelResults = search::HotelsClassifier::IsHotelResults(results);
m_filterQuery = m_everywhereParams.m_query;
}
- (void)updateFilters
{
shared_ptr<search::hotels_filter::Rule> hotelsRules;
if (self.filter)
{
hotelsRules = [self.filter rules];
if (!hotelsRules)
self.filter = nil;
}
m_viewportParams.m_hotelsFilter = hotelsRules;
m_everywhereParams.m_hotelsFilter = hotelsRules;
}
- (void)update
{
[MWMSearch clear];
if (m_everywhereParams.m_query.empty())
return;
[self updateCallbacks];
[self updateFilters];
auto & f = GetFramework();
if (IPAD)
{
f.SearchEverywhere(m_everywhereParams);
f.SearchInViewport(m_viewportParams);
self.everywhereSearchActive = YES;
}
else
{
if (self.searchOnMap)
{
f.SearchInViewport(m_viewportParams);
}
else
{
f.SearchEverywhere(m_everywhereParams);
self.everywhereSearchActive = YES;
}
}
[self onSearchStarted];
}
@ -185,31 +201,62 @@ using TObservers = NSHashTable<__kindof TObserver>;
}
+ (void)showResult:(search::Result const &)result { GetFramework().ShowSearchResult(result); }
+ (search::Result &)resultAtIndex:(NSUInteger)index
{
return [MWMSearch manager]->m_results.GetResult(index);
}
+ (void)update { [[MWMSearch manager] update]; }
+ (void)clear
{
GetFramework().CancelAllSearches();
MWMSearch * manager = [MWMSearch manager];
manager->m_results.Clear();
if (manager->m_filterQuery != manager->m_everywhereParams.m_query)
manager.isHotelResults = NO;
manager.suggestionsCount = 0;
[manager onSearchResultsUpdated];
}
+ (BOOL)isSearchOnMap { return [MWMSearch manager].searchOnMap; }
+ (void)setSearchOnMap:(BOOL)searchOnMap
{
MWMSearch * manager = [MWMSearch manager];
if (manager.searchOnMap == searchOnMap)
return;
manager.searchOnMap = searchOnMap;
if (!IPAD)
[manager update];
}
+ (NSUInteger)suggestionsCount { return [MWMSearch manager].suggestionsCount; }
+ (NSUInteger)resultsCount { return [MWMSearch manager]->m_results.GetCount(); }
+ (BOOL)isHotelResults { return [MWMSearch manager].isHotelResults; }
#pragma mark - Filters
+ (BOOL)hasFilter { return [[MWMSearch manager].filter rules] != nullptr; }
+ (MWMSearchFilterViewController *)getFilter
{
MWMSearch * manager = [MWMSearch manager];
if (!manager.filter && manager.isHotelResults)
manager.filter = [MWMSearchHotelsFilterViewController controller];
return manager.filter;
}
+ (void)clearFilter
{
MWMSearch * manager = [MWMSearch manager];
manager.filter = nil;
[manager update];
}
#pragma mark - Notifications
- (void)onSearchStarted
@ -223,9 +270,8 @@ using TObservers = NSHashTable<__kindof TObserver>;
- (void)onSearchCompleted
{
if (self.everywhereSearchActive || self.viewportSearchActive)
return;
if (self.searchOnMap && m_results.GetCount() == 0)
[[[ToastView alloc] initWithMessage:L(@"search_not_found_query")] show];
for (TObserver observer in self.observers)
{
if ([observer respondsToSelector:@selector(onSearchCompleted)])

View file

@ -6,6 +6,6 @@
- (UIBarButtonItem *)buttonWithImage:(UIImage *)image action:(SEL)action;
- (NSArray<UIBarButtonItem *> *)alignedNavBarButtonItems:(NSArray<UIBarButtonItem *> *)items;
@property (nonatomic, readonly) UIStoryboard * mainStoryboard;
+ (UIStoryboard *)mainStoryboard;
@end

View file

@ -45,5 +45,5 @@ CGFloat constexpr kButtonExtraWidth = 16.0;
}
- (void)backTap { [self.navigationController popViewControllerAnimated:YES]; }
- (UIStoryboard *)mainStoryboard { return [UIStoryboard storyboardWithName:@"Mapsme" bundle:nil]; }
+ (UIStoryboard *)mainStoryboard { return [UIStoryboard storyboardWithName:@"Mapsme" bundle:nil]; }
@end

View file

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 151 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 225 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 295 B

View file

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 172 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 250 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 410 B

View file

@ -78,6 +78,20 @@
341F99F21C6B4288001C67B8 /* MWMMapDownloaderSearchDataSource.mm in Sources */ = {isa = PBXBuildFile; fileRef = 341F99F01C6B4288001C67B8 /* MWMMapDownloaderSearchDataSource.mm */; };
34201E091DC0DC7300D24118 /* libpartners_api.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DDB4BC31DAB98F000F4D021 /* libpartners_api.a */; };
34201E0C1DC0E33100D24118 /* libtracking.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 34201E0B1DC0E33100D24118 /* libtracking.a */; };
34257D0D1DC9FB0D00DC5BB9 /* MWMSearchFilterPresentationController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34257D031DC9FB0D00DC5BB9 /* MWMSearchFilterPresentationController.mm */; };
34257D0E1DC9FB0D00DC5BB9 /* MWMSearchFilterPresentationController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34257D031DC9FB0D00DC5BB9 /* MWMSearchFilterPresentationController.mm */; };
34257D0F1DC9FB0D00DC5BB9 /* MWMSearchFilters.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 34257D041DC9FB0D00DC5BB9 /* MWMSearchFilters.storyboard */; };
34257D101DC9FB0D00DC5BB9 /* MWMSearchFilters.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 34257D041DC9FB0D00DC5BB9 /* MWMSearchFilters.storyboard */; };
34257D111DC9FB0D00DC5BB9 /* MWMSearchFilterTransitioning.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34257D061DC9FB0D00DC5BB9 /* MWMSearchFilterTransitioning.mm */; };
34257D121DC9FB0D00DC5BB9 /* MWMSearchFilterTransitioning.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34257D061DC9FB0D00DC5BB9 /* MWMSearchFilterTransitioning.mm */; };
34257D131DC9FB0D00DC5BB9 /* MWMSearchFilterTransitioningDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34257D081DC9FB0D00DC5BB9 /* MWMSearchFilterTransitioningDelegate.mm */; };
34257D141DC9FB0D00DC5BB9 /* MWMSearchFilterTransitioningDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34257D081DC9FB0D00DC5BB9 /* MWMSearchFilterTransitioningDelegate.mm */; };
34257D151DC9FB0D00DC5BB9 /* MWMSearchFilterViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34257D0A1DC9FB0D00DC5BB9 /* MWMSearchFilterViewController.mm */; };
34257D161DC9FB0D00DC5BB9 /* MWMSearchFilterViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34257D0A1DC9FB0D00DC5BB9 /* MWMSearchFilterViewController.mm */; };
34257D171DC9FB0D00DC5BB9 /* MWMSearchHotelsFilterViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34257D0C1DC9FB0D00DC5BB9 /* MWMSearchHotelsFilterViewController.mm */; };
34257D181DC9FB0D00DC5BB9 /* MWMSearchHotelsFilterViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34257D0C1DC9FB0D00DC5BB9 /* MWMSearchHotelsFilterViewController.mm */; };
34257D1B1DC9FD9400DC5BB9 /* MWMSearchChangeModeView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34257D1A1DC9FD9400DC5BB9 /* MWMSearchChangeModeView.mm */; };
34257D1C1DC9FD9400DC5BB9 /* MWMSearchChangeModeView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34257D1A1DC9FD9400DC5BB9 /* MWMSearchChangeModeView.mm */; };
342AD76F1B53D30C00E0B997 /* UIButton+RuntimeAttributes.mm in Sources */ = {isa = PBXBuildFile; fileRef = 342AD76E1B53D30C00E0B997 /* UIButton+RuntimeAttributes.mm */; };
342AD7721B53D32F00E0B997 /* UIView+RuntimeAttributes.mm in Sources */ = {isa = PBXBuildFile; fileRef = 342AD7711B53D32F00E0B997 /* UIView+RuntimeAttributes.mm */; };
342AF0E01BE24E9A0016F3AE /* MWMMapDownloaderViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 342AF0DF1BE24E9A0016F3AE /* MWMMapDownloaderViewController.mm */; };
@ -293,6 +307,10 @@
34BAB6E91BB2DA0C00DB941B /* MWMBottomMenuLayout.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34BAB6E81BB2DA0C00DB941B /* MWMBottomMenuLayout.mm */; };
34BAB6ED1BB2DFCE00DB941B /* MWMBottomMenuCollectionViewCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34BAB6EB1BB2DFCE00DB941B /* MWMBottomMenuCollectionViewCell.mm */; };
34BAB6EE1BB2DFCE00DB941B /* MWMBottomMenuCollectionViewPortraitCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 34BAB6EC1BB2DFCE00DB941B /* MWMBottomMenuCollectionViewPortraitCell.xib */; };
34BBB71E1DD07A4B0002E025 /* MWMSearchManager+Filter.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34BBB71D1DD07A4B0002E025 /* MWMSearchManager+Filter.mm */; };
34BBB71F1DD07A4B0002E025 /* MWMSearchManager+Filter.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34BBB71D1DD07A4B0002E025 /* MWMSearchManager+Filter.mm */; };
34BBB7231DD0853B0002E025 /* MWMSearchManager+Layout.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34BBB7221DD0853B0002E025 /* MWMSearchManager+Layout.mm */; };
34BBB7241DD0853B0002E025 /* MWMSearchManager+Layout.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34BBB7221DD0853B0002E025 /* MWMSearchManager+Layout.mm */; };
34BC1E561C2ADBD3009BBF51 /* MWMOpeningHoursCommon.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34BC1E551C2ADBD3009BBF51 /* MWMOpeningHoursCommon.mm */; };
34BC1E571C2ADBD3009BBF51 /* MWMOpeningHoursCommon.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34BC1E551C2ADBD3009BBF51 /* MWMOpeningHoursCommon.mm */; };
34BC72241B0DECAE0012A34B /* MWMMapViewControlsManager.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34BC72111B0DECAE0012A34B /* MWMMapViewControlsManager.mm */; };
@ -329,7 +347,6 @@
34CE8A681C7740E100F4351A /* MWMStorage.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34CE8A661C7740E100F4351A /* MWMStorage.mm */; };
34CFFE8B1B7DE6FD009D0C9F /* MWMSearchManager.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34CFFE8A1B7DE6FD009D0C9F /* MWMSearchManager.mm */; };
34CFFE8D1B7DE71C009D0C9F /* MWMSearchView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 34CFFE8C1B7DE71C009D0C9F /* MWMSearchView.xib */; };
34CFFE901B7DE83D009D0C9F /* MWMSearchView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34CFFE8F1B7DE83D009D0C9F /* MWMSearchView.mm */; };
34D15BA81BD8F93C00C8BCBE /* AddSetTableViewCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34D15BA61BD8F93C00C8BCBE /* AddSetTableViewCell.mm */; };
34D15BA91BD8F93C00C8BCBE /* AddSetTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 34D15BA71BD8F93C00C8BCBE /* AddSetTableViewCell.xib */; };
34D37E171CD2373C001DEFC3 /* MWMMapDownloaderCellHeader.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34D37E161CD2373C001DEFC3 /* MWMMapDownloaderCellHeader.mm */; };
@ -574,7 +591,6 @@
6741AA2B1BF340DE002C974C /* CircleView.mm in Sources */ = {isa = PBXBuildFile; fileRef = ED48BBB917C2B1E2003E7E92 /* CircleView.mm */; };
6741AA2C1BF340DE002C974C /* MWMSearchBookmarksManager.mm in Sources */ = {isa = PBXBuildFile; fileRef = 340E10621B949D1900D975D5 /* MWMSearchBookmarksManager.mm */; };
6741AA2D1BF340DE002C974C /* AddSetTableViewCell.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34D15BA61BD8F93C00C8BCBE /* AddSetTableViewCell.mm */; };
6741AA2E1BF340DE002C974C /* MWMSearchView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34CFFE8F1B7DE83D009D0C9F /* MWMSearchView.mm */; };
6741AA2F1BF340DE002C974C /* MWMPlacePageEntity.mm in Sources */ = {isa = PBXBuildFile; fileRef = F6FE2C141B04A44E009814AA /* MWMPlacePageEntity.mm */; };
6741AA301BF340DE002C974C /* MWMSearchTextField.mm in Sources */ = {isa = PBXBuildFile; fileRef = 34B82AB11B8344E300180497 /* MWMSearchTextField.mm */; };
6741AA321BF340DE002C974C /* FBSDKLoginKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 34570A401B13229300E6D4FD /* FBSDKLoginKit.framework */; settings = {ATTRIBUTES = (Required, ); }; };
@ -1003,6 +1019,19 @@
341F99EF1C6B4288001C67B8 /* MWMMapDownloaderSearchDataSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMMapDownloaderSearchDataSource.h; sourceTree = "<group>"; };
341F99F01C6B4288001C67B8 /* MWMMapDownloaderSearchDataSource.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMMapDownloaderSearchDataSource.mm; sourceTree = "<group>"; };
34201E0B1DC0E33100D24118 /* libtracking.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libtracking.a; path = "../../../omim-xcode-build/Debug/libtracking.a"; sourceTree = "<group>"; };
34257D021DC9FB0D00DC5BB9 /* MWMSearchFilterPresentationController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMSearchFilterPresentationController.h; sourceTree = "<group>"; };
34257D031DC9FB0D00DC5BB9 /* MWMSearchFilterPresentationController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMSearchFilterPresentationController.mm; sourceTree = "<group>"; };
34257D041DC9FB0D00DC5BB9 /* MWMSearchFilters.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = MWMSearchFilters.storyboard; sourceTree = "<group>"; };
34257D051DC9FB0D00DC5BB9 /* MWMSearchFilterTransitioning.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMSearchFilterTransitioning.h; sourceTree = "<group>"; };
34257D061DC9FB0D00DC5BB9 /* MWMSearchFilterTransitioning.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMSearchFilterTransitioning.mm; sourceTree = "<group>"; };
34257D071DC9FB0D00DC5BB9 /* MWMSearchFilterTransitioningDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMSearchFilterTransitioningDelegate.h; sourceTree = "<group>"; };
34257D081DC9FB0D00DC5BB9 /* MWMSearchFilterTransitioningDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMSearchFilterTransitioningDelegate.mm; sourceTree = "<group>"; };
34257D091DC9FB0D00DC5BB9 /* MWMSearchFilterViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMSearchFilterViewController.h; sourceTree = "<group>"; };
34257D0A1DC9FB0D00DC5BB9 /* MWMSearchFilterViewController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMSearchFilterViewController.mm; sourceTree = "<group>"; };
34257D0B1DC9FB0D00DC5BB9 /* MWMSearchHotelsFilterViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMSearchHotelsFilterViewController.h; sourceTree = "<group>"; };
34257D0C1DC9FB0D00DC5BB9 /* MWMSearchHotelsFilterViewController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMSearchHotelsFilterViewController.mm; sourceTree = "<group>"; };
34257D191DC9FD9400DC5BB9 /* MWMSearchChangeModeView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMSearchChangeModeView.h; sourceTree = "<group>"; };
34257D1A1DC9FD9400DC5BB9 /* MWMSearchChangeModeView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMSearchChangeModeView.mm; sourceTree = "<group>"; };
342AD76D1B53D30C00E0B997 /* UIButton+RuntimeAttributes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIButton+RuntimeAttributes.h"; sourceTree = "<group>"; };
342AD76E1B53D30C00E0B997 /* UIButton+RuntimeAttributes.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = "UIButton+RuntimeAttributes.mm"; sourceTree = "<group>"; };
342AD7701B53D32F00E0B997 /* UIView+RuntimeAttributes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIView+RuntimeAttributes.h"; sourceTree = "<group>"; };
@ -1140,6 +1169,7 @@
348C26041D701B9F00813924 /* MWMHelpController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMHelpController.mm; sourceTree = "<group>"; };
348D1DF91C525B8300860465 /* MWMTypes.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MWMTypes.h; sourceTree = "<group>"; };
348E57981B0F49D8000FA02A /* maps.me dbg.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "maps.me dbg.app"; sourceTree = BUILT_PRODUCTS_DIR; };
348E836B1DD0B5FE009A4B2D /* MWMSearchFilterViewController_Protected.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MWMSearchFilterViewController_Protected.h; sourceTree = "<group>"; };
3490D2D91CE9DD2500D0B838 /* MWMSideButtons.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMSideButtons.h; sourceTree = "<group>"; };
3490D2DA1CE9DD2500D0B838 /* MWMSideButtons.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMSideButtons.mm; sourceTree = "<group>"; };
3490D2DB1CE9DD2500D0B838 /* MWMSideButtonsView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMSideButtonsView.h; sourceTree = "<group>"; };
@ -1251,6 +1281,10 @@
34BAB6EA1BB2DFCE00DB941B /* MWMBottomMenuCollectionViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMBottomMenuCollectionViewCell.h; sourceTree = "<group>"; };
34BAB6EB1BB2DFCE00DB941B /* MWMBottomMenuCollectionViewCell.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMBottomMenuCollectionViewCell.mm; sourceTree = "<group>"; };
34BAB6EC1BB2DFCE00DB941B /* MWMBottomMenuCollectionViewPortraitCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMBottomMenuCollectionViewPortraitCell.xib; sourceTree = "<group>"; };
34BBB71C1DD07A4B0002E025 /* MWMSearchManager+Filter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "MWMSearchManager+Filter.h"; sourceTree = "<group>"; };
34BBB71D1DD07A4B0002E025 /* MWMSearchManager+Filter.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = "MWMSearchManager+Filter.mm"; sourceTree = "<group>"; };
34BBB7211DD0853B0002E025 /* MWMSearchManager+Layout.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "MWMSearchManager+Layout.h"; sourceTree = "<group>"; };
34BBB7221DD0853B0002E025 /* MWMSearchManager+Layout.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = "MWMSearchManager+Layout.mm"; sourceTree = "<group>"; };
34BC1E551C2ADBD3009BBF51 /* MWMOpeningHoursCommon.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMOpeningHoursCommon.mm; sourceTree = "<group>"; };
34BC72101B0DECAE0012A34B /* MWMMapViewControlsManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMMapViewControlsManager.h; sourceTree = "<group>"; };
34BC72111B0DECAE0012A34B /* MWMMapViewControlsManager.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; lineEnding = 0; path = MWMMapViewControlsManager.mm; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
@ -1292,8 +1326,6 @@
34CFFE891B7DE6FD009D0C9F /* MWMSearchManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMSearchManager.h; sourceTree = "<group>"; };
34CFFE8A1B7DE6FD009D0C9F /* MWMSearchManager.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; lineEnding = 0; path = MWMSearchManager.mm; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
34CFFE8C1B7DE71C009D0C9F /* MWMSearchView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMSearchView.xib; sourceTree = "<group>"; };
34CFFE8E1B7DE83D009D0C9F /* MWMSearchView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMSearchView.h; sourceTree = "<group>"; };
34CFFE8F1B7DE83D009D0C9F /* MWMSearchView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMSearchView.mm; sourceTree = "<group>"; };
34D15BA51BD8F93C00C8BCBE /* AddSetTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AddSetTableViewCell.h; sourceTree = "<group>"; };
34D15BA61BD8F93C00C8BCBE /* AddSetTableViewCell.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = AddSetTableViewCell.mm; sourceTree = "<group>"; };
34D15BA71BD8F93C00C8BCBE /* AddSetTableViewCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = AddSetTableViewCell.xib; sourceTree = "<group>"; };
@ -2087,6 +2119,25 @@
path = DataSources;
sourceTree = "<group>";
};
34257D011DC9FB0D00DC5BB9 /* Filters */ = {
isa = PBXGroup;
children = (
34257D021DC9FB0D00DC5BB9 /* MWMSearchFilterPresentationController.h */,
34257D031DC9FB0D00DC5BB9 /* MWMSearchFilterPresentationController.mm */,
34257D041DC9FB0D00DC5BB9 /* MWMSearchFilters.storyboard */,
34257D051DC9FB0D00DC5BB9 /* MWMSearchFilterTransitioning.h */,
34257D061DC9FB0D00DC5BB9 /* MWMSearchFilterTransitioning.mm */,
34257D071DC9FB0D00DC5BB9 /* MWMSearchFilterTransitioningDelegate.h */,
34257D081DC9FB0D00DC5BB9 /* MWMSearchFilterTransitioningDelegate.mm */,
34257D091DC9FB0D00DC5BB9 /* MWMSearchFilterViewController.h */,
348E836B1DD0B5FE009A4B2D /* MWMSearchFilterViewController_Protected.h */,
34257D0A1DC9FB0D00DC5BB9 /* MWMSearchFilterViewController.mm */,
34257D0B1DC9FB0D00DC5BB9 /* MWMSearchHotelsFilterViewController.h */,
34257D0C1DC9FB0D00DC5BB9 /* MWMSearchHotelsFilterViewController.mm */,
);
path = Filters;
sourceTree = "<group>";
};
342AF0DD1BE24E7C0016F3AE /* MapDownloader */ = {
isa = PBXGroup;
children = (
@ -2106,6 +2157,7 @@
3436FE7F1D366CA0005CD87B /* Search */ = {
isa = PBXGroup;
children = (
34257D011DC9FB0D00DC5BB9 /* Filters */,
3436FE801D366CDD005CD87B /* MWMSearch.h */,
3436FE811D366CDD005CD87B /* MWMSearch.mm */,
347D5CA11D376B9F00FA28DD /* MWMSearchObserver.h */,
@ -2556,9 +2608,11 @@
34CC4C051B81F38E00E44C1F /* TabbedView */,
34CFFE891B7DE6FD009D0C9F /* MWMSearchManager.h */,
34CFFE8A1B7DE6FD009D0C9F /* MWMSearchManager.mm */,
34BBB71C1DD07A4B0002E025 /* MWMSearchManager+Filter.h */,
34BBB71D1DD07A4B0002E025 /* MWMSearchManager+Filter.mm */,
34BBB7211DD0853B0002E025 /* MWMSearchManager+Layout.h */,
34BBB7221DD0853B0002E025 /* MWMSearchManager+Layout.mm */,
34CFFE8C1B7DE71C009D0C9F /* MWMSearchView.xib */,
34CFFE8E1B7DE83D009D0C9F /* MWMSearchView.h */,
34CFFE8F1B7DE83D009D0C9F /* MWMSearchView.mm */,
3438CDFA1B862F5C0051AA78 /* MWMSearchContentView.h */,
3438CDFB1B862F5C0051AA78 /* MWMSearchContentView.mm */,
34B82AB01B8344E300180497 /* MWMSearchTextField.h */,
@ -2566,6 +2620,8 @@
348868E91D8721650069BBA3 /* MWMSearchNoResults.h */,
348868EA1D8721650069BBA3 /* MWMSearchNoResults.mm */,
348868ED1D8721800069BBA3 /* MWMSearchNoResults.xib */,
34257D191DC9FD9400DC5BB9 /* MWMSearchChangeModeView.h */,
34257D1A1DC9FD9400DC5BB9 /* MWMSearchChangeModeView.mm */,
);
path = Search;
sourceTree = "<group>";
@ -3674,6 +3730,7 @@
347FD8691C60B2CE002FB65E /* MWMOpeningHoursAddClosedTableViewCell.xib in Resources */,
F607C1871C032A8800B53A87 /* resources-hdpi_clear in Resources */,
F6CB21641AEFC42800FB8963 /* MWMPlacePageActionBar.xib in Resources */,
34257D0F1DC9FB0D00DC5BB9 /* MWMSearchFilters.storyboard in Resources */,
34F45E901B96E8B100AC93F8 /* MWMSearchTabButtonsView.xib in Resources */,
F64F4B6F1B46A5380081A24A /* MWMDownloaderDialogCell.xib in Resources */,
3485C0131B85C20E00F7712D /* MWMSearchTableViewController.xib in Resources */,
@ -3833,6 +3890,7 @@
F64D9CA31C899C760063FA30 /* MWMEditorViralAlert.xib in Resources */,
6741A9931BF340DE002C974C /* MWMSearchTabButtonsView.xib in Resources */,
6741A9951BF340DE002C974C /* MWMDownloaderDialogCell.xib in Resources */,
34257D101DC9FB0D00DC5BB9 /* MWMSearchFilters.storyboard in Resources */,
6741A9961BF340DE002C974C /* MWMSearchTableViewController.xib in Resources */,
F6BD1D241CA412E40047B8E8 /* MWMOsmAuthAlert.xib in Resources */,
6741A9981BF340DE002C974C /* resources-xhdpi_clear in Resources */,
@ -3943,6 +4001,7 @@
34B82ADE1B84A4A000180497 /* MWMSearchCommonCell.mm in Sources */,
F66A8FA81B09F052001B9C97 /* MWMiPhoneLandscapePlacePage.mm in Sources */,
974386DD19373EA400FD5659 /* ToastView.mm in Sources */,
34BBB71E1DD07A4B0002E025 /* MWMSearchManager+Filter.mm in Sources */,
F6C9343C1AE4F94A00DDC624 /* MWMAnimator.mm in Sources */,
347FD8771C60B2CE002FB65E /* MWMOpeningHoursDaysSelectorTableViewCell.mm in Sources */,
342EE4111C43DAA7009F6A49 /* MWMAuthorizationWebViewLoginViewController.mm in Sources */,
@ -3958,6 +4017,7 @@
34ABA6161C2D185C00FE1BEC /* MWMAuthorizationOSMLoginViewController.mm in Sources */,
34E0EECE1CC51B1D008E4919 /* MWMMapDownloaderButtonTableViewCell.mm in Sources */,
3492CC121C6DF00E0057D8E8 /* (null) in Sources */,
34257D111DC9FB0D00DC5BB9 /* MWMSearchFilterTransitioning.mm in Sources */,
34A759CF1DC795140078C3AE /* MWMWhatsNewNightModeController.mm in Sources */,
F6BBF2C61B4FFB72000CF8E2 /* MWMLocationAlert.mm in Sources */,
F66A8FB01B09F268001B9C97 /* MWMPlacePage.mm in Sources */,
@ -3985,6 +4045,7 @@
34F8ADD91B97229A004184CC /* MWMSearchTableView.mm in Sources */,
F653CE1C1C7361DA00A453F1 /* MWMObjectsCategorySelectorController.mm in Sources */,
3436FE821D366CDD005CD87B /* MWMSearch.mm in Sources */,
34257D171DC9FB0D00DC5BB9 /* MWMSearchHotelsFilterViewController.mm in Sources */,
B08AA8DA1A26299A00810B1C /* TimeUtils.mm in Sources */,
F6CB216D1AF13EBD00FB8963 /* MWMPlacePageBookmarkCell.mm in Sources */,
F653D4231AE9398700282659 /* MWMPlacePageViewManager.mm in Sources */,
@ -4027,6 +4088,7 @@
F6D4A73A1CC1267E00BD4E5B /* MWMNoteCell.mm in Sources */,
F6588E2F1B15D2BC00EE1E58 /* MWMBookmarkColorViewController.mm in Sources */,
F68FCB851DA7BBA6007CC7D7 /* MWMTaxiPreviewDataSource.mm in Sources */,
34257D151DC9FB0D00DC5BB9 /* MWMSearchFilterViewController.mm in Sources */,
34BC1E561C2ADBD3009BBF51 /* MWMOpeningHoursCommon.mm in Sources */,
F653CE161C71F60200A453F1 /* MWMAddPlaceNavigationBar.mm in Sources */,
A32B6D4D1A14980500E54A65 /* iosOGLContextFactory.mm in Sources */,
@ -4034,6 +4096,7 @@
34B104221D6EE45700C8B577 /* MWMUnitsController.mm in Sources */,
347FD8671C60B2CE002FB65E /* MWMOpeningHoursAddClosedTableViewCell.mm in Sources */,
FA054612155C465E001F4E37 /* SelectSetVC.mm in Sources */,
34257D0D1DC9FB0D00DC5BB9 /* MWMSearchFilterPresentationController.mm in Sources */,
FAA614B8155F16950031C345 /* AddSetVC.mm in Sources */,
34ABA6301C2D58F300FE1BEC /* MWMInputEmailValidator.mm in Sources */,
34CC4C121B82120700E44C1F /* MWMSearchTabbedViewLayout.mm in Sources */,
@ -4066,6 +4129,7 @@
348868F31D87DFB70069BBA3 /* MWMKeyboard.mm in Sources */,
978F9242183B660F000D6C7C /* SelectableCell.mm in Sources */,
34ABA6241C2D551900FE1BEC /* MWMInputValidatorFactory.mm in Sources */,
34257D1B1DC9FD9400DC5BB9 /* MWMSearchChangeModeView.mm in Sources */,
34B82AE21B84AC5E00180497 /* MWMSearchCategoriesManager.mm in Sources */,
34CE8A671C7740E100F4351A /* MWMStorage.mm in Sources */,
F6F7787A1DABC6D800B603E7 /* MWMTaxiCollectionLayout.mm in Sources */,
@ -4086,6 +4150,7 @@
3491E7CB1C06F1F10042FE24 /* MWMPlacePageButtonCell.mm in Sources */,
348C26051D701B9F00813924 /* MWMHelpController.mm in Sources */,
348868EB1D8721650069BBA3 /* MWMSearchNoResults.mm in Sources */,
34BBB7231DD0853B0002E025 /* MWMSearchManager+Layout.mm in Sources */,
341F99D91C6B1165001C67B8 /* MWMMapDownloaderPlaceTableViewCell.mm in Sources */,
34A759D01DC795140078C3AE /* MWMWhatsNewProfileBookingController.mm in Sources */,
345FD7E71CEC7D8400F58045 /* MWMEditorAdditionalNamesHeader.mm in Sources */,
@ -4093,6 +4158,7 @@
347FD86F1C60B2CE002FB65E /* MWMOpeningHoursAllDayTableViewCell.mm in Sources */,
F6ED13541B1643900095C6DE /* MWMDirectionView.mm in Sources */,
3400A6811CA29D7D003DA0EC /* NSString+Categories.mm in Sources */,
34257D131DC9FB0D00DC5BB9 /* MWMSearchFilterTransitioningDelegate.mm in Sources */,
F63774EA1B59376F00BCF54D /* MWMRoutingDisclaimerAlert.mm in Sources */,
34E273211C737A4100463965 /* MWMMigrationViewController.mm in Sources */,
F64F19A31AB81A00006EAF7E /* MWMDownloadTransitMapAlert.mm in Sources */,
@ -4119,7 +4185,6 @@
34A759CA1DC795140078C3AE /* MWMWelcomeController.mm in Sources */,
34D15BA81BD8F93C00C8BCBE /* AddSetTableViewCell.mm in Sources */,
F6A218491CA3F26800BE2CC6 /* MWMEditorViralActivityItem.mm in Sources */,
34CFFE901B7DE83D009D0C9F /* MWMSearchView.mm in Sources */,
F62F1D951C3281F1006CF38E /* UIImageView+Coloring.mm in Sources */,
F6FE2C151B04A44E009814AA /* MWMPlacePageEntity.mm in Sources */,
34B82AB21B8344E300180497 /* MWMSearchTextField.mm in Sources */,
@ -4191,6 +4256,7 @@
6741A9CA1BF340DE002C974C /* MWMAnimator.mm in Sources */,
3499C6871D51D3A700A1048A /* UIButton+Orientation.mm in Sources */,
6741A9CB1BF340DE002C974C /* MWMSearchContentView.mm in Sources */,
34BBB71F1DD07A4B0002E025 /* MWMSearchManager+Filter.mm in Sources */,
347FD8781C60B2CE002FB65E /* MWMOpeningHoursDaysSelectorTableViewCell.mm in Sources */,
34A759D91DC795D10078C3AE /* MWMWhatsNewUberController.mm in Sources */,
342EE4121C43DAA7009F6A49 /* MWMAuthorizationWebViewLoginViewController.mm in Sources */,
@ -4206,6 +4272,7 @@
6741A9CF1BF340DE002C974C /* MWMLocationAlert.mm in Sources */,
34ABA62D1C2D57D500FE1BEC /* MWMInputPasswordValidator.mm in Sources */,
F6D1A0B21D76E33D0070A015 /* MWMPlacePageData.mm in Sources */,
34257D121DC9FB0D00DC5BB9 /* MWMSearchFilterTransitioning.mm in Sources */,
34ABA6171C2D185C00FE1BEC /* MWMAuthorizationOSMLoginViewController.mm in Sources */,
6741A9D01BF340DE002C974C /* MWMPlacePage.mm in Sources */,
3492CC131C6DF00F0057D8E8 /* (null) in Sources */,
@ -4233,6 +4300,7 @@
34A759E41DC797CE0078C3AE /* MWMPageControllerDataSource.mm in Sources */,
6741A9E01BF340DE002C974C /* MWMDownloaderDialogHeader.mm in Sources */,
6741A9E11BF340DE002C974C /* MWMSearchTableView.mm in Sources */,
34257D181DC9FB0D00DC5BB9 /* MWMSearchHotelsFilterViewController.mm in Sources */,
6741A9E31BF340DE002C974C /* TimeUtils.mm in Sources */,
341F99EE1C6B28A7001C67B8 /* MWMMapDownloaderExtendedDataSource.mm in Sources */,
3436FE831D366CDD005CD87B /* MWMSearch.mm in Sources */,
@ -4275,6 +4343,7 @@
F6E2B00E1D9E944600793C36 /* MWMPPView.mm in Sources */,
34BC1E571C2ADBD3009BBF51 /* MWMOpeningHoursCommon.mm in Sources */,
F6381BF61CD12045004CA943 /* LocaleTranslator.mm in Sources */,
34257D161DC9FB0D00DC5BB9 /* MWMSearchFilterViewController.mm in Sources */,
F6D4A73B1CC1267E00BD4E5B /* MWMNoteCell.mm in Sources */,
F68FCB861DA7BBA6007CC7D7 /* MWMTaxiPreviewDataSource.mm in Sources */,
347FD8681C60B2CE002FB65E /* MWMOpeningHoursAddClosedTableViewCell.mm in Sources */,
@ -4282,6 +4351,7 @@
6741AA011BF340DE002C974C /* MWMSearchTabbedViewLayout.mm in Sources */,
349C3AED1D33A933002AC7A9 /* MWMNavigationInfoView.mm in Sources */,
34B104231D6EE45700C8B577 /* MWMUnitsController.mm in Sources */,
34257D0E1DC9FB0D00DC5BB9 /* MWMSearchFilterPresentationController.mm in Sources */,
6741AA021BF340DE002C974C /* BookmarksRootVC.mm in Sources */,
6741AA031BF340DE002C974C /* MWMActivityViewController.mm in Sources */,
34DDD5341BFDB0B600407F2F /* MWMMapDownloaderViewController.mm in Sources */,
@ -4314,6 +4384,7 @@
6741AA131BF340DE002C974C /* UIColor+MapsMeColor.mm in Sources */,
34ABA6251C2D551900FE1BEC /* MWMInputValidatorFactory.mm in Sources */,
348868F41D87DFB70069BBA3 /* MWMKeyboard.mm in Sources */,
34257D1C1DC9FD9400DC5BB9 /* MWMSearchChangeModeView.mm in Sources */,
F639883C1CF70FE500226B6B /* MWMActionBarButton.mm in Sources */,
34CE8A681C7740E100F4351A /* MWMStorage.mm in Sources */,
6741AA141BF340DE002C974C /* MWMMultilineLabel.mm in Sources */,
@ -4334,6 +4405,7 @@
6741AA1D1BF340DE002C974C /* MWMDownloadTransitMapAlert.mm in Sources */,
341F99DA1C6B1165001C67B8 /* MWMMapDownloaderPlaceTableViewCell.mm in Sources */,
341F99D61C6B1165001C67B8 /* MWMMapDownloaderLargeCountryTableViewCell.mm in Sources */,
34BBB7241DD0853B0002E025 /* MWMSearchManager+Layout.mm in Sources */,
348C26061D701B9F00813924 /* MWMHelpController.mm in Sources */,
348868EC1D8721650069BBA3 /* MWMSearchNoResults.mm in Sources */,
6741AA1E1BF340DE002C974C /* LinkCell.mm in Sources */,
@ -4341,6 +4413,7 @@
347FD8701C60B2CE002FB65E /* MWMOpeningHoursAllDayTableViewCell.mm in Sources */,
6741AA1F1BF340DE002C974C /* MWMSearchBookmarksCell.mm in Sources */,
34E273221C737A4100463965 /* MWMMigrationViewController.mm in Sources */,
34257D141DC9FB0D00DC5BB9 /* MWMSearchFilterTransitioningDelegate.mm in Sources */,
3400A6821CA29D7D003DA0EC /* NSString+Categories.mm in Sources */,
341F99E91C6B119E001C67B8 /* MWMMapDownloaderDefaultDataSource.mm in Sources */,
6741AA221BF340DE002C974C /* MWMNavigationView.mm in Sources */,
@ -4368,7 +4441,6 @@
6741AA2C1BF340DE002C974C /* MWMSearchBookmarksManager.mm in Sources */,
F6A2184A1CA3F26800BE2CC6 /* MWMEditorViralActivityItem.mm in Sources */,
6741AA2D1BF340DE002C974C /* AddSetTableViewCell.mm in Sources */,
6741AA2E1BF340DE002C974C /* MWMSearchView.mm in Sources */,
6741AA2F1BF340DE002C974C /* MWMPlacePageEntity.mm in Sources */,
34A759E31DC797CB0078C3AE /* MWMPageController.mm in Sources */,
6741AA301BF340DE002C974C /* MWMSearchTextField.mm in Sources */,

View file

@ -95,6 +95,8 @@
self.mwm_coloring = MWMImageColoringGray;
else if ([coloring isEqualToString:@"MWMSeparator"])
self.mwm_coloring = MWMImageColoringSeparator;
else if ([coloring isEqualToString:@"MWMWhite"])
self.mwm_coloring = MWMImageColoringWhite;
else
NSAssert(false, @"Incorrect UIImageView's coloring");
}

View file

@ -19,6 +19,13 @@
3453BD591DAF91C100380ECB /* emitter.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 3453BD561DAF91C100380ECB /* emitter.hpp */; };
3453BD5A1DAF91C100380ECB /* hotels_filter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3453BD571DAF91C100380ECB /* hotels_filter.cpp */; };
3453BD5B1DAF91C100380ECB /* hotels_filter.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 3453BD581DAF91C100380ECB /* hotels_filter.hpp */; };
34586B891DCB1E8300CF7FC9 /* hotels_filter_test.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 34586B821DCB1E8300CF7FC9 /* hotels_filter_test.cpp */; };
34586B8A1DCB1E8300CF7FC9 /* house_numbers_matcher_test.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 34586B831DCB1E8300CF7FC9 /* house_numbers_matcher_test.cpp */; };
34586B8B1DCB1E8300CF7FC9 /* interval_set_test.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 34586B841DCB1E8300CF7FC9 /* interval_set_test.cpp */; };
34586B8C1DCB1E8300CF7FC9 /* locality_scorer_test.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 34586B851DCB1E8300CF7FC9 /* locality_scorer_test.cpp */; };
34586B8D1DCB1E8300CF7FC9 /* locality_selector_test.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 34586B861DCB1E8300CF7FC9 /* locality_selector_test.cpp */; };
34586B8E1DCB1E8300CF7FC9 /* nearby_points_sweeper_test.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 34586B871DCB1E8300CF7FC9 /* nearby_points_sweeper_test.cpp */; };
34586B8F1DCB1E8300CF7FC9 /* ranking_tests.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 34586B881DCB1E8300CF7FC9 /* ranking_tests.cpp */; };
345C8DAF1D2D15A50037E3A6 /* cbv.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 345C8DA91D2D15A50037E3A6 /* cbv.cpp */; };
345C8DB01D2D15A50037E3A6 /* cbv.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 345C8DAA1D2D15A50037E3A6 /* cbv.hpp */; };
345C8DB11D2D15A50037E3A6 /* geocoder_context.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 345C8DAB1D2D15A50037E3A6 /* geocoder_context.cpp */; };
@ -194,6 +201,13 @@
3453BD561DAF91C100380ECB /* emitter.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = emitter.hpp; sourceTree = "<group>"; };
3453BD571DAF91C100380ECB /* hotels_filter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = hotels_filter.cpp; sourceTree = "<group>"; };
3453BD581DAF91C100380ECB /* hotels_filter.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = hotels_filter.hpp; sourceTree = "<group>"; };
34586B821DCB1E8300CF7FC9 /* hotels_filter_test.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = hotels_filter_test.cpp; sourceTree = "<group>"; };
34586B831DCB1E8300CF7FC9 /* house_numbers_matcher_test.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = house_numbers_matcher_test.cpp; sourceTree = "<group>"; };
34586B841DCB1E8300CF7FC9 /* interval_set_test.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = interval_set_test.cpp; sourceTree = "<group>"; };
34586B851DCB1E8300CF7FC9 /* locality_scorer_test.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = locality_scorer_test.cpp; sourceTree = "<group>"; };
34586B861DCB1E8300CF7FC9 /* locality_selector_test.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = locality_selector_test.cpp; sourceTree = "<group>"; };
34586B871DCB1E8300CF7FC9 /* nearby_points_sweeper_test.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = nearby_points_sweeper_test.cpp; sourceTree = "<group>"; };
34586B881DCB1E8300CF7FC9 /* ranking_tests.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ranking_tests.cpp; sourceTree = "<group>"; };
345C8DA91D2D15A50037E3A6 /* cbv.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = cbv.cpp; sourceTree = "<group>"; };
345C8DAA1D2D15A50037E3A6 /* cbv.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = cbv.hpp; sourceTree = "<group>"; };
345C8DAB1D2D15A50037E3A6 /* geocoder_context.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = geocoder_context.cpp; sourceTree = "<group>"; };
@ -428,6 +442,13 @@
671C620D1AE9225100076BD0 /* search_tests */ = {
isa = PBXGroup;
children = (
34586B821DCB1E8300CF7FC9 /* hotels_filter_test.cpp */,
34586B831DCB1E8300CF7FC9 /* house_numbers_matcher_test.cpp */,
34586B841DCB1E8300CF7FC9 /* interval_set_test.cpp */,
34586B851DCB1E8300CF7FC9 /* locality_scorer_test.cpp */,
34586B861DCB1E8300CF7FC9 /* locality_selector_test.cpp */,
34586B871DCB1E8300CF7FC9 /* nearby_points_sweeper_test.cpp */,
34586B881DCB1E8300CF7FC9 /* ranking_tests.cpp */,
A1347D541B8758E9009050FF /* query_saver_tests.cpp */,
670D04A61B0B94F90013A7AC /* libs */,
671C62241AE9229A00076BD0 /* testingmain.cpp */,
@ -829,10 +850,13 @@
F652D8F01CFDE21900FC29A0 /* geocoder.cpp in Sources */,
347F331C1C4540A8009758CC /* locality.cpp in Sources */,
F652D8F21CFDE21900FC29A0 /* geometry_cache.cpp in Sources */,
34586B8C1DCB1E8300CF7FC9 /* locality_scorer_test.cpp in Sources */,
34586B8E1DCB1E8300CF7FC9 /* nearby_points_sweeper_test.cpp in Sources */,
345C8DB11D2D15A50037E3A6 /* geocoder_context.cpp in Sources */,
3461C9A31D79949600E6E6F5 /* editor_delegate.cpp in Sources */,
F652D8BF1CFDE1E800FC29A0 /* engine.cpp in Sources */,
675346DD1A40560D00A0A8C3 /* approximate_string_match.cpp in Sources */,
34586B8B1DCB1E8300CF7FC9 /* interval_set_test.cpp in Sources */,
0810EC361D6D9D2E00ABFEE7 /* displayed_categories.cpp in Sources */,
675346E51A40560D00A0A8C3 /* intermediate_result.cpp in Sources */,
F652D9021CFDE21900FC29A0 /* pre_ranking_info.cpp in Sources */,
@ -851,16 +875,20 @@
675346F11A40560D00A0A8C3 /* result.cpp in Sources */,
F652D8C11CFDE1E800FC29A0 /* features_filter.cpp in Sources */,
F652D8F81CFDE21900FC29A0 /* intersection_result.cpp in Sources */,
34586B891DCB1E8300CF7FC9 /* hotels_filter_test.cpp in Sources */,
3469FAD41D6C5D9C00F35A88 /* nearby_points_sweeper.cpp in Sources */,
347F33221C4540A8009758CC /* region.cpp in Sources */,
F652D9061CFDE21900FC29A0 /* ranking_info.cpp in Sources */,
F652D9001CFDE21900FC29A0 /* nested_rects_cache.cpp in Sources */,
34586B8D1DCB1E8300CF7FC9 /* locality_selector_test.cpp in Sources */,
3441CE501CFC1D7000CF30D4 /* processor.cpp in Sources */,
F652D9041CFDE21900FC29A0 /* rank_table_cache.cpp in Sources */,
F652D8EE1CFDE21900FC29A0 /* features_layer.cpp in Sources */,
675346E21A40560D00A0A8C3 /* house_detector.cpp in Sources */,
345C8DAF1D2D15A50037E3A6 /* cbv.cpp in Sources */,
34586B8A1DCB1E8300CF7FC9 /* house_numbers_matcher_test.cpp in Sources */,
F659FC6D1CF4A30B000A06B1 /* pre_ranker.cpp in Sources */,
34586B8F1DCB1E8300CF7FC9 /* ranking_tests.cpp in Sources */,
F652D9081CFDE21900FC29A0 /* ranking_utils.cpp in Sources */,
3465B2821D5DE71A0021E14D /* search_params.cpp in Sources */,
347F33241C4540A8009758CC /* retrieval.cpp in Sources */,