iOS UIView touchesBegan没有被调用

时间:2012-07-18 16:03:41

标签: ios

我有一些UIViews:

Top UIView: MatrixViewController
---- Sub1 UIView
---- Sub2 UIView
---- Subx UIView

在每个Sub视图中,我设置了self.userInteractionEnabled = YES。 每个Sub UIView确实得到它的触摸开始称为......

但是,当触摸任何Sub视图的旁边时,TopParent的touchesBegan没有被调用?

的AppDelegate:

...
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];

由于

0 个答案:

没有答案