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

时间:2012-09-26 09:07:13

标签: iphone uibutton

我试图隐藏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;

    }

1 个答案:

答案 0 :(得分:0)

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