简体   繁体   English

我的UIButton不会在触摸时禁用吗?

[英]My UIButton does not disable on touch?

I created a UIButton in storyboard , declared it as an outlet in the .h and for some reason neither 我在情节 UIButton中创建了一个UIButton ,将其声明为.h中的出口,并且出于某种原因,

    addflight.userInteractionEnabled=NO;

or 要么

    addflight.enabled=NO;

disables it, I don't know what I'm doing wrong? 禁用它,我不知道我在做什么错?

Please Check if you have connect the IBOutlet from .h file to nib. 请检查是否已将IBOutlet从.h文件连接到nib。 Also see if there is no view above your button. 另请查看按钮上方是否没有视图。 See UserInteraction Enabled. 请参阅启用UserInteraction。 See The Doc . 参见文档 See this tut . 看到这个tut

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

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