handsomecode/InteractiveSideMenu

I need to get the view.safeAreaInsets.top

El-Buritos opened this issue · 1 comments

My app is design programatically and I need to get the view.safeAreaInsets.top but by the way when I test to get it in a view contains the SideMenuItemContent, this code
if #available(iOS 11.0, *) { topSafeArea = view.safeAreaInsets.top } else { topSafeArea = topLayoutGuide.length }
return always a 0 value..

Basically because the view containing in the host are embed in itself...

How can I get this value ?

solved by if (@available(iOS 11.0, *)) { UIWindow *window = UIApplication.sharedApplication.keyWindow; CGFloat topPadding = window.safeAreaInsets.top;