You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Steps to reproduce:
Have a tableView in a viewController, add the loading, go to another viewController, do something network-related, add another loading, stop the loading animation after you receive a response, call a delegate method back and dismiss the current viewController, stop the animation in the delegate method, nothing happens.
I dug into the code and changed the following inside hide() method inside NVActivityIndicatorPresenter.swift from
for item in UIApplication.shared.keyWindow!.subviews
where item.restorationIdentifier == restorationIdentifier {
item.removeFromSuperview()
}
to
for window in UIApplication.shared.windows {
for item in window.subviews
where item.restorationIdentifier == restorationIdentifier {
item.removeFromSuperview()
}
}
and it works. Is there any reason why keyWindow is used instead of windows?
The text was updated successfully, but these errors were encountered:
@Mehrdadmaskull: keyWindow is used to add overlay view on top-most window so that it covers all beneath views. In your case, I guess that going to another view controller creates a new window on top of the one you added the loader. You could try debugging windows to see if there's new window added.
Steps to reproduce:
Have a tableView in a viewController, add the loading, go to another viewController, do something network-related, add another loading, stop the loading animation after you receive a response, call a delegate method back and dismiss the current viewController, stop the animation in the delegate method, nothing happens.
I dug into the code and changed the following inside
hide()
method inside NVActivityIndicatorPresenter.swift fromto
and it works. Is there any reason why keyWindow is used instead of windows?
The text was updated successfully, but these errors were encountered: