Add a Convenience Property to Get Owning View Controller (#3076)

* Add a convenience property -closestViewController

* Address comments
This commit is contained in:
Adlai Holler
2017-03-02 11:51:16 -08:00
committed by GitHub
parent 012b378a22
commit 93809bd4e7
7 changed files with 94 additions and 5 deletions

View File

@@ -130,6 +130,11 @@ extern __kindof ASDisplayNode * _Nullable ASDisplayNodeFindFirstSupernodeOfClass
*/
extern UIWindow * _Nullable ASFindWindowOfLayer(CALayer *layer) AS_WARN_UNUSED_RESULT;
/**
* Given a layer, find the closest view it lives in, if any.
*/
extern UIView * _Nullable ASFindClosestViewOfLayer(CALayer *layer) AS_WARN_UNUSED_RESULT;
/**
* Given two nodes, finds their most immediate common parent. Used for geometry conversion methods.
* NOTE: It is an error to try to convert between nodes which do not share a common ancestor. This behavior is