zsisme
ios核心动画高级技巧

Updated 3 years ago

bunnyshell (@lxian) started discussion #23

4 years ago · 0 comments

Open

-hitTest:方法同样接受一个CGPoint类型参数,而不是BOOL类型,它返回图层本身,或者包含这个坐标点的叶子节点图层。这意味着不再需要像使用-containsPoint:那样,人工地在每个子图层变换或者测试点击的坐标。如果这个点在最外面图层的范围之外,则返回nil。具体使用-hitTest:方法被点击图层的代码如清单3.5所示。

Hit Testing (Edit this file)

"而不是BOOL类型,它返回图层本身" 应为 “但它不返回BOOL 类型,而是返回图层本身“

No description provided.

No comments on this discussion.


to join this conversation on GitBook. Already have an account? Sign in to comment
Notifications

You’re not receiving notifications from this thread.


1 participant