-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
在2.3.1在UICollectionview中RefuseVIew桥接崩溃 #29
Comments
This fixes crashes where the replaced constraint is sill retained by a trait collection but references a deallocated firstItem. See sunnyxx#29
Interesting approach. I've spent some time investigating the crash you're fixing. The reason for it is that iOS keeps a reference to some of the old constraints on the placeholder in a Trait Collection (Implementation of storyboard sizeclasses). It still tries to evaluate these constraints at a point in time where the view does not exist anymore and has been deallocated. I suspect, that the reason why your change helps is, that it retains Without having tested it, it might be enough to add
and keep the creation of new constraints synchronous. |
Btw: Don't modify UI on a background thread. The global queue Temporarily retaining the placeholderView through an async call should also be done on the main queue:
https://developer.apple.com/library/content/technotes/tn2109/_index.html |
Opened PR #30 based on this. |
UICollectionview的RefuseView中的子View用了桥接,结果崩溃在equeueReusableSupplementaryView这个方法,后来在copy约束这里加了子线程就好了,应该是约束在遍历和添加新约束时再加上collectionview刷新造成一些线程问题,本人是菜鸟,还请大神有时间看一下
The text was updated successfully, but these errors were encountered: