zsisme
ios核心动画高级技巧

Updated 3 years ago

xuchuandong (@xuchuandong) started discussion #207

2 years ago · 0 comments

Open

注意当调用图层的-hitTest:方法时,测算的顺序严格依赖于图层树当中的图层顺序(和UIView处理事件类似)。之前提到的zPosition属性可以明显改变屏幕上图层的顺序,但不能改变事件传递的顺序。

Hit Testing (Edit this file)

如果有一个blueView也加在self.view上,并且盖在layerView上,然后把layerView.zPostion设置为1.0f,即使blueview是后添加的,但是事件还是会被layerView阻断,亲测是这样的

No description provided.
xuchuandong @xuchuandong commented 2 years ago

那么是能改变事件的传递顺序了呀


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