Xcode iOS how to get safe area top ,bottom ,right ,left value like this -> How to get height of topLayoutGuide?
// Inside your viewController
self.topLayoutGuide.length
The safe area insets is a UIEdgeInsets
struct. You can access the comments like this:
view.safeAreaInsets.left
view.safeAreaInsets.right
view.safeAreaInsets.top
view.safeAreaInsets.bottom
etc