I want to scroll like that 1 2 3 1 2 3
I have some buttons suppose 10 which i want to show on endless scroll.
numbercolors=[[NSMutableArray alloc
For right infinite scroll you can use -
let rightOffset = CGPoint.init(x: (scrollView.contentSize.width) - (scrollView.bounds.width), y: 0)
UIView.animate(withDuration: 3.0,
delay: 0.0,
options: [.curveLinear, .repeat],
animations: { () -> Void in
self.scrollView.contentOffset = rightOffset
}, completion: { (finished: Bool) -> Void in
self.scrollView.setContentOffset(.init(x: 0, y: self.scrollView.contentOffset.y), animated: false)
})