officescan客户端迁移和升级
2011-09-05 10:47
295 查看
URL:http://stackoverflow.com/questions/4961386/event-handling-for-ios-how-hittestwithevent-and-pointinsidewithevent-are-r
The implementation of
If the return is NO,
If the return is YES, it sends
If a subview returns a non-
If no subview returns a non-
This process repeats recursively, so normally the leaf view of the view hierarchy is returned eventually.However, you might override
I think you are confusing subclassing with the view hierarchy. What the doc says is as follows. Say you have this view hierarchy. By hierarchy I'm not talking about class hierarchy, but views within views hierarchy, as follows:
you put your finger inside
On the views that returned
The implementation of
hitTest:withEvent:in UIResponder does the following:It calls
pointInside:withEvent:of
self
If the return is NO,
hitTest:withEvent:returns
nil. the end of the story.
If the return is YES, it sends
hitTest:withEvent:messages to its subviews. it starts from the top-level subview, and continues to other views until a subview returns a non-
nilobject, or all subviews receive the message.
If a subview returns a non-
nilobject in the first time, the first
hitTest:withEvent:returns that object. the end of the story.
If no subview returns a non-
nilobject, the first
hitTest:withEvent:returns
self
This process repeats recursively, so normally the leaf view of the view hierarchy is returned eventually.However, you might override
hitTest:withEventto do something differently. In many cases, overriding
pointInside:withEvent:is simpler and still provides enough options to tweak event handling in your application.
I think you are confusing subclassing with the view hierarchy. What the doc says is as follows. Say you have this view hierarchy. By hierarchy I'm not talking about class hierarchy, but views within views hierarchy, as follows:
you put your finger inside
D. Here's what will happen:
hitTest:withEvent:is called on
A, the top-most view of the view hierarchy.
pointInside:withEvent:is called recursively on each view.
pointInside:withEvent:is called on
A, and returns
YES
pointInside:withEvent:is called on
B, and returns
NO
pointInside:withEvent:is called on
C, and returns
YES
pointInside:withEvent:is called on
D, and returns
YES
On the views that returned
YES, it will look down on the hierarchy to see the subview where the touch took place. In this case, from
A,
Cand
D, it will be
D.
Dwill be the hit-test view
相关文章推荐
- 趋势officescan客户端迁移和升级
- 04SkypeForBusiness2015--Lync2010升级到2013迁移用户并修改客户端策略
- 12Lync2013升级到SkypeForBusiness2015--客户端版本控制及用户迁移
- Exchange 2007升级迁移到Exchange 2010后,个别手机客户端登录失败
- Git系列七之备份迁移 升级 恢复管理
- 《烽烟OL》客户端 Flex SDK4.0 升级4.5 or 4.6 报错解决方案
- (三)把域服务升级和迁移到Windows Server 2012 R2上
- 域控的升级及客户端加入域
- 数据库升级迁移
- iOS开发~App初始化或者升级涉及本地数据库迁移的问题
- Exchange2010升级到2016——配置Exchange2016邮箱数据库、迁移邮箱
- Android服务器端和客户端设计APK升级
- zabbix客户端升级
- MYSQL迁移或者升级的故障解决大全
- winform客户端升级组件autoUpdate报错
- 基于TCP网络通信的自动升级程序源码分析-客户端接收文件
- Office365:客户端升级Excel2016后无法打开xls\xlsx文件
- mac系统及xcode使用的SVN客户端升级
- java中客户端的代码升级