我有一些 UIViews:
Top UIView: MatrixViewController
---- Sub1 UIView
---- Sub2 UIView
---- Subx UIView
在每个子视图中,我都设置了 self.userInteractionEnabled=YES。每个 Sub UIView 都会调用它的 touchesBegan...
但是,当触摸任何 Sub 视图旁边时,TopParent 的 touchesBegan 没有被调用?
应用委托:
...
self.matrixViewController = [[MatrixViewController alloc] init];
self.window.rootViewController = self.matrixViewController;
[self.window makeKeyAndVisible];
return YES;
TopParent UIView 在 ViewController/viewDidLoad 中创建:
CGRect rect = [[UIScreen mainScreen] applicationFrame];
MatrixViewController matrix = [[MatrixViewController alloc] initWithFrame:rect];
[self setView:matrix];
谢谢