I believe depending on which orientation you launch an app in you can get a different value for bounds. So you will need todo something like

```
BOOL isPad = UIDevice.currentDevice.userInterfaceIdiom == UIUserInterfaceIdiomPad;
CGFloat minDimension = min(screenSize.width, screenSize.height);
CGFloat maxDimension = max(screenSize.width, screenSize.height);
CGFloat width = isPad ?  maxDimension : minDimension;
CGFloat height = isPad ? minDimension : maxDimension;
```