12207480 / TYCyclePagerView

a simple and usefull cycle pager view ,and auto scroll banner view(轮播图) ,include pageControl for iOS,support Objective-C and swift
MIT License
1.79k stars 329 forks source link

你好,可以在cell 里面修改item 的size吗?改如何修改? #31

Closed Casabalnca closed 4 years ago

Casabalnca commented 6 years ago

我这里的需求是根据cell 的高度来计算item 的高度,但是第一如何获取到pageView ?后来我尝试获取到当前的控制器,然后拿到当前的pageView ,如下代码: _pagerView.layout.itemSize = CGSizeMake(CGRectGetWidth(_pagerView.frame)sender.value, CGRectGetHeight(_pagerView.frame)sender.value); [_pagerView setNeedUpdateLayout]; 但是我发现跑起来,没有改变,并且一滑动,这个布局都乱了。。。求助大,大神!!!

可以加qq 吗?我的qq 是704379869

12207480 commented 6 years ago

有个 代理返回 layout 你看看

Casabalnca commented 6 years ago

但是我无法知道这里是第几个cell 啊,- (TYCyclePagerViewLayout )layoutForPagerView:(TYCyclePagerView )pageView 这个是写在控制器里面的,可以知道这是第几个cell吗,因为每一个cell 的高度都不一样

12207480 commented 6 years ago

每个cell宽高不一样?

Casabalnca commented 6 years ago

是的,每一个的高度不一样,宽度是一样的

12207480 commented 6 years ago

还不支持