iOS?????е?UIView(UIButton )????????
???????????? ???????[ 2014/11/24 13:44:36 ] ????????iOS ?????? ???
???????????????μ?????????????????????????????о???????????????????????????????????????
?????????????????????????Ч????????????ЩС???????????????????????????檔
???????????????????????????button????????????????????飬????????????????????????????????е?button??????а????????????
??????????????????????????????????????λ??????????????????????????????Χ????????????????????????frame????????????????????????????????е?“???”??frame???????????????λ?????????????λ?á?
??????????е??????????????λ?????????????·?????????????????????????????????
????- (CALayer *)hitTest:(CGPoint)p;
???????????????????????????????????????????????????????????????“???”?????????????????????д??????? ???????????б???????button??
-(void)tapClick:(UITapGestureRecognizer *)tap
{
CGPoint clickPoint = [tap locationInView:self];
for (UIImageView *imageView in [self subviews])
{
if ([imageView.layer.presentationLayer hitTest:clickPoint])
{
// This button was hit whilst moving - do something with it here
break;
}
}
}
}
?????????????????????????????????????????????
???????????????????????漰???????????????????SPASVOС??(021-61079698-8054)?????????????????????????