按钮,滑动条 点击隐藏,点击显现

static int z=0;

-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{

    if (z==0) {

        self.view.backgroundColor=[UIColor blackColor];

        _doBackbutton.hidden=YES;

        _doJumpbutton.hidden=YES;

        _slider.hidden=YES;

        z=1;

    }

    else {

        

        self.view.backgroundColor=[UIColor whiteColor];

        _doBackbutton.hidden=NO;

        _doJumpbutton.hidden=NO;

        _slider.hidden=NO;

        z=0;

    }

}

原文地址:https://www.cnblogs.com/OIMM/p/4786526.html