Вызов этой функции для следующей и предыдущей кнопки IBAction
func scrollToNextCell()
{
let collectionView = yourCollectionView
let cellSize = CGRect(x: 0, y: 0, width: self.view.frame.width, height: self.view.frame.height)
let contentOffset = collectionView!.contentOffset;
collectionView!.scrollRectToVisible(CGRect(x: contentOffset.x + cellSize.width, y: contentOffset.y, width: cellSize.width, height: cellSize.height), animated: true)
}
func scrollToPreviousCell()
{
let collectionView = yourCollectionView
let cellSize = CGRect(x: 0, y: 0, width: self.view.frame.width, height: self.view.frame.height)
let contentOffset = collectionView!.contentOffset;
collectionView!.scrollRectToVisible(CGRect(x: contentOffset.x - cellSize.width, y: contentOffset.y, width: cellSize.width, height: cellSize.height), animated: true)
}