concept reference in category ios

This is an excerpt from Manning's book iOS Development with Swift.
My goal was to ensure that all use of references should be absolutely safe, with checking performed automatically by the compiler. But I couldn’t resist the temptation to put in a null reference, because it was so easy to implement. This has led to innumerable errors, vulnerabilities, and system crashes, which have probably caused a billion dollars of pain and damage in the last forty years.
Next, get a reference to the lowest point that it reaches in the view with the maxY property, taking into consideration the top constraint and adding in a five-point margin. let frMaxY = frFrame.maxY - topConstraint.constant + 5 1
- 1 Gets maxY of first responder
Frustratingly, you have no simple way to get a reference to the current first responder. Every UIView does, however, have an isFirstResponder property, so without too much effort, it’s possible to recursively iterate through a view’s subviews to find the first responder. This could even be appropriate to add as a property in an extension to the UIView class for easy reuse.