forked from organicmaps/organicmaps-tmp
[ios] Fixed search layout for ios 7.
This commit is contained in:
parent
4d4327df75
commit
970d617f4b
5 changed files with 57 additions and 0 deletions
|
@ -1,4 +1,5 @@
|
|||
#import "BookmarksVC.h"
|
||||
#import "Common.h"
|
||||
#import "MWMSearchBookmarksCell.h"
|
||||
#import "UIColor+MapsMeColor.h"
|
||||
#import "UIFont+MapsMeFonts.h"
|
||||
|
@ -43,6 +44,17 @@
|
|||
self.titleLabel.text = @(cat->GetName().c_str());
|
||||
}
|
||||
|
||||
- (void)layoutSubviews
|
||||
{
|
||||
[super layoutSubviews];
|
||||
if (isIOS7)
|
||||
{
|
||||
self.titleLabel.preferredMaxLayoutWidth = floor(self.titleLabel.width);
|
||||
self.countLabel.preferredMaxLayoutWidth = floor(self.countLabel.width);
|
||||
[super layoutSubviews];
|
||||
}
|
||||
}
|
||||
|
||||
- (IBAction)toggleVisibility
|
||||
{
|
||||
self.isVisible = !self.isVisible;
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#import "Common.h"
|
||||
#import "Macros.h"
|
||||
#import "MWMSearchCategoryCell.h"
|
||||
#import "UIColor+MapsMeColor.h"
|
||||
|
@ -22,6 +23,16 @@
|
|||
sl.rasterizationScale = UIScreen.mainScreen.scale;
|
||||
}
|
||||
|
||||
- (void)layoutSubviews
|
||||
{
|
||||
[super layoutSubviews];
|
||||
if (isIOS7)
|
||||
{
|
||||
self.label.preferredMaxLayoutWidth = floor(self.label.width);
|
||||
[super layoutSubviews];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)setCategory:(NSString *)category
|
||||
{
|
||||
self.label.text = L(category);
|
||||
|
|
|
@ -29,6 +29,16 @@
|
|||
[self layoutIfNeeded];
|
||||
}
|
||||
|
||||
- (void)layoutSubviews
|
||||
{
|
||||
[super layoutSubviews];
|
||||
if (isIOS7)
|
||||
{
|
||||
self.title.preferredMaxLayoutWidth = floor(self.title.width);
|
||||
[super layoutSubviews];
|
||||
}
|
||||
}
|
||||
|
||||
+ (CGFloat)defaultCellHeight
|
||||
{
|
||||
return 44.0;
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#import "Common.h"
|
||||
#import "MWMSearchCell.h"
|
||||
#import "Statistics.h"
|
||||
#import "UIColor+MapsMeColor.h"
|
||||
|
@ -66,6 +67,16 @@
|
|||
[self.titleLabel sizeToFit];
|
||||
}
|
||||
|
||||
- (void)layoutSubviews
|
||||
{
|
||||
[super layoutSubviews];
|
||||
if (isIOS7)
|
||||
{
|
||||
self.titleLabel.preferredMaxLayoutWidth = floor(self.titleLabel.width);
|
||||
[super layoutSubviews];
|
||||
}
|
||||
}
|
||||
|
||||
- (NSDictionary *)selectedTitleAttributes
|
||||
{
|
||||
return nil;
|
||||
|
|
|
@ -72,6 +72,19 @@
|
|||
[self layoutIfNeeded];
|
||||
}
|
||||
|
||||
- (void)layoutSubviews
|
||||
{
|
||||
[super layoutSubviews];
|
||||
if (isIOS7)
|
||||
{
|
||||
self.typeLabel.preferredMaxLayoutWidth = floor(self.typeLabel.width);
|
||||
self.infoLabel.preferredMaxLayoutWidth = floor(self.infoLabel.width);
|
||||
self.locationLabel.preferredMaxLayoutWidth = floor(self.locationLabel.width);
|
||||
self.distanceLabel.preferredMaxLayoutWidth = floor(self.distanceLabel.width);
|
||||
[super layoutSubviews];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)setInfoText:(NSString *)infoText
|
||||
{
|
||||
self.infoView.hidden = NO;
|
||||
|
|
Loading…
Add table
Reference in a new issue