//
//  TimePeriodOffsetHolder.swift
//  1Weather
//
//  Created by Dmitry Stepanets on 22.03.2021.
//

import UIKit

protocol TimePeriodOffsetDelegate:class {
    func offsetDidChange(newOffset:CGFloat)
}

class TimePeriodOffsetHolder {
    //Public
    private(set) var currentOffset:CGFloat = 0
    weak var delegate: TimePeriodOffsetDelegate?
    
    public func update(offset:CGFloat) {
        self.currentOffset = offset
        self.delegate?.offsetDidChange(newOffset: offset)
    }
}
