Order Tracker

Order Tracker

A delivery tracker with a shape-drawn city map where the route line draws itself and a courier marker rides along it. The step list fills its rail as statuses advance and the ETA rolls down with numericText.

Luiz Mello
  • timeline
  • progress
  • animation

snippet.swift417 lines

6 files • Scroll to see all →
/// The delivery lifecycle, in order.public enum OrderTrackerStatus: Int, CaseIterable, Identifiable, Comparable {    case confirmed, preparing, onTheWay, delivered​    public var id: Int { rawValue }​    public static func < (lhs: Self, rhs: Self) -> Bool { lhs.rawValue < rhs.rawValue }​    public var title: String {        switch self {        case .confirmed: "Order confirmed"        case .preparing: "Preparing"        case .onTheWay: "On the way"        case .delivered: "Delivered"        }    }​    public var systemImage: String {        switch self {        case .confirmed: "checkmark"​// ... (click "Show full code" to see more)
Viewing: Model.swift•1 of 6