/***
 * Excerpted from "Developing for Apple Watch",
 * published by The Pragmatic Bookshelf.
 * Copyrights apply to this code. It may not be used to create training material, 
 * courses, books, articles, and the like. Contact us if you are in doubt.
 * We make no guarantees that this code is fit for any purpose. 
 * Visit http://www.pragmaticprogrammer.com/titles/jkwatch for more book information.
***/
//
//  RunLogRowController.m
//  TapALap
//
//  Created by Jeff Kelley on 5/8/15.
//  Copyright (c) 2015 Pragmatic Bookshelf. All rights reserved.
//

@import WatchKit;

#import "RunLogRowController.h"


@interface RunLogRowController ()

@property (strong, nonatomic) IBOutlet WKInterfaceLabel *dateLabel;
@property (strong, nonatomic) IBOutlet WKInterfaceLabel *distanceLabel;
@property (strong, nonatomic) IBOutlet WKInterfaceLabel *durationLabel;

@end

@implementation RunLogRowController

- (void)configureForDate:(NSDate *)date
                distance:(double)distance
                duration:(NSTimeInterval)duration
{
    [self.dateLabel setText:[self.dateFormatter stringFromDate:date]];
    
    [self.distanceLabel setText:
     [self.distanceFormatter stringFromMeters:distance]];
    
    [self.durationLabel setText:
     [self.durationFormatter stringFromTimeInterval:duration]];
}

@end
