IndicatorControllerFood

class IndicatorControllerFood : UIViewController

Controls and updates food indicator elements visible when food domain is hidden. Currently displays total carbs, protein and fat consumed that day

  • Tracks date set by graph and updates indicator values

    Declaration

    Swift

    private var currentDay: Day
  • viewDidLoad override to set: Observer to act on current graph day changing, Observers to act based on food being added to the log, Indicator values

    Declaration

    Swift

    override func viewDidLoad()
  • Updates values on indicators to currentDay’s totals

    Declaration

    Swift

    @objc
    private func foodStatsUpdated()
  • Updates the currentDay variable with a date provided via notification from ViewControllerGraph

    Declaration

    Swift

    @objc
    func updateDay(notification: Notification)