jdg/MBProgressHUD — pull request #200 by gmirabito (2014-05-15 20:31:08+00:00)
Title: Expose HUD bezel size as read only public property

We have a situation where we want to add a tap gesture recognizer to
the HUD for “tap to cancel” behavior. We want to ignore the tap gesture
if the tap did not occur within the bezel region of the HUD. By
exposing the ‘size’ property, we can determine if the tap location is
within the rectangle of the bezel.

Here is an example of code that processes a tap event that was added to
the HUD

```
-(void)tapReceived:(UITapGestureRecognizer *)recognizer{
CGPoint loc = [recognizer locationInView:progress];

CGFloat w = progress.size.width;
CGFloat h = progress.size.height;
CGFloat x = progress.center.x - w/2;
CGFloat y = progress.center.y - h/2;
CGRect progressRect = CGRectMake(x, y, w, h);

//if the tap was within the HUD bezel, then react to it, ignore it
otherwise
if(CGRectContainsPoint(progressRect, loc)){
//do any actions here (cancel operation for example)
[progress hide:YES];
}else{
//the tap location was not in the bezel region of the HUD so
igore it.
return;
}
}
```