Get Safe Area - iOS
Retrieve safe area heights to adjust UI components and avoid overlaps with system areas like the notch or home indicator.
window.WTN.getSafeArea({
callback: function(data){
//Contains data of the safe area settings
}
});
//Response Data
{
"type":"getSafeArea",
"top" : 150,
"bottom" : 102,
"topSafeArea": true/false,
"bottomSafeArea": true/false
}import { getSafeArea } from "webtonative"
getSafeArea({
callback: function(data){
//Contains data of the safe area settings
}
});
//Response Data
{
"type":"getSafeArea",
"top" : 150,
"bottom" : 102,
"topSafeArea": true/false,
"bottomSafeArea": true/false
});Last updated