diff --git a/iphone/Maps/Classes/CustomViews/MapViewControls/Search/MWMSearchChangeModeView.mm b/iphone/Maps/Classes/CustomViews/MapViewControls/Search/MWMSearchChangeModeView.mm index 3059457e89..19943dc6f2 100644 --- a/iphone/Maps/Classes/CustomViews/MapViewControls/Search/MWMSearchChangeModeView.mm +++ b/iphone/Maps/Classes/CustomViews/MapViewControls/Search/MWMSearchChangeModeView.mm @@ -27,6 +27,8 @@ extern NSString * const kSearchStateKey; name:kSearchStateWillChangeNotification object:nil]; [MWMSearch addObserver:self]; + self.changeModeButton.titleLabel.textAlignment = NSTextAlignmentNatural; + self.filterButton.titleLabel.textAlignment = NSTextAlignmentNatural; self.filterButtoniPadX.priority = IPAD ? UILayoutPriorityDefaultHigh : UILayoutPriorityDefaultLow; } diff --git a/iphone/Maps/Classes/CustomViews/MapViewControls/Search/TableView/MWMSearchCommonCell.h b/iphone/Maps/Classes/CustomViews/MapViewControls/Search/TableView/MWMSearchCommonCell.h index 36a3fb69c6..41319c0f25 100644 --- a/iphone/Maps/Classes/CustomViews/MapViewControls/Search/TableView/MWMSearchCommonCell.h +++ b/iphone/Maps/Classes/CustomViews/MapViewControls/Search/TableView/MWMSearchCommonCell.h @@ -4,9 +4,6 @@ @interface MWMSearchCommonCell : MWMSearchCell -+ (CGFloat)defaultCellHeight; -- (CGFloat)cellHeight; - -- (void)config:(search::Result const &)result forHeight:(BOOL)forHeight; +- (void)config:(search::Result const &)result; @end diff --git a/iphone/Maps/Classes/CustomViews/MapViewControls/Search/TableView/MWMSearchCommonCell.mm b/iphone/Maps/Classes/CustomViews/MapViewControls/Search/TableView/MWMSearchCommonCell.mm index 86fe0bf081..673432488c 100644 --- a/iphone/Maps/Classes/CustomViews/MapViewControls/Search/TableView/MWMSearchCommonCell.mm +++ b/iphone/Maps/Classes/CustomViews/MapViewControls/Search/TableView/MWMSearchCommonCell.mm @@ -28,7 +28,7 @@ @implementation MWMSearchCommonCell -- (void)config:(search::Result const &)result forHeight:(BOOL)forHeight +- (void)config:(search::Result const &)result { [super config:result]; self.typeLabel.text = @(result.GetFeatureType().c_str()).capitalizedString; @@ -40,19 +40,17 @@ self.locationLabel.text = @(result.GetAddress().c_str()); [self.locationLabel sizeToFit]; - if (!forHeight) - { - NSUInteger const starsCount = result.GetStarsCount(); - NSString * cuisine = @(result.GetCuisine().c_str()); - if (starsCount > 0) - [self setInfoRating:starsCount]; - else if (cuisine.length > 0) - [self setInfoText:cuisine.capitalizedString]; - else - [self clearInfo]; + NSUInteger const starsCount = result.GetStarsCount(); + NSString * cuisine = @(result.GetCuisine().c_str()); + if (starsCount > 0) + [self setInfoRating:starsCount]; + else if (cuisine.length > 0) + [self setInfoText:cuisine.capitalizedString]; + else + [self clearInfo]; - switch (result.IsOpenNow()) - { + switch (result.IsOpenNow()) + { case osm::Unknown: // TODO: Correctly handle Open Now = YES value (show "OPEN" mark). case osm::Yes: self.closedView.hidden = YES; break; @@ -70,7 +68,6 @@ measurement_utils::FormatDistance(dist, distanceStr); } self.distanceLabel.text = @(distanceStr.c_str()); - } } } @@ -110,10 +107,4 @@ }; } -+ (CGFloat)defaultCellHeight { return 80.0; } -- (CGFloat)cellHeight -{ - return ceil([self.contentView systemLayoutSizeFittingSize:UILayoutFittingCompressedSize].height); -} - @end diff --git a/iphone/Maps/Classes/CustomViews/MapViewControls/Search/TableView/MWMSearchCommonCell.xib b/iphone/Maps/Classes/CustomViews/MapViewControls/Search/TableView/MWMSearchCommonCell.xib index a9c2ddf6e8..1644d9ab28 100644 --- a/iphone/Maps/Classes/CustomViews/MapViewControls/Search/TableView/MWMSearchCommonCell.xib +++ b/iphone/Maps/Classes/CustomViews/MapViewControls/Search/TableView/MWMSearchCommonCell.xib @@ -1,21 +1,25 @@ - + + + + - + - + - + -