Use Native convertRect:, convertPoint: Methods to Handle Nil Cases (#2889)

* When converting rects, points on loaded nodes, call into UIKit/CoreAnimation

* Always use view-ish behavior

* Improve nil window handling, add documentation
This commit is contained in:
Adlai Holler
2017-01-11 13:44:35 -08:00
committed by GitHub
parent 5b104c09a7
commit 7c4ee350b0
5 changed files with 90 additions and 1 deletions

View File

@@ -125,6 +125,11 @@ extern ASDisplayNode * _Nullable ASDisplayNodeFindFirstSupernode(ASDisplayNode *
*/
extern __kindof ASDisplayNode * _Nullable ASDisplayNodeFindFirstSupernodeOfClass(ASDisplayNode *start, Class c) AS_WARN_UNUSED_RESULT;
/**
* Given a layer, find the window it lives in, if any.
*/
extern UIWindow * _Nullable ASFindWindowOfLayer(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