Using AFOpenFlow: adding subviews not just images
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 AFItemView
s works but using NewAFItemView
s 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 =).
精彩评论