简体   繁体   English

UIButton层问题

[英]UIButton layer Issue

I have created UIView on navigation bar which drop downs with animation and below navigation bar I have created another button. 我在导航栏上创建了UIView ,该导航栏带有动画下拉菜单,在导航栏下方,我创建了另一个按钮。 In UIView I have created three buttons in a row. UIView我连续创建了三个按钮。 Now when view opens, it comes on bottom. 现在,当视图打开时,它位于底部。 So whenever I click on UIView's button it get clicks on button which is on back of view. 因此,每当我单击UIView's按钮时,都会单击视图背面的按钮。 Can anyone suggest me the solution? 谁能建议我解决方案?

When the animated UIView drops down try disabling the UIButton that is behind it. 当动画的UIView下拉时,请尝试禁用其背后的UIButton。

UIButton* button...
button.userInteraction = NO;

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM