Inside my model is a dictionary named
var detailStock: Dictionary<String, StockInfoDetailed>?
StockInfoDetailed is a class I made to define attributes of an API such as open, close, high, low.
Currently in my prepare for segue, I have passed basic stock information but need the detailStock information also.
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
if let dvc = segue.destination as? StockDetailViewController{
dvc.myStock = myModel.currentStocks![(self.tableView.indexPathForSelectedRow?.row)!]
}
}
How would I pass my detailStock information to my detail view controller? Currently my keys are time slots at different intervals using https://www.alphavantage.co/query?function=TIME_SERIES_INTRADAY&symbol=MSFT&interval=5min&apikey=demo
Any input would be greatly appreciated.