Add custom UICollectionViewLayout and method to set selected index.