using the popupdialog with an activityindicator
jrumol opened this issue · 3 comments
jrumol commented
I have been thinking about using popupdialog to load an activity indicator when loading a viewcontroller, until the data is loaded into a tableview. However, I don't know how to dismiss the dialog when the data load has finished.
mwfire commented
Hey there!
This should be possible by keeping a reference to the dialog, e.g. as a property of the view controller:
let acitivityDialog: PopupDialog = {
let dialog = PopupDialog(...)
// ...
return dialog
}()
When loading starts, you present the dialog like present(activityDialog, animated: true)
, while you can dismiss it via activityDialog.dismiss()
.
Does that work for you?
stale commented
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.