-
-
Save wangzz/90a57629143d6d38f0b8 to your computer and use it in GitHub Desktop.
记录遇到的小的知识点。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
记录遇到的小的知识点。 |
升级Xcode插件失效解决办法
- 查看Xcode对应版本的UUID:
tail -f /var/log/system.log
- 更新插件配置文件
得到UUID后执行命令:
find ~/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins -name Info.plist -maxdepth 3 | xargs -I{} defaults write {} DVTPlugInCompatibilityUUIDs -array-add XCode_UUID
- 参考链接:
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
hit-test
hit-test使用的是逆序递归遍历法:
比如window上先后添加了A、B、C三个view:

那么屏幕上任何一点发生触摸事件时都会按如下顺序遍历:
** C 如果在C上继续递归遍历C的subview,不在C上则遍历B
** B 如果在B上继续递归遍历B的subview,不在B上则遍历A
** A 如果在A上继续递归遍历A的subview,不在A上则遍历A的上一级
直到找到一个包含点击区域的最上层view。
** iOS6 及之前系统会重复调用三次hit-test流程;
** iOS7 及之后系统会重复调用两次hit-test流程。
调用那么多次的原因不明。
点击包含UITabBar、UIToolBar等控件上方40像素区域内时,多次hit-test的最后一次中point值会发生随机变化,point的Y值会被增大若干不等的像素。
原因未知。
参考链接: Hit-Testing in iOS