Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

列表的生命周期在回调的时候frame不正确 #401

Open
keleyundou opened this issue Aug 11, 2021 · 0 comments
Open

列表的生命周期在回调的时候frame不正确 #401

keleyundou opened this issue Aug 11, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@keleyundou
Copy link

bug提交前阅读
1.请先仔细阅读文档,尤其是【其他注意事项】文档,里面有常见问题的解决方案;
2.请先搜索已有的Issues,尝试找到相同问题的讨论;
3.请先阅读相关类的API、源码,尝试从源码找到答案;
4.如果以上步骤都未能解决你的疑问,欢迎提交ISSUE;

bug描述
Demo中的LoadDataListCollectionViewController效果。
点击JXCategoryTitleView的Cell,导致从生命周期listDidAppear获取到的frame为Zero,如果想在listDidAppear方法中做些事情(eg:显示一个HUD),就会导致HUD位置不正确

版本号
1.JXCategoryView版本号:1.5.9
2.手机系统版本号:?
3.手机型号:模拟器 12 Pro Max

复现步骤

  1. 遇到问题的相关效果、类是:从JXCategoryListContainerView代理的生命周期的回调获取frame为zero
    2.具体的操作步骤是:点击JXCategoryTitleView的Cell,会调用JXCategoryListContainerView类的didClickSelectedItemAtIndex方法

截图、GIF
提供bug出现时的截图或者GIF。

截图代码均来自JXCategoryListContainerView

  • 点击JXCategoryTitleView的Cell,执行didClickSelectedItemAtIndex

iShot2021-08-11 10 47 14

  • 执行listWillAppear,在走到代理的[list listWillAppear]方法时,[list listView]的frame是zero

iShot2021-08-11 10 48 24

  • 这里会对[list listView]的frame修复

iShot2021-08-11 10 49 40

  • 最后打印值

iShot2021-08-11 10 56 35

建议:在对frame修复时,再处理生命周期相关的逻辑是否合理?这样的话外部实现生命周期的代理方法时可以拿到正确的frame

@keleyundou keleyundou changed the title 列表周期在回调的时候frame不正确 列表的生命周期在回调的时候frame不正确 Aug 11, 2021
@pujiaxin33 pujiaxin33 added the bug Something isn't working label Jul 17, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants