Fix animation and layout bugs on iPad Pro

This commit is contained in:
Charles Magahern
2016-01-03 13:21:50 -08:00
parent fbde76d734
commit 5936fc8b56
4 changed files with 17 additions and 7 deletions
@@ -182,7 +182,7 @@ class SwitchesViewController: UIViewController,
{
let spacing = SwitchesViewController.collectionViewCellsSpacing
let cellsPerRow = CGFloat(SwitchesViewController.collectionViewCellsPerRow)
let dimensions = rint((collectionView.bounds.size.width / cellsPerRow) - ((spacing * (cellsPerRow - 1.0)) / cellsPerRow))
let dimensions = floor((collectionView.bounds.size.width / cellsPerRow) - ((spacing * (cellsPerRow - 1.0)) / cellsPerRow))
if (indexPath.item < ActionCell.count) {
return CGSize(width: collectionView.bounds.size.width, height: rint(dimensions / 2.0))