Giter Site home page Giter Site logo

edovia / svstatushud Goto Github PK

View Code? Open in Web Editor NEW

This project forked from samvermette/svstatushud

0.0 4.0 0.0 100 KB

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

Home Page: http://samvermette.com/309

License: MIT License

Objective-C 100.00%

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

Contributors

ocollet avatar samvermette avatar

Watchers

 avatar  avatar  avatar  avatar

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.