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

改变item的大小 #8

Open
MysteryRan opened this issue Nov 3, 2016 · 7 comments
Open

改变item的大小 #8

MysteryRan opened this issue Nov 3, 2016 · 7 comments

Comments

@MysteryRan
Copy link

你好 我通过flowlayout 来改变 itemSize 然后foot view 就失效了 请问可以改变 item的大小吗

@zzyspace
Copy link
Owner

zzyspace commented Nov 7, 2016

item 和 footer 的 Size 是在 - updateSubviewsFrame 中确定的. 不清楚你是在什么地方进行改动所以导致的问题.
ps. 改变 itemSize 的目的是?

@MysteryRan
Copy link
Author

我是设置flowlayout中设置itemSize的大小 想在一行下显示多个item 并且右滑出现foot

@zzyspace
Copy link
Owner

zzyspace commented Nov 8, 2016

那你可以尝试在 - updateSubviewsFrame 方法中设置 itemSize

@MysteryRan
Copy link
Author

在 updateSubviewsFrame 改变item大小 但是出现foot后 foot的拖动事件无效了

@zzyspace
Copy link
Owner

拖动事件可以在 -scrollViewDidScroll:-scrollViewDidEndDragging:willDecelerate: 中根据你的需求作修改

@MysteryRan
Copy link
Author

改变item的大小 出现footView 触发不了拖动footer后的事件
- (void)updateSubviewsFrame
{
// collectionView
self.flowLayout.itemSize = CGSizeMake(self.bounds.size.width / 3.0, self.bounds.size.height);

@zzyspace
Copy link
Owner

这段代码 中修改 footer 的触发条件即可.

Repository owner deleted a comment from fede-s Feb 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@zzyspace @MysteryRan and others