0
By clicking a certain button I make a query in firebase to return data, however this same button calls another view controller, and the problem is there, the view controller is called before the firebase returns all data, and consequently values are passed as nil. I was thinking about thread management (pause a thread) or something like that, but I don’t know if that’s it. Is there any way I can run the prepareForSerge only after the end of a certain processing ?
It would be more interesting to 'schedule' in the iOS process queue, inside the viewcontroller already called this execution should be in the
onDidLoad()
. Put the code you already have in question. Which version of Swift uses?– rray