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
If already on the main thread, the call to DispatchQueue.main.sync in transitionToState(...) will delay a loading view presentation briefly so that the main view is shown before valid data is present.
This could be resolved with something like the following logic:
if Thread.isMainThread {...}else{DispatchQueue.main.sync(){...}}
The text was updated successfully, but these errors were encountered:
On further observation I see that this isn't quite so simple as the call happens within an async block in the local queue. The only way I see to workaround this currently is to hide the viewController's view until loading completes, or am I missing something?
Yes you are right, I am usually calling startLoading() from viewWillAppear as shown in the example project. Do you still see this behaviour when used from viewWillAppear?
Hmm, I was seeing this behaviour when I posted, but I've made several changes to my loading flow since adding a workaround, and after removing the workaround it now seems ok!
It could be that my call to startLoading() itself may have been getting pushed back a cycle, but I can't verify this now. Let's assume that it's ok for now and I'll let you know if it re-occurs. Anyway, thanks for the library, very useful!
If already on the main thread, the call to
DispatchQueue.main.sync
intransitionToState(...)
will delay a loading view presentation briefly so that the main view is shown before valid data is present.This could be resolved with something like the following logic:
The text was updated successfully, but these errors were encountered: