Giter Club home page Giter Club logo

svstatushud's Introduction

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.

svstatushud's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

svstatushud's Issues

Dismiss makeKeyAndVisible

The dismiss method looks at [UIApplication sharedApplication].windows.lastObject and calls makeKeyAndVisible on that object. The problem is that sometimes UIKit will throw a UITextEffectsWindow onto the stack. The problem? When dismissing this private object gets makeKeyAndVisible called. This results in any firstResponders on the actual UIWindow cease working. Text input on textfields and textviews stops working, etc.

My proposed fix, is to more intelligently decide which window object to makeKeyAndVisible. Perhaps filter out private objects such as UITextEffectsWindow when making this decision.

Duraition issue.

OK hey,

So there is this one issue i face with the duration method.

  • (void)showWithImage:(UIImage_)image status:(NSString_)string duration:(NSTimeInterval)duration;

here the duration is not being taken into account instead you are passing the

SVStatusHUDVisibleDuration

Thanks

Center position bug on iOS8

Hi, thanks for the nice library, the hud is not centered in landscape mode of iPad on iOS8, any idea to fix this?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.