This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
/*: | |
DateComponentsFormatter: A formatter that creates string representations of quantities of time. | |
*/ | |
let dateComponentsFormatter = DateComponentsFormatter() | |
/*: | |
A DateComponentsFormatter can be configured with an array of NSCalendarUnits. These components are then used in the output. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Formatter.swift | |
// Formatter | |
// | |
// Created by Matthew Hallatt on 30/11/2017. | |
// Copyright © 2017 Gospelware. All rights reserved. | |
// | |
import Foundation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
protocol ReuseIdentifiable { | |
static var reuseIdentifier: String { get } | |
} | |
extension ReuseIdentifiable { | |
static var reuseIdentifier: String { | |
return String(describing: self) + "ReuseIdentifier" | |
} |