forked from organicmaps/organicmaps
Merge pull request #4262 from igrechuhin/fix-layout
[ios] Refactored «no results» screens.
This commit is contained in:
commit
37fab9d4e1
23 changed files with 604 additions and 427 deletions
|
@ -1,10 +1,11 @@
|
|||
#import "MWMPlaceDoesntExistAlert.h"
|
||||
#import "MWMKeyboard.h"
|
||||
|
||||
@interface MWMPlaceDoesntExistAlert ()
|
||||
@interface MWMPlaceDoesntExistAlert ()<MWMKeyboardObserver>
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UITextField * textField;
|
||||
@property (weak, nonatomic) IBOutlet NSLayoutConstraint * centerHorizontaly;
|
||||
@property (copy, nonatomic) MWMStringBlock block;
|
||||
@property(weak, nonatomic) IBOutlet UITextField * textField;
|
||||
@property(weak, nonatomic) IBOutlet NSLayoutConstraint * centerHorizontaly;
|
||||
@property(copy, nonatomic) MWMStringBlock block;
|
||||
|
||||
@end
|
||||
|
||||
|
@ -12,19 +13,12 @@
|
|||
|
||||
+ (instancetype)alertWithBlock:(MWMStringBlock)block
|
||||
{
|
||||
MWMPlaceDoesntExistAlert * alert = [[[NSBundle mainBundle] loadNibNamed:[MWMPlaceDoesntExistAlert className] owner:nil
|
||||
options:nil] firstObject];
|
||||
MWMPlaceDoesntExistAlert * alert =
|
||||
[[[NSBundle mainBundle] loadNibNamed:[MWMPlaceDoesntExistAlert className]
|
||||
owner:nil
|
||||
options:nil] firstObject];
|
||||
alert.block = block;
|
||||
|
||||
[[NSNotificationCenter defaultCenter] addObserver:alert
|
||||
selector:@selector(keyboardWillShow:)
|
||||
name:UIKeyboardWillShowNotification
|
||||
object:nil];
|
||||
|
||||
[[NSNotificationCenter defaultCenter] addObserver:alert
|
||||
selector:@selector(keyboardWillHide:)
|
||||
name:UIKeyboardWillHideNotification
|
||||
object:nil];
|
||||
[MWMKeyboard addObserver:alert];
|
||||
return alert;
|
||||
}
|
||||
|
||||
|
@ -41,32 +35,13 @@
|
|||
[self close];
|
||||
}
|
||||
|
||||
- (void)dealloc
|
||||
#pragma mark - MWMKeyboard
|
||||
|
||||
- (void)onKeyboardAnimation
|
||||
{
|
||||
[[NSNotificationCenter defaultCenter] removeObserver:self];
|
||||
}
|
||||
|
||||
- (void)keyboardWillShow:(NSNotification *)notification
|
||||
{
|
||||
CGFloat const keyboardHeight = [notification.userInfo[UIKeyboardFrameBeginUserInfoKey] CGRectValue].size.height;
|
||||
NSNumber * rate = notification.userInfo[UIKeyboardAnimationDurationUserInfoKey];
|
||||
[self setNeedsLayout];
|
||||
self.centerHorizontaly.constant = - keyboardHeight / 2;
|
||||
[UIView animateWithDuration:rate.floatValue animations:^
|
||||
{
|
||||
[self layoutIfNeeded];
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)keyboardWillHide:(NSNotification *)notification
|
||||
{
|
||||
NSNumber * rate = notification.userInfo[UIKeyboardAnimationDurationUserInfoKey];
|
||||
[self setNeedsLayout];
|
||||
self.centerHorizontaly.constant = 0;
|
||||
[UIView animateWithDuration:rate.floatValue animations:^
|
||||
{
|
||||
[self layoutIfNeeded];
|
||||
}];
|
||||
self.centerHorizontaly.constant = -[MWMKeyboard keyboardHeight] / 2;
|
||||
[self layoutIfNeeded];
|
||||
}
|
||||
|
||||
- (void)onKeyboardWillAnimate { [self setNeedsLayout]; }
|
||||
@end
|
||||
|
|
|
@ -287,6 +287,7 @@ CGFloat constexpr kTimeWidthRegular = 128;
|
|||
break;
|
||||
case MWMBottomMenuStatePlanning:
|
||||
case MWMBottomMenuStateGo:
|
||||
self.downloadBadge.hidden = YES;
|
||||
self.menuButton.hidden = YES;
|
||||
self.bookmarksButton.hidden = YES;
|
||||
self.p2pButton.hidden = YES;
|
||||
|
@ -295,6 +296,7 @@ CGFloat constexpr kTimeWidthRegular = 128;
|
|||
break;
|
||||
case MWMBottomMenuStateRouting:
|
||||
case MWMBottomMenuStateRoutingExpanded:
|
||||
self.downloadBadge.hidden = YES;
|
||||
self.bookmarksButton.hidden = YES;
|
||||
self.routingView.hidden = NO;
|
||||
self.routingAdditionalView.hidden = NO;
|
||||
|
@ -549,7 +551,8 @@ CGFloat constexpr kTimeWidthRegular = 128;
|
|||
|
||||
- (void)updateBadge
|
||||
{
|
||||
if (self.state == MWMBottomMenuStateRouting || self.state == MWMBottomMenuStateRoutingExpanded)
|
||||
if (self.state == MWMBottomMenuStateRouting || self.state == MWMBottomMenuStateRoutingExpanded ||
|
||||
self.state == MWMBottomMenuStatePlanning || self.state == MWMBottomMenuStateGo)
|
||||
{
|
||||
self.downloadBadge.hidden = YES;
|
||||
return;
|
||||
|
@ -582,7 +585,6 @@ CGFloat constexpr kTimeWidthRegular = 128;
|
|||
{
|
||||
if (MapsAppDelegate.theApp.routingPlaneMode == MWMRoutingPlaneModeNone)
|
||||
_leftBound = 0.0;
|
||||
[self updateBadge];
|
||||
self.p2pButton.hidden = self.searchButton.hidden = self.bookmarksButton.hidden = NO;
|
||||
self.menuButton.hidden = NO;
|
||||
self.layoutDuration =
|
||||
|
@ -660,6 +662,7 @@ CGFloat constexpr kTimeWidthRegular = 128;
|
|||
if (updateMenuButton)
|
||||
[self updateMenuButtonFromState:_state toState:state];
|
||||
_state = state;
|
||||
[self updateBadge];
|
||||
}
|
||||
|
||||
- (void)setLeftBound:(CGFloat)leftBound
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
@interface MWMSearchNoResults : UIView
|
||||
|
||||
+ (instancetype)viewWithImage:(UIImage *)image title:(NSString *)title text:(NSString *)text;
|
||||
|
||||
@end
|
|
@ -0,0 +1,52 @@
|
|||
#import "MWMSearchNoResults.h"
|
||||
|
||||
namespace
|
||||
{
|
||||
CGFloat constexpr kCompactHeight = 216;
|
||||
CGFloat constexpr kExtraCompactHeight = 52;
|
||||
} // namespace
|
||||
|
||||
@interface MWMSearchNoResults ()
|
||||
|
||||
@property(weak, nonatomic) IBOutlet UIImageView * image;
|
||||
@property(weak, nonatomic) IBOutlet UILabel * title;
|
||||
@property(weak, nonatomic) IBOutlet UILabel * text;
|
||||
@property(weak, nonatomic) IBOutlet NSLayoutConstraint * textCenterY;
|
||||
@property(weak, nonatomic) IBOutlet NSLayoutConstraint * textOffsetToImage;
|
||||
|
||||
@end
|
||||
|
||||
@implementation MWMSearchNoResults
|
||||
|
||||
+ (instancetype)viewWithImage:(UIImage *)image title:(NSString *)title text:(NSString *)text
|
||||
{
|
||||
MWMSearchNoResults * view =
|
||||
[[[NSBundle mainBundle] loadNibNamed:[MWMSearchNoResults className] owner:nil options:nil]
|
||||
firstObject];
|
||||
view.image.image = image;
|
||||
if (title)
|
||||
{
|
||||
view.title.text = title;
|
||||
}
|
||||
else
|
||||
{
|
||||
[view.title removeFromSuperview];
|
||||
view.textOffsetToImage.priority = UILayoutPriorityDefaultHigh;
|
||||
}
|
||||
view.text.text = text;
|
||||
return view;
|
||||
}
|
||||
|
||||
- (void)layoutSubviews
|
||||
{
|
||||
[super layoutSubviews];
|
||||
self.frame = self.superview.bounds;
|
||||
BOOL const compact = self.height < kCompactHeight;
|
||||
self.image.hidden = compact;
|
||||
self.textCenterY.priority =
|
||||
compact ? UILayoutPriorityDefaultHigh : UILayoutPriorityFittingSizeLevel;
|
||||
BOOL const extraCompact = self.height < kExtraCompactHeight;
|
||||
self.title.hidden = extraCompact;
|
||||
}
|
||||
|
||||
@end
|
|
@ -0,0 +1,67 @@
|
|||
<?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">
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
|
||||
<capability name="Aspect ratio constraints" minToolsVersion="5.1"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<view contentMode="scaleToFill" id="iN0-l3-epB" customClass="MWMSearchNoResults">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="250"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" horizontalCompressionResistancePriority="400" verticalCompressionResistancePriority="400" translatesAutoresizingMaskIntoConstraints="NO" id="Yc4-sP-zqq">
|
||||
<rect key="frame" x="91" y="24" width="137" height="137"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" relation="lessThanOrEqual" constant="160" id="8QI-AM-7wH"/>
|
||||
<constraint firstAttribute="width" secondItem="Yc4-sP-zqq" secondAttribute="height" multiplier="1:1" id="tkN-yC-YFM"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" horizontalCompressionResistancePriority="1000" verticalCompressionResistancePriority="1000" text="Label" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" preferredMaxLayoutWidth="288" translatesAutoresizingMaskIntoConstraints="NO" id="vGi-FH-krh">
|
||||
<rect key="frame" x="16" y="173" width="288" height="21"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="colorName" value="blackPrimaryText"/>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="fontName" value="medium18"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" horizontalCompressionResistancePriority="1000" verticalCompressionResistancePriority="1000" text="Label" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" preferredMaxLayoutWidth="288" translatesAutoresizingMaskIntoConstraints="NO" id="2Z7-NG-6sZ">
|
||||
<rect key="frame" x="16" y="206" width="288" height="20"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="fontName" value="regular14"/>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="colorName" value="blackSecondaryText"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="trailing" secondItem="vGi-FH-krh" secondAttribute="trailing" constant="16" id="1Ye-aw-qVm"/>
|
||||
<constraint firstItem="2Z7-NG-6sZ" firstAttribute="top" secondItem="Yc4-sP-zqq" secondAttribute="bottom" priority="50" constant="12" id="2eV-Dh-WAy"/>
|
||||
<constraint firstAttribute="bottom" secondItem="2Z7-NG-6sZ" secondAttribute="bottom" priority="500" constant="24" id="3nQ-cB-Esf"/>
|
||||
<constraint firstItem="2Z7-NG-6sZ" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="centerY" priority="250" id="AK9-c1-mte"/>
|
||||
<constraint firstItem="vGi-FH-krh" firstAttribute="top" secondItem="Yc4-sP-zqq" secondAttribute="bottom" priority="500" constant="12" id="Rgg-Cm-CQr"/>
|
||||
<constraint firstItem="2Z7-NG-6sZ" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="16" id="Ucg-Kh-I5L"/>
|
||||
<constraint firstItem="2Z7-NG-6sZ" firstAttribute="top" secondItem="vGi-FH-krh" secondAttribute="bottom" constant="12" id="XYx-js-SkS"/>
|
||||
<constraint firstAttribute="trailing" secondItem="2Z7-NG-6sZ" secondAttribute="trailing" constant="16" id="ZH9-Do-kc8"/>
|
||||
<constraint firstItem="Yc4-sP-zqq" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" priority="500" constant="24" id="apL-35-zY4"/>
|
||||
<constraint firstItem="Yc4-sP-zqq" firstAttribute="centerX" secondItem="iN0-l3-epB" secondAttribute="centerX" id="fXA-d7-xQx"/>
|
||||
<constraint firstItem="vGi-FH-krh" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="16" id="lDj-iy-gS7"/>
|
||||
</constraints>
|
||||
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
|
||||
<connections>
|
||||
<outlet property="image" destination="Yc4-sP-zqq" id="nPB-TU-daa"/>
|
||||
<outlet property="text" destination="2Z7-NG-6sZ" id="eaY-75-TDT"/>
|
||||
<outlet property="textCenterY" destination="AK9-c1-mte" id="XbC-PV-37Y"/>
|
||||
<outlet property="textOffsetToImage" destination="2eV-Dh-WAy" id="y1a-WQ-nhu"/>
|
||||
<outlet property="title" destination="vGi-FH-krh" id="11v-W7-Rpl"/>
|
||||
</connections>
|
||||
</view>
|
||||
</objects>
|
||||
</document>
|
|
@ -1,6 +1,7 @@
|
|||
#import "Macros.h"
|
||||
#import "MWMSearchBookmarksCell.h"
|
||||
#import "MWMSearchBookmarksManager.h"
|
||||
#import "MWMSearchBookmarksCell.h"
|
||||
#import "MWMSearchNoResults.h"
|
||||
#import "Macros.h"
|
||||
|
||||
#include "Framework.h"
|
||||
|
||||
|
@ -10,9 +11,10 @@ static NSString * const kBookmarksCellIdentifier = @"MWMSearchBookmarksCell";
|
|||
|
||||
@interface MWMSearchBookmarksManager ()
|
||||
|
||||
@property (weak, nonatomic) MWMSearchTabbedCollectionViewCell * cell;
|
||||
@property(weak, nonatomic) MWMSearchTabbedCollectionViewCell * cell;
|
||||
|
||||
@property (nonatomic) MWMSearchBookmarksCell * sizingCell;
|
||||
@property(nonatomic) MWMSearchBookmarksCell * sizingCell;
|
||||
@property(nonatomic) MWMSearchNoResults * noResultsView;
|
||||
|
||||
@end
|
||||
|
||||
|
@ -23,16 +25,15 @@ static NSString * const kBookmarksCellIdentifier = @"MWMSearchBookmarksCell";
|
|||
self = [super init];
|
||||
if (self)
|
||||
{
|
||||
[NSNotificationCenter.defaultCenter addObserver:self selector:@selector(updateCell) name:kBookmarksChangedNotification object:nil];
|
||||
[NSNotificationCenter.defaultCenter addObserver:self
|
||||
selector:@selector(updateCell)
|
||||
name:kBookmarksChangedNotification
|
||||
object:nil];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
[NSNotificationCenter.defaultCenter removeObserver:self];
|
||||
}
|
||||
|
||||
- (void)dealloc { [NSNotificationCenter.defaultCenter removeObserver:self]; }
|
||||
- (void)attachCell:(MWMSearchTabbedCollectionViewCell *)cell
|
||||
{
|
||||
self.cell = cell;
|
||||
|
@ -46,7 +47,7 @@ static NSString * const kBookmarksCellIdentifier = @"MWMSearchBookmarksCell";
|
|||
return;
|
||||
if (GetFramework().GetBmCategoriesCount() > 0)
|
||||
{
|
||||
cell.noResultsView.hidden = YES;
|
||||
[cell removeNoResultsView];
|
||||
UITableView * tableView = cell.tableView;
|
||||
tableView.hidden = NO;
|
||||
tableView.delegate = self;
|
||||
|
@ -58,10 +59,7 @@ static NSString * const kBookmarksCellIdentifier = @"MWMSearchBookmarksCell";
|
|||
else
|
||||
{
|
||||
cell.tableView.hidden = YES;
|
||||
cell.noResultsView.hidden = NO;
|
||||
cell.noResultsImage.image = [UIImage imageNamed:@"img_bookmarks"];
|
||||
cell.noResultsTitle.text = L(@"search_bookmarks_no_results_title");
|
||||
cell.noResultsText.text = L(@"search_bookmarks_no_results_text");
|
||||
[cell addNoResultsView:self.noResultsView];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -72,14 +70,16 @@ static NSString * const kBookmarksCellIdentifier = @"MWMSearchBookmarksCell";
|
|||
return GetFramework().GetBmCategoriesCount();
|
||||
}
|
||||
|
||||
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
- (UITableViewCell *)tableView:(UITableView *)tableView
|
||||
cellForRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
return [tableView dequeueReusableCellWithIdentifier:kBookmarksCellIdentifier];
|
||||
}
|
||||
|
||||
#pragma mark - UITableViewDelegate
|
||||
|
||||
- (CGFloat)tableView:(UITableView *)tableView estimatedHeightForRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
- (CGFloat)tableView:(UITableView *)tableView
|
||||
estimatedHeightForRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
return MWMSearchBookmarksCell.defaultCellHeight;
|
||||
}
|
||||
|
@ -90,8 +90,9 @@ static NSString * const kBookmarksCellIdentifier = @"MWMSearchBookmarksCell";
|
|||
return self.sizingCell.cellHeight;
|
||||
}
|
||||
|
||||
- (void)tableView:(UITableView *)tableView willDisplayCell:(MWMSearchBookmarksCell *)cell
|
||||
forRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
- (void)tableView:(UITableView *)tableView
|
||||
willDisplayCell:(MWMSearchBookmarksCell *)cell
|
||||
forRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
[cell configForIndex:indexPath.row];
|
||||
}
|
||||
|
@ -105,4 +106,15 @@ forRowAtIndexPath:(NSIndexPath *)indexPath
|
|||
return _sizingCell;
|
||||
}
|
||||
|
||||
- (MWMSearchNoResults *)noResultsView
|
||||
{
|
||||
if (!_noResultsView)
|
||||
{
|
||||
_noResultsView = [MWMSearchNoResults viewWithImage:[UIImage imageNamed:@"img_bookmarks"]
|
||||
title:L(@"search_bookmarks_no_results_title")
|
||||
text:L(@"search_bookmarks_no_results_text")];
|
||||
}
|
||||
return _noResultsView;
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
@ -25,7 +25,7 @@ static NSString * const kCellIdentifier = @"MWMSearchCategoryCell";
|
|||
|
||||
- (void)attachCell:(MWMSearchTabbedCollectionViewCell *)cell
|
||||
{
|
||||
cell.noResultsView.hidden = YES;
|
||||
[cell removeNoResultsView];
|
||||
UITableView * tableView = cell.tableView;
|
||||
tableView.alpha = 1.0;
|
||||
tableView.hidden = NO;
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
#import "MWMSearchHistoryClearCell.h"
|
||||
#import "MWMSearchHistoryMyPositionCell.h"
|
||||
#import "MWMSearchHistoryRequestCell.h"
|
||||
#import "MWMSearchNoResults.h"
|
||||
#import "Macros.h"
|
||||
#import "MapsAppDelegate.h"
|
||||
#import "Statistics.h"
|
||||
|
@ -19,6 +20,7 @@ static NSString * const kMyPositionCellIdentifier = @"MWMSearchHistoryMyPosition
|
|||
@property(weak, nonatomic) MWMSearchTabbedCollectionViewCell * cell;
|
||||
|
||||
@property(nonatomic) MWMSearchHistoryRequestCell * sizingCell;
|
||||
@property(nonatomic) MWMSearchNoResults * noResultsView;
|
||||
|
||||
@end
|
||||
|
||||
|
@ -36,16 +38,16 @@ static NSString * const kMyPositionCellIdentifier = @"MWMSearchHistoryMyPosition
|
|||
{
|
||||
self.cell = cell;
|
||||
UITableView * tableView = cell.tableView;
|
||||
tableView.alpha = cell.noResultsView.alpha = 1.0;
|
||||
tableView.alpha = 1.0;
|
||||
BOOL const isRouteSearch = self.isRouteSearchMode;
|
||||
if (GetFramework().GetLastSearchQueries().empty() && !isRouteSearch)
|
||||
{
|
||||
tableView.hidden = YES;
|
||||
cell.noResultsView.hidden = NO;
|
||||
[cell addNoResultsView:self.noResultsView];
|
||||
}
|
||||
else
|
||||
{
|
||||
cell.noResultsView.hidden = YES;
|
||||
[cell removeNoResultsView];
|
||||
tableView.hidden = NO;
|
||||
tableView.delegate = self;
|
||||
tableView.dataSource = self;
|
||||
|
@ -60,9 +62,6 @@ static NSString * const kMyPositionCellIdentifier = @"MWMSearchHistoryMyPosition
|
|||
}
|
||||
[tableView reloadData];
|
||||
}
|
||||
cell.noResultsImage.image = [UIImage imageNamed:@"img_search_history"];
|
||||
cell.noResultsTitle.text = L(@"search_history_title");
|
||||
cell.noResultsText.text = L(@"search_history_text");
|
||||
}
|
||||
|
||||
- (search::QuerySaver::TSearchRequest const &)queryAtIndex:(NSInteger)index
|
||||
|
@ -168,11 +167,10 @@ static NSString * const kMyPositionCellIdentifier = @"MWMSearchHistoryMyPosition
|
|||
[UIView animateWithDuration:kDefaultAnimationDuration
|
||||
animations:^{
|
||||
cell.tableView.alpha = 0.0;
|
||||
cell.noResultsView.alpha = 1.0;
|
||||
}
|
||||
completion:^(BOOL finished) {
|
||||
cell.tableView.hidden = YES;
|
||||
cell.noResultsView.hidden = NO;
|
||||
[cell addNoResultsView:self.noResultsView];
|
||||
}];
|
||||
}
|
||||
}
|
||||
|
@ -186,4 +184,15 @@ static NSString * const kMyPositionCellIdentifier = @"MWMSearchHistoryMyPosition
|
|||
return _sizingCell;
|
||||
}
|
||||
|
||||
- (MWMSearchNoResults *)noResultsView
|
||||
{
|
||||
if (!_noResultsView)
|
||||
{
|
||||
_noResultsView = [MWMSearchNoResults viewWithImage:[UIImage imageNamed:@"img_search_history"]
|
||||
title:L(@"search_history_title")
|
||||
text:L(@"search_history_text")];
|
||||
}
|
||||
return _noResultsView;
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
#import "MWMSearchNoResults.h"
|
||||
|
||||
@interface MWMSearchTabbedCollectionViewCell : UICollectionViewCell
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UITableView * tableView;
|
||||
@property(weak, nonatomic) IBOutlet UITableView * tableView;
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UIView * noResultsView;
|
||||
@property (weak, nonatomic) IBOutlet UIImageView * noResultsImage;
|
||||
@property (weak, nonatomic) IBOutlet UILabel * noResultsTitle;
|
||||
@property (weak, nonatomic) IBOutlet UILabel * noResultsText;
|
||||
- (void)addNoResultsView:(MWMSearchNoResults *)view;
|
||||
- (void)removeNoResultsView;
|
||||
|
||||
@end
|
||||
|
|
|
@ -1,8 +1,11 @@
|
|||
#import "MWMSearchTabbedCollectionViewCell.h"
|
||||
#import "MWMKeyboard.h"
|
||||
|
||||
@interface MWMSearchTabbedCollectionViewCell ()
|
||||
@interface MWMSearchTabbedCollectionViewCell ()<MWMKeyboardObserver>
|
||||
|
||||
@property (weak, nonatomic) IBOutlet NSLayoutConstraint * titleTopOffset;
|
||||
@property(weak, nonatomic) IBOutlet NSLayoutConstraint * noResultsBottomOffset;
|
||||
@property(weak, nonatomic) IBOutlet UIView * noResultsContainer;
|
||||
@property(weak, nonatomic) IBOutlet UIView * noResultsWrapper;
|
||||
|
||||
@end
|
||||
|
||||
|
@ -13,15 +16,33 @@
|
|||
CALayer * sl = self.layer;
|
||||
sl.shouldRasterize = YES;
|
||||
sl.rasterizationScale = UIScreen.mainScreen.scale;
|
||||
[MWMKeyboard addObserver:self];
|
||||
}
|
||||
|
||||
- (void)layoutSubviews
|
||||
- (void)addNoResultsView:(MWMSearchNoResults *)view
|
||||
{
|
||||
CGFloat const textBottom = self.noResultsImage.height + self.noResultsTitle.height + self.noResultsText.height + 68.0;
|
||||
BOOL const compact = textBottom > self.height;
|
||||
self.titleTopOffset.constant = compact ? 20. : 196.;
|
||||
self.noResultsImage.hidden = compact;
|
||||
[super layoutSubviews];
|
||||
[self removeNoResultsView];
|
||||
self.noResultsContainer.hidden = NO;
|
||||
[self.noResultsWrapper addSubview:view];
|
||||
}
|
||||
|
||||
- (void)removeNoResultsView
|
||||
{
|
||||
self.noResultsContainer.hidden = YES;
|
||||
[self.noResultsWrapper.subviews makeObjectsPerformSelector:@selector(removeFromSuperview)];
|
||||
}
|
||||
|
||||
#pragma mark - MWMKeyboard
|
||||
|
||||
- (void)onKeyboardAnimation
|
||||
{
|
||||
CGFloat const keyboardHeight = [MWMKeyboard keyboardHeight];
|
||||
if (keyboardHeight >= self.height)
|
||||
return;
|
||||
|
||||
self.noResultsBottomOffset.constant = keyboardHeight;
|
||||
[self layoutIfNeeded];
|
||||
}
|
||||
|
||||
- (void)onKeyboardWillAnimate { [self layoutIfNeeded]; }
|
||||
@end
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
|
||||
<capability name="Aspect ratio constraints" minToolsVersion="5.1"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
|
@ -13,84 +14,51 @@
|
|||
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="460"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="bZi-Dr-fme">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="460"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="qnC-F0-3g1">
|
||||
<rect key="frame" x="0.0" y="70" width="320" height="320"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" secondItem="qnC-F0-3g1" secondAttribute="height" multiplier="1:1" priority="999" id="E3T-Nx-JJX"/>
|
||||
<constraint firstAttribute="width" constant="320" id="O0D-GD-xSK"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstItem="qnC-F0-3g1" firstAttribute="centerY" secondItem="bZi-Dr-fme" secondAttribute="centerY" id="8cS-Pg-hYZ"/>
|
||||
<constraint firstItem="qnC-F0-3g1" firstAttribute="height" relation="lessThanOrEqual" secondItem="bZi-Dr-fme" secondAttribute="height" id="u2A-om-Upm"/>
|
||||
<constraint firstItem="qnC-F0-3g1" firstAttribute="centerX" secondItem="bZi-Dr-fme" secondAttribute="centerX" id="zOu-k9-eSN"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" keyboardDismissMode="onDrag" style="plain" separatorStyle="none" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" translatesAutoresizingMaskIntoConstraints="NO" id="YiJ-rH-z7n">
|
||||
<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>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="bZi-Dr-fme">
|
||||
<rect key="frame" x="0.0" y="91" width="320" height="279"/>
|
||||
<subviews>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="4et-v9-C1K" userLabel="image">
|
||||
<rect key="frame" x="80" y="30" width="160" height="160"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="160" id="Elm-p4-rns"/>
|
||||
<constraint firstAttribute="width" constant="160" id="pph-sj-ip8"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" preferredMaxLayoutWidth="288" translatesAutoresizingMaskIntoConstraints="NO" id="qRp-Py-eMV" userLabel="title">
|
||||
<rect key="frame" x="16" y="196" width="288" height="24"/>
|
||||
<fontDescription key="fontDescription" name="HelveticaNeue" family="Helvetica Neue" pointSize="20"/>
|
||||
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.87" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="fontName" value="medium18"/>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="colorName" value="blackPrimaryText"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" preferredMaxLayoutWidth="288" translatesAutoresizingMaskIntoConstraints="NO" id="9f9-p6-shw" userLabel="text">
|
||||
<rect key="frame" x="16" y="232" width="288" height="17"/>
|
||||
<fontDescription key="fontDescription" name="HelveticaNeue" family="Helvetica Neue" pointSize="14"/>
|
||||
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.54000000000000004" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="fontName" value="regular14"/>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="colorName" value="blackSecondaryText"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstItem="4et-v9-C1K" firstAttribute="centerX" secondItem="qRp-Py-eMV" secondAttribute="centerX" id="A8Z-gH-n7A"/>
|
||||
<constraint firstItem="qRp-Py-eMV" firstAttribute="leading" secondItem="bZi-Dr-fme" secondAttribute="leading" constant="16" id="AO3-i4-W52"/>
|
||||
<constraint firstItem="9f9-p6-shw" firstAttribute="top" secondItem="qRp-Py-eMV" secondAttribute="bottom" constant="12" id="F9Z-Ot-Tkr"/>
|
||||
<constraint firstAttribute="trailing" secondItem="qRp-Py-eMV" secondAttribute="trailing" constant="16" id="OnQ-hw-8Qo"/>
|
||||
<constraint firstItem="4et-v9-C1K" firstAttribute="top" secondItem="bZi-Dr-fme" secondAttribute="top" constant="30" id="PG3-C8-s7d"/>
|
||||
<constraint firstItem="9f9-p6-shw" firstAttribute="leading" secondItem="bZi-Dr-fme" secondAttribute="leading" constant="16" id="QtL-o4-uh6"/>
|
||||
<constraint firstAttribute="bottom" secondItem="9f9-p6-shw" secondAttribute="bottom" constant="30" id="V26-lW-Es9"/>
|
||||
<constraint firstItem="9f9-p6-shw" firstAttribute="centerX" secondItem="qRp-Py-eMV" secondAttribute="centerX" id="auk-Vm-3Fi"/>
|
||||
<constraint firstItem="qRp-Py-eMV" firstAttribute="top" secondItem="bZi-Dr-fme" secondAttribute="top" constant="196" id="sBL-ds-ryp"/>
|
||||
<constraint firstAttribute="centerX" secondItem="4et-v9-C1K" secondAttribute="centerX" id="vMr-Wp-rze"/>
|
||||
<constraint firstAttribute="trailing" secondItem="9f9-p6-shw" secondAttribute="trailing" constant="16" id="wY3-ZC-5VD"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="backgroundColorName" value="white"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</view>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
</view>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstItem="bZi-Dr-fme" firstAttribute="centerX" secondItem="gTV-IL-0wX" secondAttribute="centerX" id="42P-nF-WN0"/>
|
||||
<constraint firstItem="YiJ-rH-z7n" firstAttribute="top" secondItem="gTV-IL-0wX" secondAttribute="top" id="45o-kh-87P"/>
|
||||
<constraint firstItem="bZi-Dr-fme" firstAttribute="centerY" secondItem="gTV-IL-0wX" secondAttribute="centerY" id="LTb-rP-ug4"/>
|
||||
<constraint firstItem="bZi-Dr-fme" firstAttribute="height" relation="lessThanOrEqual" secondItem="gTV-IL-0wX" secondAttribute="height" priority="750" id="WPe-En-tpb"/>
|
||||
<constraint firstAttribute="trailing" secondItem="YiJ-rH-z7n" secondAttribute="trailing" id="ak8-yj-yjX"/>
|
||||
<constraint firstAttribute="trailing" secondItem="bZi-Dr-fme" secondAttribute="trailing" id="eaC-cR-1Zf"/>
|
||||
<constraint firstAttribute="bottom" secondItem="YiJ-rH-z7n" secondAttribute="bottom" id="fWe-9o-p8Q"/>
|
||||
<constraint firstItem="bZi-Dr-fme" firstAttribute="leading" secondItem="gTV-IL-0wX" secondAttribute="leading" id="iAx-ah-Ee9"/>
|
||||
<constraint firstItem="bZi-Dr-fme" firstAttribute="top" secondItem="gTV-IL-0wX" secondAttribute="top" id="ojS-uf-R8h"/>
|
||||
<constraint firstAttribute="bottom" secondItem="bZi-Dr-fme" secondAttribute="bottom" id="qTD-KA-5qs"/>
|
||||
<constraint firstItem="YiJ-rH-z7n" firstAttribute="leading" secondItem="gTV-IL-0wX" secondAttribute="leading" id="tGS-fN-aa6"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="backgroundColorName" value="white"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
<connections>
|
||||
<outlet property="noResultsImage" destination="4et-v9-C1K" id="juR-eQ-mKo"/>
|
||||
<outlet property="noResultsText" destination="9f9-p6-shw" id="bMS-iT-D8w"/>
|
||||
<outlet property="noResultsTitle" destination="qRp-Py-eMV" id="3EX-Hl-xV7"/>
|
||||
<outlet property="noResultsView" destination="bZi-Dr-fme" id="U4e-0K-J3r"/>
|
||||
<outlet property="noResultsBottomOffset" destination="qTD-KA-5qs" id="0Rn-2l-l14"/>
|
||||
<outlet property="noResultsContainer" destination="bZi-Dr-fme" id="OuH-Ln-8YE"/>
|
||||
<outlet property="noResultsWrapper" destination="qnC-F0-3g1" id="6BX-hh-oBj"/>
|
||||
<outlet property="tableView" destination="YiJ-rH-z7n" id="vpg-ar-l9Q"/>
|
||||
<outlet property="titleTopOffset" destination="sBL-ds-ryp" id="AX1-li-yEV"/>
|
||||
</connections>
|
||||
</collectionViewCell>
|
||||
</objects>
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
#import "MWMSearchNoResults.h"
|
||||
|
||||
@interface MWMSearchTableView : UIView
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UITableView * tableView;
|
||||
@property(weak, nonatomic) IBOutlet UITableView * tableView;
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UIView * noResultsView;
|
||||
@property (weak, nonatomic) IBOutlet UIImageView * noResultsImage;
|
||||
@property (weak, nonatomic) IBOutlet UILabel * noResultsText;
|
||||
- (void)addNoResultsView:(MWMSearchNoResults *)view;
|
||||
- (void)removeNoResultsView;
|
||||
|
||||
@end
|
||||
|
|
|
@ -1,8 +1,12 @@
|
|||
#import "MWMSearchTableView.h"
|
||||
#import "MWMKeyboard.h"
|
||||
|
||||
@interface MWMSearchTableView ()
|
||||
@interface MWMSearchTableView ()<MWMKeyboardObserver>
|
||||
|
||||
@property (weak, nonatomic) IBOutlet NSLayoutConstraint * textTopOffset;
|
||||
@property(weak, nonatomic) IBOutlet NSLayoutConstraint * noResultsBottomOffset;
|
||||
|
||||
@property(weak, nonatomic) IBOutlet UIView * noResultsContainer;
|
||||
@property(weak, nonatomic) IBOutlet UIView * noResultsWrapper;
|
||||
|
||||
@end
|
||||
|
||||
|
@ -13,15 +17,34 @@
|
|||
CALayer * sl = self.layer;
|
||||
sl.shouldRasterize = YES;
|
||||
sl.rasterizationScale = UIScreen.mainScreen.scale;
|
||||
[MWMKeyboard addObserver:self];
|
||||
}
|
||||
|
||||
- (void)layoutSubviews
|
||||
- (void)addNoResultsView:(MWMSearchNoResults *)view
|
||||
{
|
||||
CGFloat const textBottom = self.noResultsImage.height + self.noResultsText.height + 68.0;
|
||||
BOOL const compact = textBottom > self.height;
|
||||
self.textTopOffset.constant = compact ? 20. : 160.;
|
||||
self.noResultsImage.hidden = compact;
|
||||
[super layoutSubviews];
|
||||
[self removeNoResultsView];
|
||||
self.noResultsContainer.hidden = NO;
|
||||
[self.noResultsWrapper addSubview:view];
|
||||
[self onKeyboardAnimation];
|
||||
}
|
||||
|
||||
- (void)removeNoResultsView
|
||||
{
|
||||
self.noResultsContainer.hidden = YES;
|
||||
[self.noResultsWrapper.subviews makeObjectsPerformSelector:@selector(removeFromSuperview)];
|
||||
}
|
||||
|
||||
#pragma mark - MWMKeyboard
|
||||
|
||||
- (void)onKeyboardAnimation
|
||||
{
|
||||
CGFloat const keyboardHeight = [MWMKeyboard keyboardHeight];
|
||||
if (keyboardHeight >= self.height)
|
||||
return;
|
||||
|
||||
self.noResultsBottomOffset.constant = keyboardHeight;
|
||||
[self layoutIfNeeded];
|
||||
}
|
||||
|
||||
- (void)onKeyboardWillAnimate { [self layoutIfNeeded]; }
|
||||
@end
|
||||
|
|
|
@ -36,6 +36,7 @@ NSString * identifierForType(MWMSearchTableCellType type)
|
|||
@property(weak, nonatomic) IBOutlet UITableView * tableView;
|
||||
|
||||
@property(nonatomic) MWMSearchCommonCell * commonSizingCell;
|
||||
@property(nonatomic) MWMSearchNoResults * noResultsView;
|
||||
|
||||
@property(weak, nonatomic) id<MWMSearchTableViewProtocol> delegate;
|
||||
|
||||
|
@ -235,15 +236,14 @@ NSString * identifierForType(MWMSearchTableCellType type)
|
|||
if ([MWMSearch resultsCount] == 0)
|
||||
{
|
||||
view.tableView.hidden = YES;
|
||||
view.noResultsView.hidden = NO;
|
||||
view.noResultsText.text = L(@"search_not_found_query");
|
||||
[view addNoResultsView:self.noResultsView];
|
||||
if ([MWMSearch isSearchOnMap])
|
||||
[[[ToastView alloc] initWithMessage:view.noResultsText.text] show];
|
||||
[[[ToastView alloc] initWithMessage:L(@"search_not_found_query")] show];
|
||||
}
|
||||
else
|
||||
{
|
||||
view.tableView.hidden = NO;
|
||||
view.noResultsView.hidden = YES;
|
||||
[view removeNoResultsView];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -265,4 +265,15 @@ 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
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
|
||||
<capability name="Aspect ratio constraints" minToolsVersion="5.1"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="MWMSearchTableViewController">
|
||||
|
@ -16,6 +17,25 @@
|
|||
<rect key="frame" x="0.0" y="0.0" width="320" height="460"/>
|
||||
<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"/>
|
||||
<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"/>
|
||||
<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"/>
|
||||
|
@ -28,52 +48,16 @@
|
|||
<outlet property="delegate" destination="-1" id="Syl-wX-U5b"/>
|
||||
</connections>
|
||||
</tableView>
|
||||
<view hidden="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="25T-i3-eR5">
|
||||
<rect key="frame" x="0.0" y="100" width="320" height="261"/>
|
||||
<subviews>
|
||||
<imageView userInteractionEnabled="NO" contentMode="center" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="img_search_not_found" translatesAutoresizingMaskIntoConstraints="NO" id="Xva-2d-ze3" userLabel="image">
|
||||
<rect key="frame" x="80" y="30" width="160" height="160"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="160" id="Ax8-Si-59Z"/>
|
||||
<constraint firstAttribute="width" constant="160" id="wCn-CD-Osv"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" preferredMaxLayoutWidth="288" translatesAutoresizingMaskIntoConstraints="NO" id="VlC-Yr-hSX" userLabel="text">
|
||||
<rect key="frame" x="16" y="214" width="288" height="17"/>
|
||||
<fontDescription key="fontDescription" name="HelveticaNeue" family="Helvetica Neue" pointSize="14"/>
|
||||
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.54000000000000004" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="fontName" value="regular14"/>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="colorName" value="blackSecondaryText"/>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="localizedText" value="search_not_found"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstItem="VlC-Yr-hSX" firstAttribute="leading" secondItem="25T-i3-eR5" secondAttribute="leading" constant="16" id="gVn-UQ-GWx"/>
|
||||
<constraint firstAttribute="centerX" secondItem="Xva-2d-ze3" secondAttribute="centerX" id="kIp-OL-QdQ"/>
|
||||
<constraint firstAttribute="trailing" secondItem="VlC-Yr-hSX" secondAttribute="trailing" constant="16" id="lhj-9H-dPK"/>
|
||||
<constraint firstAttribute="bottom" secondItem="VlC-Yr-hSX" secondAttribute="bottom" constant="30" id="mMJ-3T-Iw3"/>
|
||||
<constraint firstItem="VlC-Yr-hSX" firstAttribute="top" secondItem="Xva-2d-ze3" secondAttribute="bottom" constant="24" id="nfN-5p-03j"/>
|
||||
<constraint firstItem="Xva-2d-ze3" firstAttribute="top" secondItem="25T-i3-eR5" secondAttribute="top" constant="30" id="sK3-Ld-4Os"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="string" keyPath="backgroundColorName" value="white"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</view>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstItem="25T-i3-eR5" firstAttribute="centerY" secondItem="i5M-Pr-FkT" secondAttribute="centerY" id="5Tp-CI-W2N"/>
|
||||
<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 firstItem="25T-i3-eR5" firstAttribute="centerX" secondItem="i5M-Pr-FkT" secondAttribute="centerX" id="YNo-gL-UjA"/>
|
||||
<constraint firstItem="25T-i3-eR5" firstAttribute="height" relation="lessThanOrEqual" secondItem="i5M-Pr-FkT" secondAttribute="height" priority="750" id="Z2h-J3-85N"/>
|
||||
<constraint firstAttribute="trailing" secondItem="25T-i3-eR5" secondAttribute="trailing" id="fRl-2H-zOe"/>
|
||||
<constraint firstAttribute="bottom" secondItem="NsS-9j-1hr" secondAttribute="bottom" 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 firstItem="25T-i3-eR5" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="k08-wO-hIF"/>
|
||||
<constraint firstAttribute="bottom" secondItem="oZD-Er-6fn" secondAttribute="bottom" id="rgu-oY-7XC"/>
|
||||
</constraints>
|
||||
<nil key="simulatedStatusBarMetrics"/>
|
||||
|
@ -84,14 +68,11 @@
|
|||
<userDefinedRuntimeAttribute type="string" keyPath="backgroundColorName" value="white"/>
|
||||
</userDefinedRuntimeAttributes>
|
||||
<connections>
|
||||
<outlet property="noResultsImage" destination="Xva-2d-ze3" id="aNN-Mo-0W1"/>
|
||||
<outlet property="noResultsText" destination="VlC-Yr-hSX" id="Str-IK-gv7"/>
|
||||
<outlet property="noResultsView" destination="25T-i3-eR5" id="q1E-Rv-Plz"/>
|
||||
<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>
|
||||
<resources>
|
||||
<image name="img_search_not_found" width="240" height="240"/>
|
||||
</resources>
|
||||
</document>
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
#import "MWMCuisineEditorViewController.h"
|
||||
#import "MWMKeyboard.h"
|
||||
#import "MWMTableViewCell.h"
|
||||
#import "UIColor+MapsMeColor.h"
|
||||
|
||||
#include "indexer/search_string_utils.hpp"
|
||||
#include "indexer/cuisines.hpp"
|
||||
#include "indexer/search_string_utils.hpp"
|
||||
|
||||
#include "std/algorithm.hpp"
|
||||
|
||||
|
@ -18,9 +19,9 @@ vector<string> SliceKeys(vector<pair<string, string>> const & v)
|
|||
res.push_back(kv.first);
|
||||
return res;
|
||||
}
|
||||
} // namespace
|
||||
} // namespace
|
||||
|
||||
@interface MWMCuisineEditorViewController () <UISearchBarDelegate>
|
||||
@interface MWMCuisineEditorViewController ()<UISearchBarDelegate, MWMKeyboardObserver>
|
||||
{
|
||||
osm::TAllCuisines m_allCuisines;
|
||||
vector<string> m_selectedCuisines;
|
||||
|
@ -28,9 +29,9 @@ vector<string> SliceKeys(vector<pair<string, string>> const & v)
|
|||
vector<string> m_untranslatedKeys;
|
||||
}
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UITableView * tableView;
|
||||
@property (weak, nonatomic) IBOutlet UISearchBar * searchBar;
|
||||
@property (nonatomic) BOOL isSearch;
|
||||
@property(weak, nonatomic) IBOutlet UITableView * tableView;
|
||||
@property(weak, nonatomic) IBOutlet UISearchBar * searchBar;
|
||||
@property(nonatomic) BOOL isSearch;
|
||||
|
||||
@end
|
||||
|
||||
|
@ -43,51 +44,17 @@ vector<string> SliceKeys(vector<pair<string, string>> const & v)
|
|||
[self configSearchBar];
|
||||
[self configData];
|
||||
[self configTable];
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self
|
||||
selector:@selector(keyboardWillShow:)
|
||||
name:UIKeyboardWillShowNotification
|
||||
object:nil];
|
||||
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self
|
||||
selector:@selector(keyboardWillHide:)
|
||||
name:UIKeyboardWillHideNotification
|
||||
object:nil];
|
||||
[MWMKeyboard addObserver:self];
|
||||
}
|
||||
|
||||
- (void)dealloc
|
||||
- (UIStatusBarStyle)preferredStatusBarStyle { return UIStatusBarStyleLightContent; }
|
||||
#pragma mark - MWMKeyboard
|
||||
|
||||
- (void)onKeyboardAnimation
|
||||
{
|
||||
[[NSNotificationCenter defaultCenter] removeObserver:self];
|
||||
}
|
||||
|
||||
- (void)keyboardWillShow:(NSNotification *)notification
|
||||
{
|
||||
CGSize const keyboardSize = [notification.userInfo[UIKeyboardFrameBeginUserInfoKey] CGRectValue].size;
|
||||
CGFloat const bottomInset = UIInterfaceOrientationIsPortrait([[UIApplication sharedApplication] statusBarOrientation]) ?
|
||||
keyboardSize.height : keyboardSize.width;
|
||||
|
||||
UIEdgeInsets const contentInsets = {.bottom = bottomInset};
|
||||
|
||||
NSNumber * rate = notification.userInfo[UIKeyboardAnimationDurationUserInfoKey];
|
||||
[UIView animateWithDuration:rate.floatValue animations:^
|
||||
{
|
||||
self.tableView.contentInset = contentInsets;
|
||||
self.tableView.scrollIndicatorInsets = contentInsets;
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)keyboardWillHide:(NSNotification *)notification
|
||||
{
|
||||
NSNumber * rate = notification.userInfo[UIKeyboardAnimationDurationUserInfoKey];
|
||||
[UIView animateWithDuration:rate.floatValue animations:^
|
||||
{
|
||||
self.tableView.contentInset = {};
|
||||
self.tableView.scrollIndicatorInsets = {};
|
||||
}];
|
||||
}
|
||||
|
||||
- (UIStatusBarStyle)preferredStatusBarStyle
|
||||
{
|
||||
return UIStatusBarStyleLightContent;
|
||||
UIEdgeInsets const contentInsets = {.bottom = [MWMKeyboard keyboardHeight]};
|
||||
self.tableView.contentInset = contentInsets;
|
||||
self.tableView.scrollIndicatorInsets = contentInsets;
|
||||
}
|
||||
|
||||
#pragma mark - UISearchBarDelegate
|
||||
|
@ -138,16 +105,8 @@ vector<string> SliceKeys(vector<pair<string, string>> const & v)
|
|||
[self.tableView reloadData];
|
||||
}
|
||||
|
||||
- (void)searchBarSearchButtonClicked:(UISearchBar *)searchBar
|
||||
{
|
||||
[searchBar resignFirstResponder];
|
||||
}
|
||||
|
||||
- (UIBarPosition)positionForBar:(id<UIBarPositioning>)bar
|
||||
{
|
||||
return UIBarPositionTopAttached;
|
||||
}
|
||||
|
||||
- (void)searchBarSearchButtonClicked:(UISearchBar *)searchBar { [searchBar resignFirstResponder]; }
|
||||
- (UIBarPosition)positionForBar:(id<UIBarPositioning>)bar { return UIBarPositionTopAttached; }
|
||||
- (void)searchBar:(UISearchBar *)searchBar setActiveState:(BOOL)isActiveState
|
||||
{
|
||||
[searchBar setShowsCancelButton:isActiveState animated:YES];
|
||||
|
@ -198,16 +157,13 @@ vector<string> SliceKeys(vector<pair<string, string>> const & v)
|
|||
{
|
||||
self.tableView.backgroundColor = [UIColor pressBackground];
|
||||
self.tableView.separatorColor = [UIColor blackDividers];
|
||||
[self.tableView registerClass:[MWMTableViewCell class] forCellReuseIdentifier:[UITableViewCell className]];
|
||||
[self.tableView registerClass:[MWMTableViewCell class]
|
||||
forCellReuseIdentifier:[UITableViewCell className]];
|
||||
}
|
||||
|
||||
#pragma mark - Actions
|
||||
|
||||
- (void)onCancel
|
||||
{
|
||||
[self.navigationController popViewControllerAnimated:YES];
|
||||
}
|
||||
|
||||
- (void)onCancel { [self.navigationController popViewControllerAnimated:YES]; }
|
||||
- (void)onDone
|
||||
{
|
||||
[self.delegate setSelectedCuisines:m_selectedCuisines];
|
||||
|
@ -226,9 +182,11 @@ vector<string> SliceKeys(vector<pair<string, string>> const & v)
|
|||
|
||||
#pragma mark - UITableViewDataSource
|
||||
|
||||
- (UITableViewCell * _Nonnull)tableView:(UITableView * _Nonnull)tableView cellForRowAtIndexPath:(NSIndexPath * _Nonnull)indexPath
|
||||
- (UITableViewCell * _Nonnull)tableView:(UITableView * _Nonnull)tableView
|
||||
cellForRowAtIndexPath:(NSIndexPath * _Nonnull)indexPath
|
||||
{
|
||||
UITableViewCell * cell = [self.tableView dequeueReusableCellWithIdentifier:[UITableViewCell className]];
|
||||
UITableViewCell * cell =
|
||||
[self.tableView dequeueReusableCellWithIdentifier:[UITableViewCell className]];
|
||||
NSInteger const index = indexPath.row;
|
||||
|
||||
auto const & dataSource = [self dataSourceForSection:indexPath.section];
|
||||
|
@ -244,7 +202,8 @@ vector<string> SliceKeys(vector<pair<string, string>> const & v)
|
|||
cell.textLabel.text = @(key.c_str());
|
||||
}
|
||||
|
||||
BOOL const selected = find(m_selectedCuisines.begin(), m_selectedCuisines.end(), key) != m_selectedCuisines.end();
|
||||
BOOL const selected =
|
||||
find(m_selectedCuisines.begin(), m_selectedCuisines.end(), key) != m_selectedCuisines.end();
|
||||
cell.accessoryType = selected ? UITableViewCellAccessoryCheckmark : UITableViewCellAccessoryNone;
|
||||
return cell;
|
||||
}
|
||||
|
@ -269,13 +228,16 @@ vector<string> SliceKeys(vector<pair<string, string>> const & v)
|
|||
|
||||
#pragma mark - UITableViewDelegate
|
||||
|
||||
- (void)tableView:(UITableView * _Nonnull)tableView didSelectRowAtIndexPath:(NSIndexPath * _Nonnull)indexPath
|
||||
- (void)tableView:(UITableView * _Nonnull)tableView
|
||||
didSelectRowAtIndexPath:(NSIndexPath * _Nonnull)indexPath
|
||||
{
|
||||
UITableViewCell * cell = [tableView cellForRowAtIndexPath:indexPath];
|
||||
[cell setSelected:NO animated:YES];
|
||||
BOOL const isAlreadySelected = cell.accessoryType == UITableViewCellAccessoryCheckmark;
|
||||
cell.accessoryType = isAlreadySelected ? UITableViewCellAccessoryNone : UITableViewCellAccessoryCheckmark;
|
||||
[self change:[self dataSourceForSection:indexPath.section][indexPath.row] selected:!isAlreadySelected];
|
||||
cell.accessoryType =
|
||||
isAlreadySelected ? UITableViewCellAccessoryNone : UITableViewCellAccessoryCheckmark;
|
||||
[self change:[self dataSourceForSection:indexPath.section][indexPath.row]
|
||||
selected:!isAlreadySelected];
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#import "MWMObjectsCategorySelectorController.h"
|
||||
#import "MWMAuthorizationCommon.h"
|
||||
#import "MWMEditorViewController.h"
|
||||
#import "MWMObjectsCategorySelectorController.h"
|
||||
#import "MWMKeyboard.h"
|
||||
#import "MWMTableViewCell.h"
|
||||
#import "Statistics.h"
|
||||
#import "UIColor+MapsMeColor.h"
|
||||
|
@ -18,7 +19,6 @@ using namespace osm;
|
|||
|
||||
namespace
|
||||
{
|
||||
|
||||
NSString * const kToEditorSegue = @"CategorySelectorToEditorSegue";
|
||||
|
||||
string locale()
|
||||
|
@ -26,18 +26,19 @@ string locale()
|
|||
return locale_translator::bcp47ToTwineLanguage([NSLocale currentLocale].localeIdentifier);
|
||||
}
|
||||
|
||||
} // namespace
|
||||
} // namespace
|
||||
|
||||
@interface MWMObjectsCategorySelectorController () <UISearchBarDelegate, UITableViewDelegate, UITableViewDataSource>
|
||||
@interface MWMObjectsCategorySelectorController ()<UISearchBarDelegate, UITableViewDelegate,
|
||||
UITableViewDataSource, MWMKeyboardObserver>
|
||||
{
|
||||
NewFeatureCategories m_categories;
|
||||
NewFeatureCategories::TNames m_filteredCategories;
|
||||
}
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UITableView * tableView;
|
||||
@property (weak, nonatomic) IBOutlet UISearchBar * searchBar;
|
||||
@property (nonatomic) NSIndexPath * selectedIndexPath;
|
||||
@property (nonatomic) BOOL isSearch;
|
||||
@property(weak, nonatomic) IBOutlet UITableView * tableView;
|
||||
@property(weak, nonatomic) IBOutlet UISearchBar * searchBar;
|
||||
@property(nonatomic) NSIndexPath * selectedIndexPath;
|
||||
@property(nonatomic) BOOL isSearch;
|
||||
|
||||
@end
|
||||
|
||||
|
@ -61,66 +62,25 @@ string locale()
|
|||
[self configTable];
|
||||
[self configNavBar];
|
||||
[self configSearchBar];
|
||||
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self
|
||||
selector:@selector(keyboardWillShow:)
|
||||
name:UIKeyboardWillShowNotification
|
||||
object:nil];
|
||||
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self
|
||||
selector:@selector(keyboardWillHide:)
|
||||
name:UIKeyboardWillHideNotification
|
||||
object:nil];
|
||||
}
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
[[NSNotificationCenter defaultCenter] removeObserver:self];
|
||||
}
|
||||
|
||||
- (void)keyboardWillShow:(NSNotification *)notification
|
||||
{
|
||||
CGSize const keyboardSize = [notification.userInfo[UIKeyboardFrameBeginUserInfoKey] CGRectValue].size;
|
||||
CGFloat const bottomInset = UIInterfaceOrientationIsPortrait([[UIApplication sharedApplication] statusBarOrientation]) ?
|
||||
keyboardSize.height : keyboardSize.width;
|
||||
|
||||
UIEdgeInsets const contentInsets = {.bottom = bottomInset};
|
||||
|
||||
NSNumber * rate = notification.userInfo[UIKeyboardAnimationDurationUserInfoKey];
|
||||
[UIView animateWithDuration:rate.floatValue animations:^
|
||||
{
|
||||
self.tableView.contentInset = contentInsets;
|
||||
self.tableView.scrollIndicatorInsets = contentInsets;
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)keyboardWillHide:(NSNotification *)notification
|
||||
{
|
||||
NSNumber * rate = notification.userInfo[UIKeyboardAnimationDurationUserInfoKey];
|
||||
[UIView animateWithDuration:rate.floatValue animations:^
|
||||
{
|
||||
self.tableView.contentInset = {};
|
||||
self.tableView.scrollIndicatorInsets = {};
|
||||
}];
|
||||
[MWMKeyboard addObserver:self];
|
||||
}
|
||||
|
||||
- (void)configTable
|
||||
{
|
||||
self.tableView.backgroundColor = [UIColor pressBackground];
|
||||
self.tableView.separatorColor = [UIColor blackDividers];
|
||||
[self.tableView registerClass:[MWMTableViewCell class] forCellReuseIdentifier:[UITableViewCell className]];
|
||||
[self.tableView registerClass:[MWMTableViewCell class]
|
||||
forCellReuseIdentifier:[UITableViewCell className]];
|
||||
}
|
||||
|
||||
- (void)setSelectedCategory:(string const &)category
|
||||
{
|
||||
auto const & all = m_categories.GetAllCategoryNames(locale());
|
||||
auto const it = find_if(all.begin(), all.end(), [&category](NewFeatureCategories::TName const & name)
|
||||
{
|
||||
return name.first == category;
|
||||
});
|
||||
auto const it = find_if(
|
||||
all.begin(), all.end(),
|
||||
[&category](NewFeatureCategories::TName const & name) { return name.first == category; });
|
||||
NSAssert(it != all.end(), @"Incorrect category!");
|
||||
self.selectedIndexPath = [NSIndexPath indexPathForRow:(distance(all.begin(), it))
|
||||
inSection:0];
|
||||
self.selectedIndexPath = [NSIndexPath indexPathForRow:(distance(all.begin(), it)) inSection:0];
|
||||
}
|
||||
|
||||
- (void)backTap
|
||||
|
@ -133,16 +93,8 @@ string locale()
|
|||
[super backTap];
|
||||
}
|
||||
|
||||
- (UIStatusBarStyle)preferredStatusBarStyle
|
||||
{
|
||||
return UIStatusBarStyleLightContent;
|
||||
}
|
||||
|
||||
- (void)configNavBar
|
||||
{
|
||||
self.title = L(@"editor_add_select_category");
|
||||
}
|
||||
|
||||
- (UIStatusBarStyle)preferredStatusBarStyle { return UIStatusBarStyleLightContent; }
|
||||
- (void)configNavBar { self.title = L(@"editor_add_select_category"); }
|
||||
- (void)configSearchBar
|
||||
{
|
||||
self.searchBar.backgroundImage = [UIImage imageWithColor:[UIColor primary]];
|
||||
|
@ -166,17 +118,30 @@ string locale()
|
|||
NSAssert(false, @"incorrect segue");
|
||||
return;
|
||||
}
|
||||
MWMEditorViewController * dest = static_cast<MWMEditorViewController *>(segue.destinationViewController);
|
||||
MWMEditorViewController * dest =
|
||||
static_cast<MWMEditorViewController *>(segue.destinationViewController);
|
||||
dest.isCreating = YES;
|
||||
auto const object = self.createdObject;
|
||||
[dest setEditableMapObject:object];
|
||||
|
||||
using namespace osm_auth_ios;
|
||||
auto const & featureID = object.GetID();
|
||||
[Statistics logEvent:kStatEditorAddStart withParameters:@{kStatEditorIsAuthenticated : @(AuthorizationHaveCredentials()),
|
||||
kStatIsOnline : Platform::IsConnected() ? kStatYes : kStatNo,
|
||||
kStatEditorMWMName : @(featureID.GetMwmName().c_str()),
|
||||
kStatEditorMWMVersion : @(featureID.GetMwmVersion())}];
|
||||
[Statistics logEvent:kStatEditorAddStart
|
||||
withParameters:@{
|
||||
kStatEditorIsAuthenticated : @(AuthorizationHaveCredentials()),
|
||||
kStatIsOnline : Platform::IsConnected() ? kStatYes : kStatNo,
|
||||
kStatEditorMWMName : @(featureID.GetMwmName().c_str()),
|
||||
kStatEditorMWMVersion : @(featureID.GetMwmVersion())
|
||||
}];
|
||||
}
|
||||
|
||||
#pragma mark - MWMKeyboard
|
||||
|
||||
- (void)onKeyboardAnimation
|
||||
{
|
||||
UIEdgeInsets const contentInsets = {.bottom = [MWMKeyboard keyboardHeight]};
|
||||
self.tableView.contentInset = contentInsets;
|
||||
self.tableView.scrollIndicatorInsets = contentInsets;
|
||||
}
|
||||
|
||||
#pragma mark - Create object
|
||||
|
@ -186,17 +151,21 @@ string locale()
|
|||
auto const & ds = [self dataSourceForSection:self.selectedIndexPath.section];
|
||||
EditableMapObject emo;
|
||||
auto & f = GetFramework();
|
||||
if (!f.CreateMapObject(f.GetViewportCenter() ,ds[self.selectedIndexPath.row].second, emo))
|
||||
NSAssert(false, @"This call should never fail, because IsPointCoveredByDownloadedMaps is always called before!");
|
||||
if (!f.CreateMapObject(f.GetViewportCenter(), ds[self.selectedIndexPath.row].second, emo))
|
||||
NSAssert(false, @"This call should never fail, because IsPointCoveredByDownloadedMaps is "
|
||||
@"always called before!");
|
||||
return emo;
|
||||
}
|
||||
|
||||
#pragma mark - UITableView
|
||||
|
||||
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
- (UITableViewCell *)tableView:(UITableView *)tableView
|
||||
cellForRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
UITableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:[UITableViewCell className]];
|
||||
cell.textLabel.text = @([self dataSourceForSection:indexPath.section][indexPath.row].first.c_str());
|
||||
UITableViewCell * cell =
|
||||
[tableView dequeueReusableCellWithIdentifier:[UITableViewCell className]];
|
||||
cell.textLabel.text =
|
||||
@([self dataSourceForSection:indexPath.section][indexPath.row].first.c_str());
|
||||
if ([indexPath isEqual:self.selectedIndexPath])
|
||||
cell.accessoryType = UITableViewCellAccessoryCheckmark;
|
||||
else
|
||||
|
@ -230,10 +199,11 @@ string locale()
|
|||
if (self.isSearch)
|
||||
return nil;
|
||||
return L(@"editor_add_select_category_all_subtitle");
|
||||
// TODO(Vlad): Uncoment this line when we will be ready to show recent categories
|
||||
// if (m_categories.m_lastUsed.empty())
|
||||
// return L(@"editor_add_select_category_all_subtitle");
|
||||
// return section == 0 ? L(@"editor_add_select_category_popular_subtitle") : L(@"editor_add_select_category_all_subtitle");
|
||||
// TODO(Vlad): Uncoment this line when we will be ready to show recent categories
|
||||
// if (m_categories.m_lastUsed.empty())
|
||||
// return L(@"editor_add_select_category_all_subtitle");
|
||||
// return section == 0 ? L(@"editor_add_select_category_popular_subtitle") :
|
||||
// L(@"editor_add_select_category_all_subtitle");
|
||||
}
|
||||
|
||||
- (NewFeatureCategories::TNames const &)dataSourceForSection:(NSInteger)section
|
||||
|
@ -241,11 +211,11 @@ string locale()
|
|||
if (self.isSearch)
|
||||
return m_filteredCategories;
|
||||
return m_categories.GetAllCategoryNames(locale());
|
||||
// TODO(Vlad): Uncoment this line when we will be ready to show recent categories
|
||||
// if (m_categories.m_lastUsed.empty())
|
||||
// return m_categories.m_allSorted;
|
||||
// else
|
||||
// return section == 0 ? m_categories.m_lastUsed : m_categories.m_allSorted;
|
||||
// TODO(Vlad): Uncoment this line when we will be ready to show recent categories
|
||||
// if (m_categories.m_lastUsed.empty())
|
||||
// return m_categories.m_allSorted;
|
||||
// else
|
||||
// return section == 0 ? m_categories.m_lastUsed : m_categories.m_allSorted;
|
||||
}
|
||||
|
||||
#pragma mark - UISearchBarDelegate
|
||||
|
@ -261,7 +231,7 @@ string locale()
|
|||
}
|
||||
|
||||
self.isSearch = YES;
|
||||
string const query {[searchText lowercaseStringWithLocale:[NSLocale currentLocale]].UTF8String};
|
||||
string const query{[searchText lowercaseStringWithLocale:[NSLocale currentLocale]].UTF8String};
|
||||
m_filteredCategories = m_categories.Search(query, locale());
|
||||
[self.tableView reloadData];
|
||||
}
|
||||
|
@ -292,16 +262,8 @@ string locale()
|
|||
[self.tableView reloadData];
|
||||
}
|
||||
|
||||
- (void)searchBarSearchButtonClicked:(UISearchBar *)searchBar
|
||||
{
|
||||
[searchBar resignFirstResponder];
|
||||
}
|
||||
|
||||
- (UIBarPosition)positionForBar:(id<UIBarPositioning>)bar
|
||||
{
|
||||
return UIBarPositionTopAttached;
|
||||
}
|
||||
|
||||
- (void)searchBarSearchButtonClicked:(UISearchBar *)searchBar { [searchBar resignFirstResponder]; }
|
||||
- (UIBarPosition)positionForBar:(id<UIBarPositioning>)bar { return UIBarPositionTopAttached; }
|
||||
- (void)searchBar:(UISearchBar *)searchBar setActiveState:(BOOL)isActiveState
|
||||
{
|
||||
[searchBar setShowsCancelButton:isActiveState animated:YES];
|
||||
|
|
12
iphone/Maps/Classes/Keyboard/MWMKeyboard.h
Normal file
12
iphone/Maps/Classes/Keyboard/MWMKeyboard.h
Normal file
|
@ -0,0 +1,12 @@
|
|||
#import "MWMKeyboardObserver.h"
|
||||
|
||||
@interface MWMKeyboard : NSObject
|
||||
|
||||
+ (void)applicationDidBecomeActive;
|
||||
|
||||
+ (void)addObserver:(id<MWMKeyboardObserver>)observer;
|
||||
+ (void)removeObserver:(id<MWMKeyboardObserver>)observer;
|
||||
|
||||
+ (CGFloat)keyboardHeight;
|
||||
|
||||
@end
|
99
iphone/Maps/Classes/Keyboard/MWMKeyboard.mm
Normal file
99
iphone/Maps/Classes/Keyboard/MWMKeyboard.mm
Normal file
|
@ -0,0 +1,99 @@
|
|||
#import "MWMKeyboard.h"
|
||||
|
||||
namespace
|
||||
{
|
||||
using TObserver = id<MWMKeyboardObserver>;
|
||||
using TObservers = NSHashTable<__kindof TObserver>;
|
||||
} // namespace
|
||||
|
||||
@interface MWMKeyboard ()
|
||||
|
||||
@property(nonatomic) TObservers * observers;
|
||||
@property(nonatomic) CGFloat keyboardHeight;
|
||||
|
||||
@end
|
||||
|
||||
@implementation MWMKeyboard
|
||||
|
||||
+ (void)applicationDidBecomeActive { [MWMKeyboard manager]; }
|
||||
+ (MWMKeyboard *)manager
|
||||
{
|
||||
static MWMKeyboard * manager;
|
||||
static dispatch_once_t onceToken;
|
||||
dispatch_once(&onceToken, ^{
|
||||
manager = [[super alloc] initManager];
|
||||
});
|
||||
return manager;
|
||||
}
|
||||
|
||||
- (instancetype)initManager
|
||||
{
|
||||
self = [super init];
|
||||
if (self)
|
||||
{
|
||||
_observers = [TObservers weakObjectsHashTable];
|
||||
NSNotificationCenter * nc = [NSNotificationCenter defaultCenter];
|
||||
[nc addObserver:self
|
||||
selector:@selector(keyboardWillShow:)
|
||||
name:UIKeyboardWillShowNotification
|
||||
object:nil];
|
||||
|
||||
[nc addObserver:self
|
||||
selector:@selector(keyboardWillHide:)
|
||||
name:UIKeyboardWillHideNotification
|
||||
object:nil];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)dealloc { [[NSNotificationCenter defaultCenter] removeObserver:self]; }
|
||||
+ (CGFloat)keyboardHeight { return [MWMKeyboard manager].keyboardHeight; }
|
||||
#pragma mark - Add/Remove Observers
|
||||
|
||||
+ (void)addObserver:(id<MWMKeyboardObserver>)observer
|
||||
{
|
||||
[[MWMKeyboard manager].observers addObject:observer];
|
||||
}
|
||||
|
||||
+ (void)removeObserver:(id<MWMKeyboardObserver>)observer
|
||||
{
|
||||
[[MWMKeyboard manager].observers removeObject:observer];
|
||||
}
|
||||
|
||||
#pragma mark - Notifications
|
||||
|
||||
- (void)keyboardWillShow:(NSNotification *)notification
|
||||
{
|
||||
for (TObserver observer in self.observers)
|
||||
{
|
||||
if ([observer respondsToSelector:@selector(onKeyboardWillAnimate)])
|
||||
[observer onKeyboardWillAnimate];
|
||||
}
|
||||
CGSize const keyboardSize =
|
||||
[notification.userInfo[UIKeyboardFrameBeginUserInfoKey] CGRectValue].size;
|
||||
self.keyboardHeight = MIN(keyboardSize.height, keyboardSize.width);
|
||||
NSNumber * rate = notification.userInfo[UIKeyboardAnimationDurationUserInfoKey];
|
||||
[UIView animateWithDuration:rate.floatValue
|
||||
animations:^{
|
||||
for (TObserver observer in self.observers)
|
||||
[observer onKeyboardAnimation];
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)keyboardWillHide:(NSNotification *)notification
|
||||
{
|
||||
for (TObserver observer in self.observers)
|
||||
{
|
||||
if ([observer respondsToSelector:@selector(onKeyboardWillAnimate)])
|
||||
[observer onKeyboardWillAnimate];
|
||||
}
|
||||
self.keyboardHeight = 0;
|
||||
NSNumber * rate = notification.userInfo[UIKeyboardAnimationDurationUserInfoKey];
|
||||
[UIView animateWithDuration:rate.floatValue
|
||||
animations:^{
|
||||
for (TObserver observer in self.observers)
|
||||
[observer onKeyboardAnimation];
|
||||
}];
|
||||
}
|
||||
|
||||
@end
|
8
iphone/Maps/Classes/Keyboard/MWMKeyboardObserver.h
Normal file
8
iphone/Maps/Classes/Keyboard/MWMKeyboardObserver.h
Normal file
|
@ -0,0 +1,8 @@
|
|||
@protocol MWMKeyboardObserver<NSObject>
|
||||
|
||||
- (void)onKeyboardAnimation;
|
||||
|
||||
@optional
|
||||
- (void)onKeyboardWillAnimate;
|
||||
|
||||
@end
|
|
@ -1,21 +1,22 @@
|
|||
#import "MWMNoMapsView.h"
|
||||
#import "Common.h"
|
||||
#import "MWMKeyboard.h"
|
||||
|
||||
@interface MWMNoMapsView ()
|
||||
@interface MWMNoMapsView ()<MWMKeyboardObserver>
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UIImageView * image;
|
||||
@property (weak, nonatomic) IBOutlet UILabel * title;
|
||||
@property (weak, nonatomic) IBOutlet UILabel * text;
|
||||
@property(weak, nonatomic) IBOutlet UIImageView * image;
|
||||
@property(weak, nonatomic) IBOutlet UILabel * title;
|
||||
@property(weak, nonatomic) IBOutlet UILabel * text;
|
||||
|
||||
@property (weak, nonatomic) IBOutlet NSLayoutConstraint * containerWidth;
|
||||
@property (weak, nonatomic) IBOutlet NSLayoutConstraint * containerHeight;
|
||||
@property (weak, nonatomic) IBOutlet NSLayoutConstraint * containerTopOffset;
|
||||
@property (weak, nonatomic) IBOutlet NSLayoutConstraint * containerBottomOffset;
|
||||
@property (weak, nonatomic) IBOutlet NSLayoutConstraint * imageMinHeight;
|
||||
@property (weak, nonatomic) IBOutlet NSLayoutConstraint * imageHeight;
|
||||
@property (weak, nonatomic) IBOutlet NSLayoutConstraint * titleImageOffset;
|
||||
@property (weak, nonatomic) IBOutlet NSLayoutConstraint * titleTopOffset;
|
||||
@property (weak, nonatomic) IBOutlet NSLayoutConstraint * textTopOffset;
|
||||
@property(weak, nonatomic) IBOutlet NSLayoutConstraint * containerWidth;
|
||||
@property(weak, nonatomic) IBOutlet NSLayoutConstraint * containerHeight;
|
||||
@property(weak, nonatomic) IBOutlet NSLayoutConstraint * containerTopOffset;
|
||||
@property(weak, nonatomic) IBOutlet NSLayoutConstraint * containerBottomOffset;
|
||||
@property(weak, nonatomic) IBOutlet NSLayoutConstraint * imageMinHeight;
|
||||
@property(weak, nonatomic) IBOutlet NSLayoutConstraint * imageHeight;
|
||||
@property(weak, nonatomic) IBOutlet NSLayoutConstraint * titleImageOffset;
|
||||
@property(weak, nonatomic) IBOutlet NSLayoutConstraint * titleTopOffset;
|
||||
@property(weak, nonatomic) IBOutlet NSLayoutConstraint * textTopOffset;
|
||||
|
||||
@end
|
||||
|
||||
|
@ -44,45 +45,7 @@
|
|||
else
|
||||
self.containerTopOffset.active = NO;
|
||||
}
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self
|
||||
selector:@selector(keyboardWillShow:)
|
||||
name:UIKeyboardWillShowNotification
|
||||
object:nil];
|
||||
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self
|
||||
selector:@selector(keyboardWillHide:)
|
||||
name:UIKeyboardWillHideNotification
|
||||
object:nil];
|
||||
}
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
[[NSNotificationCenter defaultCenter] removeObserver:self];
|
||||
}
|
||||
|
||||
- (void)keyboardWillShow:(NSNotification *)notification
|
||||
{
|
||||
CGSize const keyboardSize = [notification.userInfo[UIKeyboardFrameBeginUserInfoKey] CGRectValue].size;
|
||||
CGFloat const bottomInset = MIN(keyboardSize.height, keyboardSize.width);
|
||||
|
||||
NSNumber * rate = notification.userInfo[UIKeyboardAnimationDurationUserInfoKey];
|
||||
[self.superview layoutIfNeeded];
|
||||
[UIView animateWithDuration:rate.floatValue animations:^
|
||||
{
|
||||
self.containerBottomOffset.constant = bottomInset;
|
||||
[self.superview layoutIfNeeded];
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)keyboardWillHide:(NSNotification *)notification
|
||||
{
|
||||
NSNumber * rate = notification.userInfo[UIKeyboardAnimationDurationUserInfoKey];
|
||||
[self.superview layoutIfNeeded];
|
||||
[UIView animateWithDuration:rate.floatValue animations:^
|
||||
{
|
||||
self.containerBottomOffset.constant = 0;
|
||||
[self.superview layoutIfNeeded];
|
||||
}];
|
||||
[MWMKeyboard addObserver:self];
|
||||
}
|
||||
|
||||
- (void)layoutSubviews
|
||||
|
@ -118,4 +81,13 @@
|
|||
}
|
||||
}
|
||||
|
||||
#pragma mark - MWMKeyboard
|
||||
|
||||
- (void)onKeyboardAnimation
|
||||
{
|
||||
self.containerBottomOffset.constant = [MWMKeyboard keyboardHeight];
|
||||
[self.superview layoutIfNeeded];
|
||||
}
|
||||
|
||||
- (void)onKeyboardWillAnimate { [self.superview layoutIfNeeded]; }
|
||||
@end
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
#import "MWMController.h"
|
||||
#import "MWMFrameworkListener.h"
|
||||
#import "MWMFrameworkObservers.h"
|
||||
#import "MWMKeyboard.h"
|
||||
#import "MWMLocationManager.h"
|
||||
#import "MWMMapViewControlsManager.h"
|
||||
#import "MWMRouter.h"
|
||||
|
@ -662,6 +663,7 @@ using namespace osm_auth_ios;
|
|||
[MWMLocationManager applicationDidBecomeActive];
|
||||
[MWMRouterSavedState restore];
|
||||
[MWMSearch addCategoriesToSpotlight];
|
||||
[MWMKeyboard applicationDidBecomeActive];
|
||||
}
|
||||
|
||||
- (BOOL)application:(UIApplication *)application
|
||||
|
|
|
@ -172,6 +172,12 @@
|
|||
347FDDA11BB59B4E00871410 /* Mapsme.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 347FDDA01BB59B4E00871410 /* Mapsme.storyboard */; };
|
||||
3485C0121B85C20E00F7712D /* MWMSearchTableViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3485C0101B85C20E00F7712D /* MWMSearchTableViewController.mm */; };
|
||||
3485C0131B85C20E00F7712D /* MWMSearchTableViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 3485C0111B85C20E00F7712D /* MWMSearchTableViewController.xib */; };
|
||||
348868EB1D8721650069BBA3 /* MWMSearchNoResults.mm in Sources */ = {isa = PBXBuildFile; fileRef = 348868EA1D8721650069BBA3 /* MWMSearchNoResults.mm */; };
|
||||
348868EC1D8721650069BBA3 /* MWMSearchNoResults.mm in Sources */ = {isa = PBXBuildFile; fileRef = 348868EA1D8721650069BBA3 /* MWMSearchNoResults.mm */; };
|
||||
348868EE1D8721800069BBA3 /* MWMSearchNoResults.xib in Resources */ = {isa = PBXBuildFile; fileRef = 348868ED1D8721800069BBA3 /* MWMSearchNoResults.xib */; };
|
||||
348868EF1D8721800069BBA3 /* MWMSearchNoResults.xib in Resources */ = {isa = PBXBuildFile; fileRef = 348868ED1D8721800069BBA3 /* MWMSearchNoResults.xib */; };
|
||||
348868F31D87DFB70069BBA3 /* MWMKeyboard.mm in Sources */ = {isa = PBXBuildFile; fileRef = 348868F21D87DFB70069BBA3 /* MWMKeyboard.mm */; };
|
||||
348868F41D87DFB70069BBA3 /* MWMKeyboard.mm in Sources */ = {isa = PBXBuildFile; fileRef = 348868F21D87DFB70069BBA3 /* MWMKeyboard.mm */; };
|
||||
348C26051D701B9F00813924 /* MWMHelpController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 348C26041D701B9F00813924 /* MWMHelpController.mm */; };
|
||||
348C26061D701B9F00813924 /* MWMHelpController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 348C26041D701B9F00813924 /* MWMHelpController.mm */; };
|
||||
3490D2DE1CE9DD2500D0B838 /* MWMSideButtons.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3490D2DA1CE9DD2500D0B838 /* MWMSideButtons.mm */; };
|
||||
|
@ -895,7 +901,7 @@
|
|||
340837141B72451A00B5C185 /* MWMShareActivityItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMShareActivityItem.h; sourceTree = "<group>"; };
|
||||
340837151B72451A00B5C185 /* MWMShareActivityItem.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMShareActivityItem.mm; sourceTree = "<group>"; };
|
||||
340C20E11C3E565600111D22 /* MWMCuisineEditorViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMCuisineEditorViewController.h; sourceTree = "<group>"; };
|
||||
340C20E21C3E565600111D22 /* MWMCuisineEditorViewController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMCuisineEditorViewController.mm; sourceTree = "<group>"; };
|
||||
340C20E21C3E565600111D22 /* MWMCuisineEditorViewController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; lineEnding = 0; path = MWMCuisineEditorViewController.mm; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
|
||||
340C20E51C3E58B000111D22 /* MWMEditorCommon.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MWMEditorCommon.h; sourceTree = "<group>"; };
|
||||
340DC82B1C4E72C700EAA2CC /* liboauthcpp.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = liboauthcpp.a; path = "../../../omim-xcode-build/Debug/liboauthcpp.a"; sourceTree = "<group>"; };
|
||||
340E105E1B944DAB00D975D5 /* MWMSearchHistoryManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMSearchHistoryManager.h; sourceTree = "<group>"; };
|
||||
|
@ -978,7 +984,7 @@
|
|||
343E8B331D07F84C0046AEEE /* Pushwoosh.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Pushwoosh.framework; path = PushNotifications/Pushwoosh.framework; sourceTree = "<group>"; };
|
||||
343E8B361D08004C0046AEEE /* libstdc++.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = "libstdc++.tbd"; path = "usr/lib/libstdc++.tbd"; sourceTree = SDKROOT; };
|
||||
343FAC481CBFBDFC00A45D3B /* MWMNoMapsView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMNoMapsView.h; sourceTree = "<group>"; };
|
||||
343FAC491CBFBDFC00A45D3B /* MWMNoMapsView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMNoMapsView.mm; sourceTree = "<group>"; };
|
||||
343FAC491CBFBDFC00A45D3B /* MWMNoMapsView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; lineEnding = 0; path = MWMNoMapsView.mm; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
|
||||
34479C751C60C6130065D261 /* Framework.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Framework.cpp; sourceTree = "<group>"; };
|
||||
34479C761C60C6130065D261 /* Framework.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Framework.h; sourceTree = "<group>"; };
|
||||
34479C771C60C6130065D261 /* MWMFrameworkListener.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMFrameworkListener.h; sourceTree = "<group>"; };
|
||||
|
@ -1056,6 +1062,12 @@
|
|||
3485C00F1B85C20E00F7712D /* MWMSearchTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMSearchTableViewController.h; sourceTree = "<group>"; };
|
||||
3485C0101B85C20E00F7712D /* MWMSearchTableViewController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; lineEnding = 0; path = MWMSearchTableViewController.mm; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
|
||||
3485C0111B85C20E00F7712D /* MWMSearchTableViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMSearchTableViewController.xib; sourceTree = "<group>"; };
|
||||
348868E91D8721650069BBA3 /* MWMSearchNoResults.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMSearchNoResults.h; sourceTree = "<group>"; };
|
||||
348868EA1D8721650069BBA3 /* MWMSearchNoResults.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMSearchNoResults.mm; sourceTree = "<group>"; };
|
||||
348868ED1D8721800069BBA3 /* MWMSearchNoResults.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMSearchNoResults.xib; sourceTree = "<group>"; };
|
||||
348868F11D87DFB70069BBA3 /* MWMKeyboard.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = MWMKeyboard.h; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
|
||||
348868F21D87DFB70069BBA3 /* MWMKeyboard.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; lineEnding = 0; path = MWMKeyboard.mm; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
|
||||
348868F51D87DFEE0069BBA3 /* MWMKeyboardObserver.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MWMKeyboardObserver.h; sourceTree = "<group>"; };
|
||||
348C26031D701B9F00813924 /* MWMHelpController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMHelpController.h; sourceTree = "<group>"; };
|
||||
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>"; };
|
||||
|
@ -1171,7 +1183,7 @@
|
|||
34CC4C071B81F3B500E44C1F /* MWMSearchTabbedViewController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMSearchTabbedViewController.mm; sourceTree = "<group>"; };
|
||||
34CC4C081B81F3B500E44C1F /* MWMSearchTabbedViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMSearchTabbedViewController.xib; sourceTree = "<group>"; };
|
||||
34CC4C0B1B82069C00E44C1F /* MWMSearchTabbedCollectionViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMSearchTabbedCollectionViewCell.h; sourceTree = "<group>"; };
|
||||
34CC4C0C1B82069C00E44C1F /* MWMSearchTabbedCollectionViewCell.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMSearchTabbedCollectionViewCell.mm; sourceTree = "<group>"; };
|
||||
34CC4C0C1B82069C00E44C1F /* MWMSearchTabbedCollectionViewCell.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; lineEnding = 0; path = MWMSearchTabbedCollectionViewCell.mm; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
|
||||
34CC4C0D1B82069C00E44C1F /* MWMSearchTabbedCollectionViewCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMSearchTabbedCollectionViewCell.xib; sourceTree = "<group>"; };
|
||||
34CC4C101B82120700E44C1F /* MWMSearchTabbedViewLayout.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMSearchTabbedViewLayout.h; sourceTree = "<group>"; };
|
||||
34CC4C111B82120700E44C1F /* MWMSearchTabbedViewLayout.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMSearchTabbedViewLayout.mm; sourceTree = "<group>"; };
|
||||
|
@ -1227,7 +1239,7 @@
|
|||
34F45E8D1B96E88100AC93F8 /* MWMSearchTabButtonsView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMSearchTabButtonsView.mm; sourceTree = "<group>"; };
|
||||
34F45E8F1B96E8B100AC93F8 /* MWMSearchTabButtonsView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMSearchTabButtonsView.xib; sourceTree = "<group>"; };
|
||||
34F8ADD71B97229A004184CC /* MWMSearchTableView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMSearchTableView.h; sourceTree = "<group>"; };
|
||||
34F8ADD81B97229A004184CC /* MWMSearchTableView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMSearchTableView.mm; sourceTree = "<group>"; };
|
||||
34F8ADD81B97229A004184CC /* MWMSearchTableView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; lineEnding = 0; path = MWMSearchTableView.mm; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
|
||||
34F9FB851C438ADB00F71201 /* MWMStreetEditorViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMStreetEditorViewController.h; sourceTree = "<group>"; };
|
||||
34F9FB861C438ADB00F71201 /* MWMStreetEditorViewController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMStreetEditorViewController.mm; sourceTree = "<group>"; };
|
||||
34F9FB8D1C43AF2400F71201 /* MWMStreetEditorEditTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMStreetEditorEditTableViewCell.h; sourceTree = "<group>"; };
|
||||
|
@ -1450,7 +1462,7 @@
|
|||
F653CE151C71F60200A453F1 /* MWMAddPlaceNavigationBar.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMAddPlaceNavigationBar.mm; sourceTree = "<group>"; };
|
||||
F653CE171C71F62400A453F1 /* MWMAddPlaceNavigationBar.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMAddPlaceNavigationBar.xib; sourceTree = "<group>"; };
|
||||
F653CE1A1C7361DA00A453F1 /* MWMObjectsCategorySelectorController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMObjectsCategorySelectorController.h; sourceTree = "<group>"; };
|
||||
F653CE1B1C7361DA00A453F1 /* MWMObjectsCategorySelectorController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMObjectsCategorySelectorController.mm; sourceTree = "<group>"; };
|
||||
F653CE1B1C7361DA00A453F1 /* MWMObjectsCategorySelectorController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; lineEnding = 0; path = MWMObjectsCategorySelectorController.mm; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
|
||||
F653D4211AE9398700282659 /* MWMPlacePageViewManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMPlacePageViewManager.h; sourceTree = "<group>"; };
|
||||
F653D4221AE9398700282659 /* MWMPlacePageViewManager.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; lineEnding = 0; path = MWMPlacePageViewManager.mm; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
|
||||
F6588E2A1B15C26700EE1E58 /* MWMTextView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMTextView.h; sourceTree = "<group>"; };
|
||||
|
@ -1558,7 +1570,7 @@
|
|||
F6FE2C131B04A44E009814AA /* MWMPlacePageEntity.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMPlacePageEntity.h; sourceTree = "<group>"; };
|
||||
F6FE2C141B04A44E009814AA /* MWMPlacePageEntity.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; lineEnding = 0; path = MWMPlacePageEntity.mm; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
|
||||
F6FE3C361CC50FFD00A73196 /* MWMPlaceDoesntExistAlert.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMPlaceDoesntExistAlert.h; sourceTree = "<group>"; };
|
||||
F6FE3C371CC50FFD00A73196 /* MWMPlaceDoesntExistAlert.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMPlaceDoesntExistAlert.mm; sourceTree = "<group>"; };
|
||||
F6FE3C371CC50FFD00A73196 /* MWMPlaceDoesntExistAlert.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; lineEnding = 0; path = MWMPlaceDoesntExistAlert.mm; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
|
||||
F6FE3C3A1CC5106500A73196 /* MWMPlaceDoesntExistAlert.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MWMPlaceDoesntExistAlert.xib; sourceTree = "<group>"; };
|
||||
F6FEA82B1C58E89B007223CC /* MWMButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MWMButton.h; sourceTree = "<group>"; };
|
||||
F6FEA82C1C58E89B007223CC /* MWMButton.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MWMButton.mm; sourceTree = "<group>"; };
|
||||
|
@ -1736,6 +1748,7 @@
|
|||
080E96DDFE201D6D7F000001 /* Classes */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
348868F01D87DF8C0069BBA3 /* Keyboard */,
|
||||
3436FE7F1D366CA0005CD87B /* Search */,
|
||||
344D77B11D1BD79700DBED70 /* Location */,
|
||||
34002A651D2F9C8100AC201E /* Routing */,
|
||||
|
@ -2138,6 +2151,16 @@
|
|||
path = Cells;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
348868F01D87DF8C0069BBA3 /* Keyboard */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
348868F11D87DFB70069BBA3 /* MWMKeyboard.h */,
|
||||
348868F21D87DFB70069BBA3 /* MWMKeyboard.mm */,
|
||||
348868F51D87DFEE0069BBA3 /* MWMKeyboardObserver.h */,
|
||||
);
|
||||
path = Keyboard;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
3497A9321B5CF8A900F51E55 /* NavigationDashboard */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
|
@ -2393,6 +2416,9 @@
|
|||
3438CDFB1B862F5C0051AA78 /* MWMSearchContentView.mm */,
|
||||
34B82AB01B8344E300180497 /* MWMSearchTextField.h */,
|
||||
34B82AB11B8344E300180497 /* MWMSearchTextField.mm */,
|
||||
348868E91D8721650069BBA3 /* MWMSearchNoResults.h */,
|
||||
348868EA1D8721650069BBA3 /* MWMSearchNoResults.mm */,
|
||||
348868ED1D8721800069BBA3 /* MWMSearchNoResults.xib */,
|
||||
);
|
||||
path = Search;
|
||||
sourceTree = "<group>";
|
||||
|
@ -3350,6 +3376,7 @@
|
|||
34B6CF5D1BBBFC6B009203C6 /* LaunchScreen.storyboard in Resources */,
|
||||
3476B8DC1BFDD30B00874594 /* tts-how-to-set-up-voice.html in Resources */,
|
||||
978D4A31199A11E600D72CA7 /* faq.html in Resources */,
|
||||
348868EE1D8721800069BBA3 /* MWMSearchNoResults.xib in Resources */,
|
||||
3491E7CD1C06F1F10042FE24 /* MWMPlacePageButtonCell.xib in Resources */,
|
||||
F66A8FB21B0A0954001B9C97 /* PlacePageView.xib in Resources */,
|
||||
F6BED3771CE3726A008D31E7 /* MWMBookmarkTitleCell.xib in Resources */,
|
||||
|
@ -3514,6 +3541,7 @@
|
|||
6741A9701BF340DE002C974C /* MWMiPadRoutePreview.xib in Resources */,
|
||||
6741A9711BF340DE002C974C /* copyright.html in Resources */,
|
||||
6741A9721BF340DE002C974C /* MWMSearchCommonCell.xib in Resources */,
|
||||
348868EF1D8721800069BBA3 /* MWMSearchNoResults.xib in Resources */,
|
||||
6741A9731BF340DE002C974C /* MWMSearchHistoryMyPositionCell.xib in Resources */,
|
||||
349C3AF01D33A96B002AC7A9 /* MWMNavigationInfoView.xib in Resources */,
|
||||
6741A9741BF340DE002C974C /* resources-6plus_dark in Resources */,
|
||||
|
@ -3780,6 +3808,7 @@
|
|||
34CD81D01C92A884007D2A60 /* MWMPageControllerDataSource.mm in Sources */,
|
||||
34ABA6201C2D517500FE1BEC /* MWMInputValidator.mm in Sources */,
|
||||
F639883B1CF70FE500226B6B /* MWMActionBarButton.mm in Sources */,
|
||||
348868F31D87DFB70069BBA3 /* MWMKeyboard.mm in Sources */,
|
||||
978F9242183B660F000D6C7C /* SelectableCell.mm in Sources */,
|
||||
34ABA6241C2D551900FE1BEC /* MWMInputValidatorFactory.mm in Sources */,
|
||||
34B82AE21B84AC5E00180497 /* MWMSearchCategoriesManager.mm in Sources */,
|
||||
|
@ -3799,6 +3828,7 @@
|
|||
F64F4B6D1B46A51F0081A24A /* MWMDownloaderDialogCell.mm in Sources */,
|
||||
3491E7CB1C06F1F10042FE24 /* MWMPlacePageButtonCell.mm in Sources */,
|
||||
348C26051D701B9F00813924 /* MWMHelpController.mm in Sources */,
|
||||
348868EB1D8721650069BBA3 /* MWMSearchNoResults.mm in Sources */,
|
||||
341F99D91C6B1165001C67B8 /* MWMMapDownloaderPlaceTableViewCell.mm in Sources */,
|
||||
345FD7E71CEC7D8400F58045 /* MWMEditorAdditionalNamesHeader.mm in Sources */,
|
||||
341F99D51C6B1165001C67B8 /* MWMMapDownloaderLargeCountryTableViewCell.mm in Sources */,
|
||||
|
@ -4009,6 +4039,7 @@
|
|||
34CD81D11C92A884007D2A60 /* MWMPageControllerDataSource.mm in Sources */,
|
||||
6741AA131BF340DE002C974C /* UIColor+MapsMeColor.mm in Sources */,
|
||||
34ABA6251C2D551900FE1BEC /* MWMInputValidatorFactory.mm in Sources */,
|
||||
348868F41D87DFB70069BBA3 /* MWMKeyboard.mm in Sources */,
|
||||
F639883C1CF70FE500226B6B /* MWMActionBarButton.mm in Sources */,
|
||||
34CE8A681C7740E100F4351A /* MWMStorage.mm in Sources */,
|
||||
6741AA141BF340DE002C974C /* MWMMultilineLabel.mm in Sources */,
|
||||
|
@ -4028,6 +4059,7 @@
|
|||
341F99DA1C6B1165001C67B8 /* MWMMapDownloaderPlaceTableViewCell.mm in Sources */,
|
||||
341F99D61C6B1165001C67B8 /* MWMMapDownloaderLargeCountryTableViewCell.mm in Sources */,
|
||||
348C26061D701B9F00813924 /* MWMHelpController.mm in Sources */,
|
||||
348868EC1D8721650069BBA3 /* MWMSearchNoResults.mm in Sources */,
|
||||
6741AA1E1BF340DE002C974C /* LinkCell.mm in Sources */,
|
||||
345FD7E81CEC7D8400F58045 /* MWMEditorAdditionalNamesHeader.mm in Sources */,
|
||||
347FD8701C60B2CE002FB65E /* MWMOpeningHoursAllDayTableViewCell.mm in Sources */,
|
||||
|
|
Loading…
Add table
Reference in a new issue