iosiphoneobjective-ccocoa-touchicarousel

iCarousel - How to shift the focus to the left side


I need to implement iCarousel in a way so that it looks like this: Sample Image

I have done all the modifications at my end to make it look like this but now the problem is that iCarousel works with the center image in the focus. Can I make it so that if there are only two images, they don't appear in the center but rather on the left? Think about it like the "left indented" content.

How do I do this?


Solution

  • The viewpointOffset property doesn't really work that way. It will let you align to one edge, but then when you scroll to the end you'll have the same problem.

    iCarousel wasn't designed to do this. I suggest you switch to SwipeView instead (http://github.com/nicklockwood/SwipeView) which has the same delegate/datasource interface, but has an alignment property that you can use to set edge alignment, like this:

    swipeView.alignment = SwipeViewAlignmentEdge;