开发者

Using AFOpenFlow: adding subviews not just images

开发者 https://www.devze.com 2023-03-03 12:50 出处:网络
I am using th开发者_StackOverflow中文版e AFOpenFlow library to generate a coverflow-like effect, but trying to add arbitrary UIViews to an AFOpenflowView, not just images. I am doing this by creating

I am using th开发者_StackOverflow中文版e AFOpenFlow library to generate a coverflow-like effect, but trying to add arbitrary UIViews to an AFOpenflowView, not just images. I am doing this by creating a subclass of of AFItemView, lets call it NewAFItemView, which represents the view I want to add. I also extended AFOpenFlowView, call it NewAFOpenFlowView and overrode the method

-(AFItemView *)coverForIndex:(int)coverIndex;

In the overridden method, I allocate an NewAFItemView object and return it as the cover view for that index. The NewAFItemView views appear correctly in the open flow but scrolling is immediately disabled. Switching back to allocating AFItemViews works but using NewAFItemViews does not scroll.

I have not overridden any of the touch events.

Any ideas on what might be happening?

Cheers.


why don´t you use iCarousel? https://github.com/nicklockwood/iCarousel i use this, and it works perfect for uiviews =).

0

精彩评论

暂无评论...
验证码 换一张
取 消