/SVStatusHUD

a copycat of the HUD shown on orientation and volume change in iOS.

Primary LanguageObjective-CMIT LicenseMIT

SVStatusHUD

SVStatusHUD mimics the HUD shown on orientation lock, mute and volume change on iOS. It should only be used in response to hardware or other important notifications (for instance when an accessory is detected by your app). If you’re just looking to show the progress or success of an operation, you should have a look at SVProgressHUD.


Glyph icons kindly provided by @jpmartineau for the sake of showing appropriate use cases.

SVStatusHUD features:

  • simple singleton convenience methods ([SVStatus method])
  • automatic styling of the image it’s provided
  • optional status string and showing duration
  • automatic positioning based on device type and orientation

Installation

  • Drag the SVStatusHUD/SVStatusHUD folder into your project.
  • Add the QuartzCore framework to your project.

If you plan on using SVStatusHUD in a lot of places inside your app, I recommend importing it directly inside your prefix file.

Usage

(see sample Xcode project in /Demo)

SVStatusHUD is created as a singleton (i.e. it doesn’t need to be explicitly allocated and instantiated; you directly call [SVStatusHUD method]) and can be shown using one of the following convenience/class methods:

+ (void)showWithImage:(UIImage*)image;
+ (void)showWithImage:(UIImage*)image status:(NSString*)string;
+ (void)showWithImage:(UIImage*)image status:(NSString*)string duration:(NSTimeInterval)duration;

Important: for crispier rendering, provided image should precisely be 86×86 pixels (retina: 172×172).

Automatic Reference Counting (ARC) support

Maintaining an official ARC branch has proven to be too much work, often leading to confusion since the ARC branch is always a few commits behind. If you’d like to use SVStatusHUD in your ARC-enabled project, you’ll have to add the -fno-objc-arc compiler flag to all of SVStatusHUD’s files.

Credits

SVStatusHUD is brought to you by Sam Vermette and contributors to the project. If you have feature suggestions or bug reports, feel free to help out by sending pull requests or by creating new issues. If you’re using SVStatusHUD in your project, attribution would be nice.