Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在我的 iPad 应用程序中,屏幕上显示了多个视图。我希望为除一个视图之外的所有其他显示视图创建一个触地事件?我该怎么做?(我可以逐个创建触摸事件,但我认为这不是一个好主意)
谢谢
这很简单……
只是写触摸开始像....
-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { UITouch *touch=[[event allTouches] anyObject]; if([touch view]!=< your view that you dont want to touch >) { // <# Your Code #> } }