How to get Height of Safe Area Programmatically Prior to IOS 11?
问题 Without using safeAreaLayoutGuide (I am targeting IOS 9+), is there any way to programmatically get the height of the "safe area" in IOS without having to create a new view (constrained to the safe area) solely for this purpose? I can't set an outlet to the safe area because it's not a UIView... or even a class of any sort. And if I simply use self.view.height in the ViewController, it's going to be too high (wrong). Is there some other way to do it? 回答1: In a UIViewController you can use the