-
Notifications
You must be signed in to change notification settings - Fork 166
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
悬浮头部布局错乱问题 #16
Comments
展开和收起的时候需要reloaddata一下,有时候reloaddata还不能马上执行,设置延时0.01秒执行 |
最后这样处理的,感觉有点low, |
dispatch_after(dispatch_time(DISPATCH_TIME_NOW,(int64_t)(0.01 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ 直接这样既可! |
还是会偶发错乱问题,都试过了,代理也就那几个代理,也没写错啊,有点懵 |
照理说只要延迟执行一下reloadData就可以了,我以前也是这么做的 |
[self.collectionViewLabel performSelector:@selector(reloadData) withObject:nil afterDelay:0.01]; 这样试看看 |
好的,谢谢了 |
如果不行把延迟时间加长,0.1秒 |
先reloadData一次,然后延时再reloadData一次,就没出问题了,哈哈 |
直接延时reloadData吧,第一次reloadData应该是没用的,我之前试过 |
嗯嗯,谢了,博主 |
就是我有个页面是问卷考察的页面,是纵向布局的,两列的,设置了ClosedLayout类型,选项可以展开和收起,我头部设置了悬浮。滚动一定位置后,点击头部的收起,然后头部布局会错乱,item都是好的,头部会显示在最底部,滚动又变好了,现在为了实现需求头部设置了固定。
The text was updated successfully, but these errors were encountered: