You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to see an option for setting a grace period. I have subclassed JGProgressHUD for one of my projects. Maybe you want to implement something similar?
/**
Shows the HUD animated. You should preferably show the HUD in a UIViewController's view. @param view The view to show the HUD in. The frame of the @c view will be used to calculate the position of the HUD.
*/
I would like to see an option for setting a grace period. I have subclassed JGProgressHUD for one of my projects. Maybe you want to implement something similar?
import "JGProgressHUD.h"
@interface FSProgressHUD : JGProgressHUD
@Property NSNumber* graceTime;
@Property BOOL taskInProgress;
@Property BOOL showInSuperview;
@EnD
import "FSProgressHUD.h"
@interface FSProgressHUD ()
@Property NSTimer* graceTimer;
@Property UIView* view;
@EnD
@implementation FSProgressHUD
/**
Shows the HUD animated. You should preferably show the HUD in a UIViewController's view.
@param view The view to show the HUD in. The frame of the @c view will be used to calculate the position of the HUD.
*/
{
if (_graceTime && [_graceTime doubleValue] > 0.0) {
_view = view;
_taskInProgress = YES;
_graceTimer = [NSTimer scheduledTimerWithTimeInterval:[_graceTime doubleValue] target:self
selector:@selector(handleGraceTimer:)
userInfo:nil
repeats:NO];
}
else {
[super showInView:view];
}
}
{
_taskInProgress = NO;
[super dismiss];
}
{
if (_taskInProgress) {
if (_showInSuperview && _view.superview) {
[super showInView:_view.superview];
}
else {
[super showInView:_view];
}
}
}
@EnD
The text was updated successfully, but these errors were encountered: