Closed Casabalnca closed 4 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
有个 代理返回 layout 你看看
但是我无法知道这里是第几个cell 啊,- (TYCyclePagerViewLayout )layoutForPagerView:(TYCyclePagerView )pageView 这个是写在控制器里面的,可以知道这是第几个cell吗,因为每一个cell 的高度都不一样
每个cell宽高不一样?
是的,每一个的高度不一样,宽度是一样的
还不支持
我这里的需求是根据cell 的高度来计算item 的高度,但是第一如何获取到pageView ?后来我尝试获取到当前的控制器,然后拿到当前的pageView ,如下代码: _pagerView.layout.itemSize = CGSizeMake(CGRectGetWidth(_pagerView.frame)sender.value, CGRectGetHeight(_pagerView.frame)sender.value); [_pagerView setNeedUpdateLayout]; 但是我发现跑起来,没有改变,并且一滑动,这个布局都乱了。。。求助大,大神!!!
可以加qq 吗?我的qq 是704379869