Open freak4pc opened 8 years ago
@kevin-hirsch this has been open for over 2 months... Any thoughts ?
There is a great fork solving this very problem. Any chance you would consider adding this in? @kevin-hirsch : https://github.com/dmsl1805/KVNProgress/commit/318fe74872703575a72a234e0ba00248554a8e5c
2 years later I'm still having this problem
I've wrapped around the main thread but it still complains about updating UI on background thread
DispatchQueue.main.async {
KVNProgress.show()
}
Apparently the problem is caused here: [self.contentView addMotionEffect:group];
, maybe because dispatch_once does not run on main thread? What can we do?
KVNPrepareBlockSelf();
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
[KVNBlockSelf setupMotionEffect];
});
I'm using swift 4.2 and the latest XCode
Hey All, I was wondering something for a while now.
KVNProgress will pretty much always crash if it's executed outside of the Main Thread. The current solution (which seems to be a recurring answer to issues here), would be to wrap the call with a GCD Dispatch on
dispatch_get_main_queue()
.My question here is, why not just enforce that to begin with? Why not have KVNProgress always display itself on the main thread, if it's not already there and avoid all of this confusion.
Even something as simple as:
What are your thoughts on this? @kevin-hirsch
I wouldn't mind quickly making a pull request for this if there's a demand :)