I can't get UIScreen.main.bounds to return the right values when the device rotates in the simulator. It either keeps the same values after rotation or they are backwards (width and height, that is). This is kind of a nasty problem - I can't seem to figure this one out. It works correctly on a physical device but not the simulator.