在view文件中复制如下代码
//解决苹果4S头视图超出了屏幕大小button不能点击问题
- (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event {
UIView *result = [super hitTest:point withEvent:event];
CGPoint buttonPoint2 = [self.Button convertPoint:point fromView:self];
if ([self.Button pointInside:buttonPoint2 withEvent:event]) {
return self.Button;
}
return result;
}