Passing Data to a View
Dog2puppy last edited by
I'm displaying a view by navigating to it with a NavigationController. This view will be dynamic and will display a players stats using data retrieved from a Web API. How can I pass this data to the view?
mikael last edited by
@Dog2puppy, create a custom view and load the data when you initialize it:
class MyView(ui.View): def __init__(self, **kwargs): super().__init__(**kwargs) # load data from API # set up subviews based on the loaded data
If you want to set up the view and have it be responsive while you load the data, do the loading in a method decorated with
nazimaa last edited by nazimaa
This post is deleted!