/// <summary> /// Get the vertical margin (same on top and bottom) for the actual screen /// region of the simulator window when at 100% scaling with Xcode 9 bezels enabled. /// </summary> static int GetDeviceVerticalMargin(DeviceShape shape) { switch (shape) { case DeviceShape.IPhoneX: return(20); default: return(101); } }
/// <summary> /// Get the horizontal margin (same on left and right) for the actual screen /// region of the simulator window when at 100% scaling with Xcode 9 bezels enabled. /// </summary> static int GetDeviceHorizontalMargin(DeviceShape shape) { switch (shape) { case DeviceShape.IPhoneX: return(29); default: return(36); } }
/// <summary> /// Get the height of the entire simulator window when at 100% scaling, /// assuming Xcode 9 sim with bezels enabled. /// </summary> static int GetDeviceFullHeight(DeviceShape shape) { switch (shape) { case DeviceShape.IPhoneStandard: return(869); case DeviceShape.IPhoneStandardPlus: return(938); case DeviceShape.IPhoneX: return(852); case DeviceShape.IPhone5: default: return(770); } }