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:
authorVladiMihaylenko <vxmihaylenko@gmail.com>2015-04-17 18:48:43 +0300
committerAlex Zolotarev <alex@maps.me>2015-09-23 02:52:38 +0300
commit9d2141ae12860ba6f587c97ca31d3986be2a4b51 (patch)
tree6bf88c44032eb0cdb9adea1698d355b43f30e44e /iphone/Maps/Classes/MWMPlacePageInfoCell.mm
parent628476581b9783b865eeda3ba8a274bfc8086f98 (diff)
[ios] iPhone landscape placepage
Diffstat (limited to 'iphone/Maps/Classes/MWMPlacePageInfoCell.mm')
-rw-r--r--iphone/Maps/Classes/MWMPlacePageInfoCell.mm37
1 files changed, 37 insertions, 0 deletions
diff --git a/iphone/Maps/Classes/MWMPlacePageInfoCell.mm b/iphone/Maps/Classes/MWMPlacePageInfoCell.mm
new file mode 100644
index 0000000000..92d381230c
--- /dev/null
+++ b/iphone/Maps/Classes/MWMPlacePageInfoCell.mm
@@ -0,0 +1,37 @@
+//
+// MWMPlacePageBaseCell.m
+// Maps
+//
+// Created by v.mikhaylenko on 27.04.15.
+// Copyright (c) 2015 MapsWithMe. All rights reserved.
+//
+
+#import "MWMPlacePageInfoCell.h"
+#import "UIKitCategories.h"
+
+@interface MWMPlacePageInfoCell () <UITextViewDelegate>
+
+@property (weak, nonatomic, readwrite) IBOutlet UIImageView *icon;
+@property (weak, nonatomic, readwrite) IBOutlet id textContainer;
+
+@end
+
+@implementation MWMPlacePageInfoCell
+
+- (void)configureWithIconTitle:(NSString *)title info:(NSString *)info
+{
+ [self.imageView setImage:[UIImage imageNamed:[NSString stringWithFormat:@"ic_%@", title]]];
+ [self.textContainer setText:info];
+
+ [(UIView *)self.textContainer setWidth:self.bounds.size.width * 0.7f];
+
+ if ([self.textContainer respondsToSelector:@selector(sizeToFit)])
+ [self.textContainer sizeToFit];
+}
+
+- (BOOL)textView:(UITextView *)textView shouldInteractWithURL:(NSURL *)URL inRange:(NSRange)characterRange
+{
+ [[UIApplication sharedApplication] openURL:[NSURL URLWithString:textView.text]];
+ return YES;
+}
+@end