在当前视图下传递触摸事件给 UIView\UIButton

时间:2021-04-06 16:55:40
【文件属性】:
文件名称:在当前视图下传递触摸事件给 UIView\UIButton
文件大小:63KB
文件格式:ZIP
更新时间:2021-04-06 16:55:40
IOS源码 作者sSegev,源码SSAlphaPass,SSAlphaPass 可在你当前的视图下传递触摸事件给 UIView\UIButton,但前提是你的像素 alpha 通道应该为0(像素是透明的)。这个方案比单纯忽视掉顶层视图要好,因为你仍然可以在 UIView 为半透明的情况下点击 UIButton,UIView 非透明的部分仍然会回复你的触摸事件。
【文件预览】:
SSAlphaPass-master
----SSAlphaPassExample.xcodeproj()
--------project.xcworkspace()
--------project.pbxproj(13KB)
--------xcuserdata()
----SSAlphaPassExample()
--------main.m(335B)
--------SSAlphaPass()
--------AppDelegate.h(278B)
--------AppDelegate.m(2KB)
--------Base.lproj()
--------Giraffe.png(37KB)
--------ViewController.h(216B)
--------Images.xcassets()
--------Info.plist(1KB)
--------ViewController.m(919B)
----LICENSE(1KB)
----README.md(1KB)

网友评论