12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- //
- // SVProgressHUD.h
- //
- // Created by Sam Vermette on 27.03.11.
- // Copyright 2011 Sam Vermette. All rights reserved.
- //
- // https://github.com/samvermette/SVProgressHUD
- //
- #import <UIKit/UIKit.h>
- #import <AvailabilityMacros.h>
- extern NSString * const SVProgressHUDDidReceiveTouchEventNotification;
- extern NSString * const SVProgressHUDWillDisappearNotification;
- extern NSString * const SVProgressHUDDidDisappearNotification;
- extern NSString * const SVProgressHUDWillAppearNotification;
- extern NSString * const SVProgressHUDDidAppearNotification;
- extern NSString * const SVProgressHUDStatusUserInfoKey;
- enum {
- SVProgressHUDMaskTypeNone = 1, // allow user interactions while HUD is displayed
- SVProgressHUDMaskTypeClear, // don't allow
- SVProgressHUDMaskTypeBlack, // don't allow and dim the UI in the back of the HUD
- SVProgressHUDMaskTypeGradient // don't allow and dim the UI with a a-la-alert-view bg gradient
- };
- typedef NSUInteger SVProgressHUDMaskType;
- @interface SVProgressHUD : UIView
- #pragma mark - Customization
- + (void)setBackgroundColor:(UIColor*)color; // default is [UIColor whiteColor]
- + (void)setForegroundColor:(UIColor*)color; // default is [UIColor blackColor]
- + (void)setRingThickness:(CGFloat)width; // default is 4 pt
- + (void)setFont:(UIFont*)font; // default is [UIFont preferredFontForTextStyle:UIFontTextStyleSubheadline]
- + (void)setSuccessImage:(UIImage*)image; // default is bundled success image from Glyphish
- + (void)setErrorImage:(UIImage*)image; // default is bundled error image from Glyphish
- #pragma mark - Show Methods
- + (void)show;
- + (void)showWithMaskType:(SVProgressHUDMaskType)maskType;
- + (void)showWithStatus:(NSString*)status;
- + (void)showWithStatus:(NSString*)status maskType:(SVProgressHUDMaskType)maskType;
- + (void)showProgress:(float)progress;
- + (void)showProgress:(float)progress status:(NSString*)status;
- + (void)showProgress:(float)progress status:(NSString*)status maskType:(SVProgressHUDMaskType)maskType;
- + (void)setStatus:(NSString*)string; // change the HUD loading status while it's showing
- // stops the activity indicator, shows a glyph + status, and dismisses HUD 1s later
- + (void)showSuccessWithStatus:(NSString*)string;
- + (void)showErrorWithStatus:(NSString *)string;
- + (void)showImage:(UIImage*)image status:(NSString*)status; // use 28x28 white pngs
- + (void)setOffsetFromCenter:(UIOffset)offset;
- + (void)resetOffsetFromCenter;
- + (void)popActivity;
- + (void)dismiss;
- + (BOOL)isVisible;
- @end
- @interface SVIndefiniteAnimatedView : UIView
- @property (nonatomic, assign) CGFloat strokeThickness;
- @property (nonatomic, assign) CGFloat radius;
- @property (nonatomic, strong) UIColor *strokeColor;
- @end
|