Code

CMLoopScrollView

CMLoopScrollView

How to use

1. Use xib override scrollView class to CMLoopScrollView

2. Add delegate CMLoopScrollViewDelegate

● return items count

func loopScrollView_numberOfRows(_ scrollView: CMLoopScrollView) -> Int

● return item view frame size

func loopScrollView_sizeOfRows(_ scrollView: CMLoopScrollView,row: Int) -> CGSize

● return item view from CMLoopScrollViewCell
Use xib override class to CMLoopScrollViewCell

func loopScrollView_cellForRows(_ scrollView: CMLoopScrollView, row: Int) -> CMLoopScrollViewCell

● selected item callback

func loopScrollView_didSelectForRows(_ scrollView: CMLoopScrollView, row: Int)

3 Set scollView pagingEnabled = true, can open loop page effect.

Support: Xcode 8, Swift 3

by
by
by
by
by
by