Answer the question
In order to leave comments, you need to log in
How to redirect to another "page" after successfully loading data from the API?
I need that when the user enters the application, a loading scene (loader) appears and after the data from the API has arrived, another scene appears.
How can this be implemented?
Answer the question
In order to leave comments, you need to log in
You don't need to create a scene for this. It is enough to add a UIView with UIActivityIndicator to your main view, namely UIWindow. In the viewDidLoad method, you initiate, namely, add a view to the UIWindow and call the start method on the UIactivityIndicator. And in the compliment of your request, you do exactly the opposite. Stop and remove. More precisely, I will write later, if necessary. I write on the road.
After the data has loaded, call the Success Block (to be created), after which - present, or performSegue :)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question