Type Function Library display.* Return value Array Revision Release 2026.3728 Keywords reserved region, camera cutout, fold, hinge, safe area See also display.getSafeAreaInsets() fold
Returns an array of the screen regions that the system reserves, in content coordinates. A region is one of two kinds:
"occlusion" — Hardware that hides content, such as a camera cutout."division" — A fold or hinge that splits the screen into separate areas.display.getSafeAreaInsets() only gives a distance from each edge. This function gives the exact rectangle of each region, so you can draw around a camera cutout or lay content out on either side of a fold.
Each element of the array is a table with these properties:
kind — String, either "occlusion" or "division".isActive — Boolean indicating whether the region currently affects content. For example, a fold may only be active while the device is partly open.x, y — Numbers giving the region’s width, height — Numbers giving the region’s size.The array is empty when there are no reserved regions.
Reserved regions are currently reported on iOS and iPadOS versions that provide them. Other platforms, including Android and the Simulator, return an empty array. On Android, use the bounds property of the fold event to find the hinge.
display.getReservedRegions( [kind] )
String. Pass "occlusion" or "division" to return only regions of that kind. If omitted, regions of both kinds are returned.
-- Outline every camera cutout and fold on the screen
for _, region in ipairs( display.getReservedRegions() ) do
local outline = display.newRect( region.x + region.width*0.5, region.y + region.height*0.5, region.width, region.height )
outline:setFillColor( 0, 0, 0, 0 )
outline.strokeWidth = 2
print( region.kind, region.isActive )
end
-- Only look at the fold
local folds = display.getReservedRegions( "division" )
if ( #folds > 0 and folds[1].isActive ) then
print( "Fold is at y = " .. folds[1].y )
end