forked from organicmaps/organicmaps-tmp
Clang-format.
This commit is contained in:
parent
b6b0dcf160
commit
af4efa5bc1
1 changed files with 21 additions and 32 deletions
|
@ -1,7 +1,7 @@
|
|||
#import "Common.h"
|
||||
#import "MapsAppDelegate.h"
|
||||
#import "MWMLocationManager.h"
|
||||
#import "MWMSearchCommonCell.h"
|
||||
#import "MapsAppDelegate.h"
|
||||
#import "UIColor+MapsMeColor.h"
|
||||
#import "UIFont+MapsMeFonts.h"
|
||||
|
||||
|
@ -12,17 +12,17 @@
|
|||
|
||||
@interface MWMSearchCommonCell ()
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UILabel * typeLabel;
|
||||
@property (weak, nonatomic) IBOutlet UIView * infoView;
|
||||
@property (weak, nonatomic) IBOutlet UILabel * infoLabel;
|
||||
@property (weak, nonatomic) IBOutlet UIView * infoRatingView;
|
||||
@property (nonatomic) IBOutletCollection(UIImageView) NSArray * infoRatingStars;
|
||||
@property (weak, nonatomic) IBOutlet UILabel * locationLabel;
|
||||
@property (weak, nonatomic) IBOutlet UILabel * distanceLabel;
|
||||
@property(weak, nonatomic) IBOutlet UILabel * typeLabel;
|
||||
@property(weak, nonatomic) IBOutlet UIView * infoView;
|
||||
@property(weak, nonatomic) IBOutlet UILabel * infoLabel;
|
||||
@property(weak, nonatomic) IBOutlet UIView * infoRatingView;
|
||||
@property(nonatomic) IBOutletCollection(UIImageView) NSArray * infoRatingStars;
|
||||
@property(weak, nonatomic) IBOutlet UILabel * locationLabel;
|
||||
@property(weak, nonatomic) IBOutlet UILabel * distanceLabel;
|
||||
@property(weak, nonatomic) IBOutlet UILabel * ratingLabel;
|
||||
@property(weak, nonatomic) IBOutlet UILabel * priceLabel;
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UIView * closedView;
|
||||
@property(weak, nonatomic) IBOutlet UIView * closedView;
|
||||
|
||||
@end
|
||||
|
||||
|
@ -48,14 +48,10 @@
|
|||
|
||||
switch (result.IsOpenNow())
|
||||
{
|
||||
case osm::Unknown:
|
||||
// TODO: Correctly handle Open Now = YES value (show "OPEN" mark).
|
||||
case osm::Yes:
|
||||
self.closedView.hidden = YES;
|
||||
break;
|
||||
case osm::No:
|
||||
self.closedView.hidden = NO;
|
||||
break;
|
||||
case osm::Unknown:
|
||||
// TODO: Correctly handle Open Now = YES value (show "OPEN" mark).
|
||||
case osm::Yes: self.closedView.hidden = YES; break;
|
||||
case osm::No: self.closedView.hidden = NO; break;
|
||||
}
|
||||
|
||||
auto const & ratingStr = result.GetHotelRating();
|
||||
|
@ -69,7 +65,8 @@
|
|||
CLLocation * lastLocation = [MWMLocationManager lastLocation];
|
||||
if (lastLocation)
|
||||
{
|
||||
double const dist = MercatorBounds::DistanceOnEarth(lastLocation.mercator, result.GetFeatureCenter());
|
||||
double const dist =
|
||||
MercatorBounds::DistanceOnEarth(lastLocation.mercator, result.GetFeatureCenter());
|
||||
measurement_utils::FormatDistance(dist, distanceStr);
|
||||
}
|
||||
self.distanceLabel.text = @(distanceStr.c_str());
|
||||
|
@ -105,17 +102,13 @@
|
|||
self.infoView.hidden = NO;
|
||||
self.infoRatingView.hidden = NO;
|
||||
self.infoLabel.hidden = YES;
|
||||
[self.infoRatingStars enumerateObjectsUsingBlock:^(UIImageView * star, NSUInteger idx, BOOL *stop)
|
||||
{
|
||||
star.highlighted = star.tag <= infoRating;
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)clearInfo
|
||||
{
|
||||
self.infoView.hidden = YES;
|
||||
[self.infoRatingStars
|
||||
enumerateObjectsUsingBlock:^(UIImageView * star, NSUInteger idx, BOOL * stop) {
|
||||
star.highlighted = star.tag <= infoRating;
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)clearInfo { self.infoView.hidden = YES; }
|
||||
- (NSDictionary *)selectedTitleAttributes
|
||||
{
|
||||
return @{
|
||||
|
@ -132,11 +125,7 @@
|
|||
};
|
||||
}
|
||||
|
||||
+ (CGFloat)defaultCellHeight
|
||||
{
|
||||
return 80.0;
|
||||
}
|
||||
|
||||
+ (CGFloat)defaultCellHeight { return 80.0; }
|
||||
- (CGFloat)cellHeight
|
||||
{
|
||||
return ceil([self.contentView systemLayoutSizeFittingSize:UILayoutFittingCompressedSize].height);
|
||||
|
|
Loading…
Add table
Reference in a new issue