I have this UIPickerView
which will have data yet, but doesn't have data, since I make async http request
func pickerView(pickerView: UIPickerView, numberOfRowsInComponent component: Int) -> Int { var dataCount = PickerData.count return dataCount }
happens before my data is loaded, how do I populate my PickerData
after this function happens? I couldn't find any answers on any website, maybe I'm searching for wrong terms but still, i couldn't do it, i thought about making sync request, but I've read that it is a bad practice, so is there a good way to solve my problem?
Also I want to add, the data might change over time so I want to be able to change PickerView
data too.