From 42f643fcadeea288474c7d91bf9542ef0d91effa Mon Sep 17 00:00:00 2001 From: Igor Khmurets Date: Tue, 25 Mar 2014 13:08:05 +0300 Subject: [PATCH] [ios] Increased result title height in search --- iphone/Maps/Classes/MapViewController.mm | 3 ++- iphone/Maps/Classes/SearchUniversalCell.m | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/iphone/Maps/Classes/MapViewController.mm b/iphone/Maps/Classes/MapViewController.mm index 74a13bc509..a8f068867d 100644 --- a/iphone/Maps/Classes/MapViewController.mm +++ b/iphone/Maps/Classes/MapViewController.mm @@ -1003,7 +1003,8 @@ const long long LITE_IDL = 431183278L; CGFloat const x = self.view.width / 2; CGFloat const y = self.placePageView.minY - 20; CGPoint const pinPoint = [(EAGLView *)self.view globalPoint2ViewPoint:CGPointMake(self.placePageView.pinPoint.x, self.placePageView.pinPoint.y)]; - if (pinPoint.y > y) { + if (pinPoint.y > y) + { CGPoint const deadAreaPoint = [(EAGLView *)self.view viewPoint2GlobalPoint:CGPointMake(x, y)]; m2::PointD const newPoint = m2::PointD(self.placePageView.pinPoint.x, deadAreaPoint.y); m2::PointD const offset = self.placePageView.pinPoint - newPoint; diff --git a/iphone/Maps/Classes/SearchUniversalCell.m b/iphone/Maps/Classes/SearchUniversalCell.m index b5b8d52413..80bd1b13aa 100644 --- a/iphone/Maps/Classes/SearchUniversalCell.m +++ b/iphone/Maps/Classes/SearchUniversalCell.m @@ -26,7 +26,7 @@ #define DISTANCE_FONT [UIFont fontWithName:@"HelveticaNeue" size:15] #define TITLE_FONT [UIFont fontWithName:@"HelveticaNeue-Light" size:15] #define TITLE_WIDTH_REST 70 -#define TITLE_HEIGHT 60 +#define MAX_TITLE_HEIGHT 200 - (void)layoutSubviews { @@ -49,7 +49,7 @@ + (CGFloat)cellHeightWithTitle:(NSString *)title subtitle:(NSString *)subtitle distance:(NSString *)distance viewWidth:(CGFloat)width { CGFloat distanceWidth = [distance sizeWithDrawSize:CGSizeMake(100, 20) font:DISTANCE_FONT].width; - CGFloat titleHeight = [title sizeWithDrawSize:CGSizeMake(width - distanceWidth - TITLE_WIDTH_REST, TITLE_HEIGHT) font:TITLE_FONT].height; + CGFloat titleHeight = [title sizeWithDrawSize:CGSizeMake(width - distanceWidth - TITLE_WIDTH_REST, MAX_TITLE_HEIGHT) font:TITLE_FONT].height; return MAX(44, titleHeight + ([subtitle length] ? 27 : 15)); } @@ -84,7 +84,7 @@ { if (!_titleLabel) { - _titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 0, TITLE_HEIGHT)]; + _titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 0, MAX_TITLE_HEIGHT)]; _titleLabel.backgroundColor = [UIColor clearColor]; _titleLabel.font = TITLE_FONT; _titleLabel.textColor = [UIColor blackColor];