Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

点击事件问题 #112

Open
wzj583585700 opened this issue Dec 19, 2019 · 3 comments
Open

点击事件问题 #112

wzj583585700 opened this issue Dec 19, 2019 · 3 comments

Comments

@wzj583585700
Copy link

我自定义一个view,这个view集成uiview,给这个view加了一个手势,布局的时候这个view分装一个layout,当点击这个layout的时候,手势响应了,这什么原因,交互这一块做的不好吗

@youngsoft
Copy link
Owner

这是正常的呀。layout也是继承自UIView的,layout也是一个普通的视图。

@wzj583585700
Copy link
Author

但是我点击layout的时候,不想让手势有响应

@youngsoft
Copy link
Owner

这个是系统的行为,和是否是布局无关。布局视图也是从UIView 派生出来的一个普通视图,你可以试着在你自定义view 上加一个非layout布局视图就会发现也是一样的会响应手势。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants