contentLayoutGuide is internally of type NSLayoutGuide.
So all you have to do is cast it to NSLayoutGuide
if let guide = titleTextField.window?.contentLayoutGuide as? NSLayoutGuide {
	 let topAnchor = guide.topAnchor
}
Topic:
UI Frameworks
SubTopic:
AppKit
Tags: