UIButton没有隐藏在iPhone应用程序中



我试图隐藏UIButton,但它没有被隐藏。在相同的代码中,我成功地隐藏了一个UILabel。我的代码中有什么错误?

if ([typeOne isEqualToString:@"DDWC"]) {
    questionButtonTwo.hidden=YES;
    questionButtonTwoTwo.hidden=YES;
    questionButtonTwoThree.hidden=YES;
    questionButtonTwoFour.hidden=YES;
    questionButtonTwoFive.hidden=YES;
    questionButtonTwoSix.hidden=YES;
    questionButtonTwoSeven.hidden=YES;
    questionButtonTwoEight.hidden=YES;
    checkLableTwo.hidden=NO;
    checkLableTwoTwo.hidden=NO;
    checkLableTwoThree.hidden=NO;
    checkLableTwoFour.hidden=NO;
    checkLableTwoFive.hidden=NO;
    checkLableTwoSix.hidden=NO;
    checkLableTwoSeven.hidden=NO;
    checkLableTwoEight.hidden=NO;
    }

您是否为该按钮定义了一个IBOutlet并将其连接到Interface Builder中的实际按钮?如果没有,请尝试一下。

最新更新