-
Notifications
You must be signed in to change notification settings - Fork 0
/
MSTransportDetailsView.m
44 lines (36 loc) · 1.09 KB
/
MSTransportDetailsView.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
//
// MSTransportDetailsView.m
// Moov'Simply
//
// Created by Valtech on 7/16/13.
// Copyright (c) 2013 DuchessFrance. All rights reserved.
//
#import "MSTransportDetailsView.h"
#import "MSTransport.h"
@interface MSTransportDetailsView ()
@property (weak, nonatomic) IBOutlet UILabel *titleLabel;
@property (weak, nonatomic) IBOutlet UILabel *distanceLabel;
@end
@implementation MSTransportDetailsView
- (id)initWithFrame:(CGRect)frame
{
self = [super initWithFrame:frame];
if (self) {
[[NSBundle mainBundle] loadNibNamed:@"MSTransportDetailsView" owner:self options:nil];
}
return self;
}
- (void)showTransportInformations:(MSTransport *)transport atUserLocation:(CLLocation *)userLocation
{
[self.titleLabel setText:transport.name];
[self.distanceLabel setText:[NSString stringWithFormat:@"à %.1fm à pieds",[userLocation distanceFromLocation:transport.location]]];
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect
{
// Drawing code
}
*/
@end