Giter VIP home page Giter VIP logo

btprogresshud's Introduction

BTProgressHUD

If you have an issue, file it here, but also email me - [email protected] - or @fastchicken - as GitHub doesn't notify me! Thanks!.

Port to MonoTouch of the SVProgressHUD.

SVProgressHUD (and BTProgressHUD) is a clean and easy-to-use HUD meant to display the progress of an ongoing task.

SVProgressHUD

(Image from SVProgressHUD)

This is also available in the Xamarin Component Store.

If you need this for Xamarin.Android, redth has a very similar component

Now includes iOS7-style HUD if the app is running on iOS7

You can force iOS6 or iOS7 style in the IsiOS7 property in ProgressHUD.cs

##Installation

  • Grab the .cs files, and the images, and add them to your project.
  • Use it :)

##TODO

  • The progress HUD is not Accessability-aware, which would be very good to add. The ObjC code for this is still in the project, just commented out.

##Usage

Have a look at the BTProgressHUDDemo project.

There are a few main static methods, however:

BTProgressHUD.Show(); //shows the spinner
BTProgressHUD.Show(status: "Oh hai"); //show spinner + text
BTProgressHUD.ShowSuccessWithStatus("Wow, that worked"); //A big TICK with text
BTProgressHUD.ShowErrorWithStatus("Fail!"); //A big CROSS with text
BTProgressHUD.ShowToast("Hello from Toast"); //show an Android-style toast

All of these can be dismissed with

BTProgressHUD.Dismiss();

BTProgressHUD is aware of the thread you are calling from, and ensures that HUDs are always manipulated from the UI thread.

If you need to make your own instance of the HUD, you can make a new ProgressHUD.

###Other Show options

You can call Show with the following parameters

  • status: - show status text
  • progress: - show a progress circle with 0.0 - 1.0 of progress. Call again to change the progress.
  • maskType: <ProgressHUD.MaskType> - show with the background (the whole window) clear, black or gradient. Default is none, which allows interaction with the underlying elements.
public enum MaskType
{
	None = 1, // allow user interactions, don't dim background UI (default)
	Clear, // disable user interactions, don't dim background UI
	Black, // disable user interactions, dim background UI with 50% translucent black
	Gradient // disable user interactions, dim background UI with translucent radial gradient (a-la-alertView)
}

###ShowToast The toast can be centered or at the top or bottom of the screen. This is controlled by the second parameter.

BTProgressHUD.ShowToast("foo", toastPosition: ProgressHUD.ToastPosition.Center);

###ShowSuccess/Error/ShowImage This method dismisses the activity after 1 second. You can provide your own images if needed - make them 28x28 white PNGs.

BTProgressHUD.ShowSuccessWithStatus("Wow, that worked"); //A big TICK with text
BTProgressHUD.ShowErrorWithStatus("Fail!"); //A big CROSS with text
BTProgressHUD.ShowImage(UIImage.FromFile(), "Nice one Stu!");

You can use the timeout parameter of ShowImage to control the time before it's dismissed.

Credits

SVProgressHUD is brought to you by Sam Vermette and contributors to the project. The success and error icons are from Glyphish. 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 SVProgressHUD in your project, attribution would be nice.

BTProgressHUD is brought to you by Nic Wise. I'm also happy to take bug reports and pull requests for the MonoTouch version. If you use BTProgressHUD in your project, attribution would also be nice - or tweet me a link to your project when it's live.

Thanks to

for the updates / fixes.

btprogresshud's People

Contributors

ansuria avatar danmiser avatar dannycabrera avatar gshackles avatar jonlipsky avatar mloenow avatar nicwise avatar orand avatar redth avatar robert-waggott avatar

Watchers

 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.