Skip to content
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

对collectionView的代理做方法交换后,hook的方法执行了两遍 #204

Open
wv-y opened this issue Aug 10, 2022 · 2 comments
Open

Comments

@wv-y
Copy link

wv-y commented Aug 10, 2022

xcode13
iOS14.6及iOS15.4.1(手上现有的设备)
demo地址

以willDisplayCell举例,
因为业务需要hook了一下,( willDisplayCell-myhook)
然后发现willDisplayCell-myhook会执行两遍,但是原方法(willDisplayCell)是只执行一次;
TABAnimated中hook后执行原方法是用的selector;
不知道是不是自己写法和TABAnimated中hook的写法哪里有冲突,希望作者可以看下

image

image

@tigerAndBull
Copy link
Owner

demo无法体现

@wv-y
Copy link
Author

wv-y commented Aug 19, 2022

demo无法体现
可以看下log输出,每出现一个cell,myhook_collectionView:willDisplayCell:方法执行了两次;
在这里的截图有所体现
#204 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants