Since I don't use storyboards to create my views, I was wondering if there's the "Use Safe Area Guides" option programmatically or something like that.
I've tried to anchor my views to
view.safeAreaLayoutGuide
but they keep overlapping the top notch in the iPhone X simulator.
You can use view.safeAreaInsets as explained here https://www.raywenderlich.com/174078/auto-layout-visual-format-language-tutorial-2
code sample (taken from raywenderlich.com):
I'm actually using an extension for it and controlling if it is ios 11 or not.
Safe area extension For Objective-C