Description

iPhone X screen notch will make your games appear cropped unless you can detect its safe area.

This extension retrieves the safe area from any iOS device so you can keep your graphic resources and buttons inside it.

Just call iOS_get_safe_area() and it will return a json formatted string with all the information you need. You can convert that string to a ds_map by using json_decode(). These are the keys/values you will get:

  • "detected": If the device is running iOS 11.0 or higher, the detection will be possible and this value will be 1, otherwise it will be 0.
  • "top": the height in pixels outside of the safe area at the upper side of the screen.
  • "bottom": the height in pixels outside of the safe area at the bottom side of the screen.
  • "left": the width in pixels outside of the safe area at the left side of the screen.
  • "right": the width in pixels outside of the safe area at the right side of the screen.

The provided project has a working demo as seen in the screenshots.

You will need Game Maker Studio 2 with the iOS export module in order to get it working.

End User Licence Agreement (EULA).

Version 1.0.0. Published October 24, 2018

Age Rating: 4+

Average Rating

This asset hasn't received enough reviews yet.

Your review

You can only review assets you've bought.

No reviews yet

No reviews have been left for this asset - be the first!

Package contents

Loading, please wait

What is the issue?

Back to Top