Fix animation and layout bugs on iPad Pro
This commit is contained in:
@@ -87,6 +87,8 @@ class MainViewController: UIViewController, SwitchesViewControllerDelegate {
|
||||
|
||||
override func viewDidAppear(animated: Bool)
|
||||
{
|
||||
super.viewDidAppear(animated)
|
||||
|
||||
_headerView.xionLogoView.beginAnimating()
|
||||
|
||||
if (!_server.connected) {
|
||||
@@ -102,11 +104,6 @@ class MainViewController: UIViewController, SwitchesViewControllerDelegate {
|
||||
}
|
||||
}
|
||||
|
||||
override func viewDidDisappear(animated: Bool)
|
||||
{
|
||||
_headerView.xionLogoView.stopAnimating()
|
||||
}
|
||||
|
||||
override func prefersStatusBarHidden() -> Bool
|
||||
{
|
||||
return true
|
||||
|
||||
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user