Short answer
You must use a UICollectionView.
More detailed answer
1) Customize the horizontal layout using UICollectionViewFlowLayout
let layout = UICollectionViewFlowLayout()
2) Scaling the installation (pseudo-code)
I am. Add self method to UIScrollViewDelegate scrollViewDidScroll(UIScrollView)
II. Set collectionView.delgate = self
III. In scrollViewDidScroll(UIScrollView) get all visible cells by doing scrollView as! UICollectionView scrollView as! UICollectionView and getting the visibleCells property.
intravenously For a cell in visible cells, set the appropriate scale with CGAffineTransform specified cell distance from the horizontal center of the screen. This may lead to some arithmetic; this should work fine:
s = −0.00005 * pow(cell.center.x, 2) + 1.5
Hope this helps! Feel free to ask for clarification if you need it.
source share