The reload() method doesn't retrieve the data from plist. I want the user to input data from one screen and when they visit the screen with the heat map, I want the heat map to reflect the input data. But, the the heat map only reflects the data when the app is loaded for the first time, view.addSubview(calendarHeatMap), but when I use the reload() method any time after, the map doesn't reflect any additional data.
The reload() method doesn't retrieve the data from plist. I want the user to input data from one screen and when they visit the screen with the heat map, I want the heat map to reflect the input data. But, the the heat map only reflects the data when the app is loaded for the first time,
view.addSubview(calendarHeatMap)
, but when I use thereload()
method any time after, the map doesn't reflect any additional data.Everything else is pretty much the same as the example in this repo.
When the screen is first loaded, the order of execution is:
lazy var calendarHeatMap: CalendarHeatmap
viewWillAppear()
which has thecalendarHeapmap.reload()
methodfunc readHeatmap()
lazy var data: [String: UIColor]
func finishLoadCalendar()
or
lazy var calendarHeatMap: CalendarHeatmap
func readHeatmap()
lazy var data: [String: UIColor]
func finishLoadCalendar()
viewDidAppear()
which has thecalendarHeapmap.reload()
methodHowever, when the screen is revisited, none of these are called, except for the view's life cycle methods.