Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorv.mikhaylenko <v.mikhaylenko@corp.mail.ru>2015-05-25 16:13:04 +0300
committerAlex Zolotarev <alex@maps.me>2015-09-23 02:52:39 +0300
commit279c4e252521359d59d76e533b7cde41a74183e9 (patch)
tree614a5a8462f69c0b81342d7fbcf19f49cf2e8f18 /iphone/Maps/Classes/MWMPlacePageTypeDescription.mm
parent279e4649433bcbc06e888d557f77d7dd8708fa98 (diff)
[ios] Made place page for iPad. Added big compas view. Added bookmarks edit.
Diffstat (limited to 'iphone/Maps/Classes/MWMPlacePageTypeDescription.mm')
-rw-r--r--iphone/Maps/Classes/MWMPlacePageTypeDescription.mm61
1 files changed, 61 insertions, 0 deletions
diff --git a/iphone/Maps/Classes/MWMPlacePageTypeDescription.mm b/iphone/Maps/Classes/MWMPlacePageTypeDescription.mm
new file mode 100644
index 0000000000..3b90ca648e
--- /dev/null
+++ b/iphone/Maps/Classes/MWMPlacePageTypeDescription.mm
@@ -0,0 +1,61 @@
+//
+// MWMPlacePageTypeDescription.m
+// Maps
+//
+// Created by v.mikhaylenko on 07.06.15.
+// Copyright (c) 2015 MapsWithMe. All rights reserved.
+//
+
+#import "MWMPlacePageTypeDescription.h"
+#import "UIKitCategories.h"
+
+@interface MWMPlacePageELEDescription : UIView
+
+@property (weak, nonatomic) IBOutlet UILabel * heightLabel;
+
+@end
+
+@interface MWMPlacePageHotelDescription : UIView
+
+- (void)configureWithStarsCount:(NSUInteger)count;
+
+@end
+
+static NSString * const kPlacePageDescriptionViewNibName = @"MWMPlacePageDescriptionView";
+
+@implementation MWMPlacePageTypeDescription
+
+- (instancetype)initWithPlacePageEntity:(MWMPlacePageEntity const *)entity
+{
+ self = [super init];
+ if (self)
+ {
+ [[NSBundle mainBundle] loadNibNamed:kPlacePageDescriptionViewNibName owner:self options:nil];
+ if (entity.type == MWMPlacePageEntityTypeEle)
+ self.eleDescription.heightLabel.text = [NSString stringWithFormat:@"%@", @(entity.typeDescriptionValue)];
+ else
+ [self.hotelDescription configureWithStarsCount:entity.typeDescriptionValue];
+ }
+ return self;
+}
+
+@end
+
+@implementation MWMPlacePageELEDescription
+
+@end
+
+@implementation MWMPlacePageHotelDescription
+
+- (void)configureWithStarsCount:(NSUInteger)count
+{
+ [self.subviews enumerateObjectsUsingBlock:^(UIImageView * star, NSUInteger idx, BOOL *stop)
+ {
+ if (idx < count)
+ star.image = [UIImage imageNamed:@"hotel_star_on"];
+ else
+ star.image = [UIImage imageNamed:@"hotel_star_off"];
+ }];
+}
+
+@end