掩码UIView触摸检测

时间:2013-03-13 10:27:10

标签: iphone objective-c ios5 uiview

i get this view after masking.View size is 310 width 310 height.i just want to detect toch on black Area我有一个大框架,通过它我可以屏蔽一个较小的视图 现在我想检测只是较小的一个但触摸开始不允许我过滤蒙面视图 任何指针?

1 个答案:

答案 0 :(得分:0)

- (void)viewDidLoad
{

 UITapGestureRecognizer *gr = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(UIviewTapped:)];
 [yourUIview addGestureRecognizer:gr];

}

-(void) UIviewTapped:(UIView *)view
{

  // write touched code here. 

}