Objective c 按钮按下时不突出显示

Objective c 按钮按下时不突出显示,objective-c,ipad,click,highlighting,Objective C,Ipad,Click,Highlighting,在我的应用程序中,有很多按钮在按下时会高亮显示,尽管我在一个向下滑动菜单中添加了一些按钮,但奇怪的是,这些按钮在按下时不会高亮显示 选择“突出显示调整图像”,我也尝试过 quickYes.adjustsImageWhenHighlighted=是 但按下时也不会突出显示所选按钮。 有人能告诉我为什么会发生这种情况吗? 下面是我菜单的代码(我不确定这里是否有代码影响它的突出显示?) -(IBAction)OpenMenu:(id)sender { if (draw1 ==0) {

在我的应用程序中,有很多按钮在按下时会高亮显示,尽管我在一个向下滑动菜单中添加了一些按钮,但奇怪的是,这些按钮在按下时不会高亮显示

选择“突出显示调整图像”,我也尝试过

quickYes.adjustsImageWhenHighlighted=是

但按下时也不会突出显示所选按钮。 有人能告诉我为什么会发生这种情况吗? 下面是我菜单的代码(我不确定这里是否有代码影响它的突出显示?)

 -(IBAction)OpenMenu:(id)sender {
    if (draw1 ==0) {
        draw1 = 1;
        [UIButton beginAnimations:nil context:nil];
        [UIButton setAnimationDuration:0.5];
        [UIButton setAnimationDelay:0.0];
        [UIButton setAnimationCurve:UIViewAnimationCurveEaseOut];
        scrollView.frame = CGRectMake(0, 0, 1024, 120);
        openMenu.frame = CGRectMake(708, 120, 265, 75);
        oSmallLabel.frame = CGRectMake(20, 127, 60, 30);
        quickYes.frame = CGRectMake(20, 10, 99, 96);
        quickNo.frame = CGRectMake(148, 10, 99, 96);
        quickHello.frame = CGRectMake(278, 10, 99, 96);
        quickBye.frame = CGRectMake(409, 10, 99, 96);
        quickThankYou.frame = CGRectMake(539, 10, 99, 96);
        [openMenu setImage:[UIImage imageNamed:@"2.png"] forState:UIControlStateNormal];
        [self.view bringSubviewToFront:scrollView];
        [UIView commitAnimations];
    } else {
        draw1 = 0;
        [UIButton beginAnimations:nil context:nil];
        [UIButton setAnimationDuration:0.5];
        [UIButton setAnimationDelay:0.0];
        [UIButton setAnimationCurve:UIViewAnimationCurveEaseOut];
        scrollView.frame = CGRectMake(0, -120, 1024, 120);
        openMenu.frame = CGRectMake(708, 0, 265, 75);
        oSmallLabel.frame = CGRectMake(20, 2, 60, 30);
        quickYes.frame = CGRectMake(20, -99, 99, 96);
        quickNo.frame = CGRectMake(148, -99, 99, 96);
        quickHello.frame = CGRectMake(278, -99, 99, 96);
        quickBye.frame = CGRectMake(409, -120, 99, 96);
        quickThankYou.frame = CGRectMake(539, -99, 99, 96);
        [openMenu setImage:[UIImage imageNamed:@"1.png"] forState:UIControlStateNormal];
        [self.view bringSubviewToFront:scrollView];
        [UIView commitAnimations];
    }
    }