目标C语言 uigesturerecogizer或触摸开始不响应



我有一个正常的应用程序。是的,这将不会在任何地方工作。如果我把它放在ViewController中,它不会工作,如果我把它放在UIView子类中,同样地,它拒绝工作。我做错了什么?

-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
    NSLog(@"Please Work");
}

确保视图有userInteractionEnabled=YES。如果父视图有userInteractionEnabled=NO,触摸也会丢失。如果没有帮助,邮政编码。

最新更新