Giter Club home page Giter Club logo

svprogresshud's Introduction

SVProgressHUD

Pod Version Pod Platform Pod License SwiftPM compatible CocoaPods compatible Carthage compatible

SVProgressHUD is a clean and easy-to-use HUD meant to display the progress of an ongoing task on iOS and tvOS.

SVProgressHUD

Installation

Swift Package Manager

Swift Package Manager (SwiftPM) is a tool for managing the distribution of Swift code. It simplifies the process of managing Swift package dependencies.

To integrate SVProgressHUD into your project using SwiftPM:

  1. In Xcode, select File > Add Package Dependency.
  2. Enter the following package repository URL: https://github.com/SVProgressHUD/SVProgressHUD.git
  3. Choose the appropriate version (e.g. a specific version, branch, or commit).
  4. Add SVProgressHUD to your target dependencies.

SVProgressHUD requires at least Swift tools version 5.3.

From CocoaPods

CocoaPods is a dependency manager for Objective-C, which automates and simplifies the process of using 3rd-party libraries like SVProgressHUD in your projects. First, add the following line to your Podfile:

pod 'SVProgressHUD'

If you want to use the latest features of SVProgressHUD use normal external source dependencies.

pod 'SVProgressHUD', :git => 'https://github.com/SVProgressHUD/SVProgressHUD.git'

This pulls from the master branch directly.

Second, install SVProgressHUD into your project:

pod install

Carthage

Carthage is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks. To integrate SVProgressHUD into your Xcode project using Carthage, specify it in your Cartfile:

github "SVProgressHUD/SVProgressHUD"

Run carthage bootstrap to build the framework in your repository's Carthage directory. You can then include it in your target's carthage copy-frameworks build phase. For more information on this, please see Carthage's documentation.

Manually

  • Drag the SVProgressHUD/SVProgressHUD folder into your project.
  • Take care that SVProgressHUD.bundle is added to Targets->Build Phases->Copy Bundle Resources.
  • Add the QuartzCore framework to your project.

Swift

Even though SVProgressHUD is written in Objective-C, it can be used in Swift with no hassle.

If you use CocoaPods add the following line to your Podfile:

use_frameworks!

If you added SVProgressHUD manually, just add a bridging header file to your project with the SVProgressHUD header included.

Usage

(see sample Xcode project in /Demo)

SVProgressHUD is created as a singleton (i.e. it doesn't need to be explicitly allocated and instantiated; you directly call [SVProgressHUD method] / SVProgressHUD.method()).

Use SVProgressHUD wisely! Only use it if you absolutely need to perform a task before taking the user forward. Bad use case examples: pull to refresh, infinite scrolling, sending message.

Using SVProgressHUD in your app will usually look as simple as this.

Objective-C:

[SVProgressHUD show];
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
    // time-consuming task
    dispatch_async(dispatch_get_main_queue(), ^{
        [SVProgressHUD dismiss];
    });
});

Swift:

SVProgressHUD.show()
DispatchQueue.global(qos: .default).async {
    // time-consuming task
    DispatchQueue.main.async {
        SVProgressHUD.dismiss()
    }
}

Showing the HUD

You can show the status of indeterminate tasks using one of the following:

+ (void)show;
+ (void)showWithStatus:(NSString*)string;

If you'd like the HUD to reflect the progress of a task, use one of these:

+ (void)showProgress:(CGFloat)progress;
+ (void)showProgress:(CGFloat)progress status:(NSString*)status;

Dismissing the HUD

The HUD can be dismissed using:

+ (void)dismiss;
+ (void)dismissWithDelay:(NSTimeInterval)delay;

If you'd like to stack HUDs, you can balance out every show call using:

+ (void)popActivity;

The HUD will get dismissed once the popActivity calls will match the number of show calls.

Or show an image with status before getting dismissed a little bit later. The display time depends on minimumDismissTimeInterval and the length of the given string.

+ (void)showInfoWithStatus:(NSString*)string;
+ (void)showSuccessWithStatus:(NSString*)string;
+ (void)showErrorWithStatus:(NSString*)string;
+ (void)showImage:(UIImage*)image status:(NSString*)string;

Customization

SVProgressHUD is designed with flexibility in mind, providing a myriad of customization options to fit the look and feel of your application seamlessly.

  • Appearance: Make use of the UI_APPEARANCE_SELECTOR to adjust styles, colors, fonts, size, and images app-wide.
  • Behavior: Control visibility durations, display delays, and animation speeds.
  • Feedback: Enhance the user experience with options for haptic feedback and motion effects.

For a comprehensive list of properties and detailed explanations, refer to the SVProgressHUD.h file in the API documentation.

Hint

As standard SVProgressHUD offers three preconfigured styles:

  • SVProgressHUDStyleAutomatic: Automatically switch between the light and dark style
  • SVProgressHUDStyleLight: White background with black spinner and text
  • SVProgressHUDStyleDark: Black background with white spinner and text

If you want to use custom colors use setForegroundColor: and/or setBackgroundColor:. These implicitly set the HUD's style to SVProgressHUDStyleCustom.

Haptic Feedback

Available on iPhone 7 and newer, SVProgressHUD can automatically trigger haptic feedback depending on which HUD is being displayed. The feedback maps as follows:

  • showSuccessWithStatus: <-> UINotificationFeedbackTypeSuccess
  • showInfoWithStatus: <-> UINotificationFeedbackTypeWarning
  • showErrorWithStatus: <-> UINotificationFeedbackTypeError

To enable this functionality, use setHapticsEnabled:.

Notifications

SVProgressHUD posts four notifications via NSNotificationCenter in response to being shown/dismissed:

  • SVProgressHUDWillAppearNotification when the show animation starts
  • SVProgressHUDDidAppearNotification when the show animation completes
  • SVProgressHUDWillDisappearNotification when the dismiss animation starts
  • SVProgressHUDDidDisappearNotification when the dismiss animation completes

Each notification passes a userInfo dictionary holding the HUD's status string (if any), retrievable via SVProgressHUDStatusUserInfoKey.

SVProgressHUD also posts SVProgressHUDDidReceiveTouchEventNotification when users touch on the overall screen or SVProgressHUDDidTouchDownInsideNotification when a user touches on the HUD directly. For these notifications userInfo is not passed but the object parameter contains the UIEvent that related to the touch.

App Extensions

When using SVProgressHUD in an App Extension, #define SV_APP_EXTENSIONS to avoid using unavailable APIs. This will be done automatically when using the AppExtension CocoaPods subspec. Additionally, call setViewForExtension: from your extensions view controller with self.view.

Contributing to this project

If you have feature requests or bug reports, feel free to help out by sending pull requests or by creating new issues. Please take a moment to review the guidelines written by Nicolas Gallagher:

License

SVProgressHUD is distributed under the terms and conditions of the MIT license. The success, error and info icons used on iOS 12 are made by Freepik from Flaticon and are licensed under Creative Commons BY 3.0.

Privacy

SVProgressHUD does not collect any data. A privacy manifest file is provided.

Credits

SVProgressHUD is brought to you by Sam Vermette, Tobias Totzek and contributors to the project. If you're using SVProgressHUD in your project, attribution would be very appreciated.

svprogresshud's People

Contributors

asenchuk avatar danielamitay avatar daviscdev avatar gcamp avatar georgbachmann avatar getaaron avatar golergka avatar honkmaster avatar inamiy avatar jessesquires avatar jparise avatar julienp avatar juliensaad avatar justin avatar kaspik avatar kirbyt avatar lapfelix avatar lumaxis avatar maquannene avatar mbigatti avatar michaellyst avatar michaelnew avatar muteq avatar myell0w avatar ndpiparava avatar oddanderson avatar samvermette avatar tmu avatar vortec4800 avatar vtourraine avatar

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  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

svprogresshud's Issues

HUD does not appear when showWithStatus: is in the same function as dismiss

Hi all,
I am facing a very strange problem, here is an excerpt of my code:

  • (void)doSomething {
    [SVProgressHUD showWithStatus:@"Downloading..."];
    sleep(2);
    [SVProgressHUD dismiss];
    }

Why does the HUD appear only AFTER the 2 seconds passed, and then it suddenly disappears?
It seems to me that this is due to the fact the both showWithStatus and dismiss are in the same function.

Any ideas?

Delay before showing

Is there anyway to specify a minimum delay before the HUD gets displayed? We have some operations that can finish very quickly, and it becomes distracting to show the HUD until at least 100ms or more.

iVars over released in memoryWarning:

sharedView is released in memoryWarning:, resulting in hudView, stringLabel, imageView and spinnerView being release in dealloc. When they are released again in memoryWarning:, the app crash.

recursive dealloc ?

Im getting a recursive dealloc in SVProgressHud, after some investigation i found out that

in dealloc [sharedView release] is called and when cheking where

self and sharedView "pointed" they were the same

static SVProgressHUD *sharedView = nil;

showInView

Will we have the showInView methods back ?
Last update just broke my project since i was relying on them to show progress spinners in some views

Bug: Memory management incorrect.

Hey Sam, first of all - I just found your library and gotta say I really like it :) It just "feels" better than the others. Simple as :)

Sadly I haven't had time to read through the code yet but what I found is this:

2012-01-02 23:44:56.090 SVProgressHUDTest[2265:707] *** -[UIWindow release]: message sent to deallocated instance 0x1f6260

Here's the backtrace:

(gdb) bt
#0  0x3801c8a0 in ___forwarding___ ()
#1  0x37f77680 in __forwarding_prep_0___ ()
#2  0x00007c40 in __24-[SVProgressHUD dismiss]_block_invoke_0149 (.block_descriptor=, finished=1 '\001') at /Volumes/Development/nehira.com/SVProgressHUD/SVProgressHUD/SVProgressHUD.m:457
#3  0x353ed0be in -[UIViewAnimationBlockDelegate _didEndBlockAnimation:finished:context:] ()
#4  0x353e781a in -[UIViewAnimationState sendDelegateAnimationDidStop:finished:] ()
#5  0x353ecfb8 in -[UIViewAnimationState animationDidStop:finished:] ()
#6  0x33795ba6 in CA::Layer::run_animation_callbacks ()
#7  0x37cd7f7a in _dispatch_main_queue_callback_4CF$VARIANT$mp ()
#8  0x37fed2dc in __CFRunLoopRun ()
#9  0x37f704dc in CFRunLoopRunSpecific ()
#10 0x37f703a4 in CFRunLoopRunInMode ()
#11 0x37aeefcc in GSEventRunModal ()
#12 0x35400742 in UIApplicationMain ()
#13 0x00002802 in main (argc=1, argv=0x2fdffad0) at /Volumes/Development/nehira.com/SVProgressHUDTest/SVProgressHUDTest/main.m:15

What I can see so far:I wouldn't recommend calling release on a property. This can result in unexpected behavior. On a sidenote, that's where it crashes:
Line 457: [self.overlayWindow release];

How to replicate it:
Well,... I just went mental and tapped the button which triggers my showInView: a bazillion times in a row :) What's the special thing about my case? Somewhere in between my delegate call (which is triggered if an asynchronous request finishes) will attempt to dismiss the HUD again. -> Crash.

As said I haven't had the time to go over the code yet (as I'm using it for what it is :) - out of the box) what I'd do first and foremost though is this:
http://cocoasamurai.blogspot.com/2011/04/singletons-your-doing-them-wrong.html

If I have some time these days I'll do a fork and fix this stuff and send you a pull but at the moment I don't have much of it sorry :|

Status HUD

Hi there,

do you have plans to extend SVProgressHUD to more then showing a progress? I know, the name says otherwise, but it would be very useful to be able to show status messages and the like in such an easy way.

What I suggest (for SVStatusHUD ;))

  1. Allow to show a status message without icon/activityIndicator
  2. Allow to show a status message with a custom icon
  3. Allow to show only a custom icon (like when you mute the phone)
  4. Add possibility to autohide the hud after a predefined time

I don't know if this is outside the scope of this project but it is what I do manually at the moment and think is really useful.

Thanks,
Shukuyen.

Custom image support

Hi Sam, I love what you've done with this project.

I am 100% behind your anti-bloat goal. However one change that would be awesome is the ability to specify a custom image (of any size) and have the HUD display it. I needed this in a project of mine, and had to use MBProgressHUD (blech) instead because of this.

get EXC_BAD_ACCESS in line 171

of SVProgressHUD.m on line:
[[NSNotificationCenter defaultCenter] addObserverForName:UIKeyboardWillHideNotification object:nil queue:nil usingBlock:^(NSNotification *notification) {

I did everything like in the demo...

HUD position when dismissing keyboard

I'm using a Search Display Controller and showing the HUD when a user performs a search, so it's essentially called in searchDisplayControllerDidEndSearch. I guess this is called before the keyboard is fully dismissed, but the HUD stays at the upper half of the screen. Any workaround?

Support for all orientations?

First: Thanks for a great, small and easy to use class!

I might do something wrong, but I get the impression that the HUD is always displayed in Portrait mode.

I'd love to have it drawn in the orientation that the device is currently in.

Ps. and multi-line text would be nice too.. Ds.

Janne

App Crash after HUD dismiss

Platform: iOS 4.3 Simulator

In Debug Window:

warning: Unable to restore previously selected frame.
Current language: auto; currently objective-c
warning: Unable to restore previously selected frame.

Error point of the file:

  • (void)dealloc {

    if(fadeOutTimer != nil)
    [fadeOutTimer invalidate], [fadeOutTimer release], fadeOutTimer = nil;

    [[NSNotificationCenter defaultCenter] removeObserver:self]; <<<<<===== This Line is error point.

    [sharedView release]; <<<<<===== Remove this line will be ok.
    [hudView release];
    [stringLabel release];
    [imageView release];
    [spinnerView release];

    [super dealloc];
    }

It's worked fine in iOS5.

Landscape issue with UIDevice orientation

I was getting an incorrect background view showing the spinner (not covering all the view)

after some investigation i found out that UIInterfaceOrientationIsLandscape([[UIDevice currentDevice] orientation]) doesn't always give correct results: http://bynomial.com/blog/?p=25 it seems to give the device orientation and not the interface so i've changed it to the way three20 checks for landscape and works like a charm now:

UIDeviceOrientation orient = [UIApplication sharedApplication].statusBarOrientation;
if (UIDeviceOrientationUnknown == orient) {
return UIDeviceOrientationPortrait;

} else {
return orient;
}

Doesn't play well with UIMenuController under iOS 5.1(b)

Heads-up. Under iOS 5.1b, once the HUD has appeared and then disappeared, invocations elsewhere in the UI of UIMenuController will fail (ie the menu will simply not appear), both in custom views but also in system-standard text views.

It's something to do with the interactions in window ordering, though I'm not sure whether it's a beta-only bug that Apple's introduced, or whether this is going to be a production problem. I'm not well enough versed in the UIWindow stuff to understand what's happening exactly, but possibly the UIMenuController lives on its own window and that's getting shuffled behind when the HUD dismisses?

Opening another modal view controller (e.g. the mail compose controller, or any custom form sheet, etc) "clears" the condition and the menu will function again.

Workaround: If I turn the HUD into a UIView subclass (rather than UIWindow) and simply add it as a subview to my current known window, I find it no longer exhibits this interaction.

Applications are expected to have a root view controller at the end of application launch while using SVProgressHUD

Hi,
An awesome work. In recent application[IOS 5, using StoryBoard] of mine while using the HUD I experienced a strange error[Applications are expected to have a root view controller at the end of application launch] in my debugger and probably that could be a reason that the HUD isn't visible in the initial scene. Although it is visible in other views of my application. I have set my Info.Plist correctly and have set an initial view too.

Thanks.

Any plans for a download progress indicator?

...like MBProgressHUD?

I really like the singleton idea, but I'm sticking with MBProgressHUD for now due to the progress indicator it provides.

Maybe you could implement something like:

[SVProgressHUD showInView:self.view status:@"Doing Stuff" indicatorType:SVProgressHUDProgress];

Then send it messages like:

[SVProgressHUD setProgress:0.2f];

and then finally, once your application is done downloading the content form the web:

[SVProgressHUD dismissWithSuccess:@"Download Complete"];

Thoughts?

hud not shown until method next view controller pushed

I have something like this:

-(IBAction)longProcess
{
[SVProgressHUD showWithMaskType:SVProgressHUDMaskTypeClear networkIndicator:NO];
[self takeLongTime]
[self.navigationController pushViewController:viewController animated:YES];
}

And the hud is dismissed by the navigationController delegate with

  • (void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated
    {
    [SVProgressHUD dismiss];
    }

However, when do (IBAction)longProcess, the hud doesn't show. A split second before viewController is pushed, I see the hud appear and disappear.

Crash when showWithStatus method immediately after dimiss method

Hi,
It'll crash when i invoke showWithStatus method immediately after a dismiss method.

For example:
[SVProgressHUD showWithStatus:@"test"];
[SVProgressHUD dismiss];
[SVProgressHUD showWithStatus:@"test"];

it will not crash when i comment out the line 426 in SVProgressHUD.m
// [bSelf release], bSelf = nil;

Please have a look at it.

I really like SVProgressHUD because it is simple and neat.
Thanks for your efforts.

Redbug.

The Demo programe can not be compiled by LLVM GCC 4.2?

The Demo programe can not be compiled by LLVM GCC 4.2?
when LLVM GCC 4.2 was used to compier the demo source. it was failed in the source:

file:SVProgressHUD.m
function: - (void)dismiss{}
line:461

error message:Incompatible block poiner types initializing ....

many thanks!

optional hide on tab

Have you considered adding a optional hide on tap feature to the hud?
It would be cool combined with a delegate method firing when the user tabs it and it hides (for example to cancel downloading).

calling from outside the viewcontroller

I'm sure its a simple answer but I can't seem to figure out how to call progressHud from outside the view controller, Say like in an outside class, I have various downloading methods and I'd like to call PH from there instead of setting up various NSNotifications.

Calling show in landscape on ipad with keyboard showing causes HUD to position wrong.

If the keyboard is showing when you call show in landscape on the iPad the HUD positions wrong and is hidden behind the keyboard.

Seems to only happen on iOS 5.

In my test I am inside of a tab bar controller (not sure if this matters). The keyboard is visible before calling show. The HUD repositions correctly when I dismiss the keyboard however the animation to get there looks a little funny.

Let me know if you can't reproduce and I will try to isolate what about my setup is causing this.

HUD not appear when it's called

Hello,

I'm not sure but I think to have find an issue. Indeed, when I called [SVProgressHUD show]; the network indicator is active, but I haven't the HUD on the screen.

You can see the project here : https://github.com/Supinfo-AppleLab-Paris/VelibMobil/blob/master/VelibMobil/ViewController.m

  • (void)stationsDidStartLoad:(Velib *)velib {
    NSLog(@"Start update stations list");
    [SVProgressHUD showWithMaskType:SVProgressHUDMaskTypeGradient];
    }

Thank you :-) (and thank you again for this framework.)

Timing problems

I noticed 2 problems related to root view controller, not sure if these are common since Googling for them didn't produce anything fruitful.

  1. You can only show HUD once the root view appears. (eg: calling show on viewDidLoad doesn't work)
  2. If HUD is showing and then you dismiss it in the same code block where you swap root view controller, it'll break because dismiss tries to hide the HUD after a delay (and by then the new root view no longer has the HUD view)

Thanks!

iOS 5 - StoryBoards - Not loading from ViewDidLoad

Sample Project Here: http://dl.dropbox.com/u/2453081/ViewTests.zip

Storyboard with Tab Bar Controller. HUD doesn't show when called from ViewDidLoad. But Network indicator is going, so it's obviously been called.

If you switch tabs the second tab runs the HUD fine from ViewDidLoad, and if you switch back to the Initial Tab the HUD is displaying.

Doesn't seem to be anything I've done wrong in the way I've implemented it, so wondering if it's a bug with StoryBoards or something. Googling didn't turn up much.

Thanks.

SVProgressHUD causes UIWebView to not respond to input touch

I had an issue, where loading a webpage to UIWebView and then touching an input field wouldn't show the keyboard. After a couple of days of debugging, seems commenting out SVProgressHUD fixed the issue.

I'm not sure what it is that would cause SVProgressHUD to disable the keyboard for UIWebView, but that seems to be the situation

http://stackoverflow.com/questions/9340959/uiwebview-doesnt-show-keyboard-when-focusing-on-text-field-on-the-second-load/9376135#9376135

HUD does not appear when i change the view's background color

If i change the background color of my view the HUD does not show at all.

Example:

// WORKS
- (void)viewDidLoad
{
    [super viewDidLoad];

    [SVProgressHUD showWithStatus:NSLocalizedString(@"Message", nil)];
}
// DOES NOT WORKS:
- (void)viewDidLoad
{
    [super viewDidLoad];

    [self.view setBackgroundColor:[UIColor whiteColor]];
    [SVProgressHUD showWithStatus:NSLocalizedString(@"Message", nil)];
}

The Activityindicator shows, but the HUD is not showing at all.

Any tips?

AutoRotation

I have called the [SVProgressHUD showWithStatus] method on an auto-rotatable view which is a subview of a UITabBarController.

While the view and tabbarcontroller rotate, the HUD doesn't.

The UITabBarController is the root controller for the project, and it and all subviews are set to autorotate to all directions, if that makes a difference.

Cheers

Mart

[SVProgressHUD show] not work in Tabbar+NavigationBar

I try to use

[SVProgressHUD showWithMaskType:SVProgressHUDMaskTypeBlack networkIndicator:YES];

and it's not working.

I am using UITabbarController and UINavigationBarController also.

When I use with

[SVProgressHUD showInView:self.view status:nil networkIndicator:SVProgressHUDShowNetworkIndicator posY:-1 maskType:SVProgressHUDMaskTypeBlack];

it's work. I can click UINavigationbar and tabbar when loading.

Allow a different way to disable the default network activity indicator

Right now you can disable the network activity indicator control by setting a define in the header file. However since I import SVProgressHUD directly using git submodules, this isn't an ideal solution; if I modify the header file the submodule is marked as dirty, making it hard to keep the repository clean and update SVProgressHUD cleanly.

Could you support an alternate way of disabling it? Either a class method to disable it by default, or moving the declaration to the implementation file and allowing it to be set with an ifdef like so:

// To disable SVProgressHUD's control of the network activity indicator by default,
// add -DSVHUD_DISABLE_NETWORK_INDICATOR to CFLAGS.
#ifdef SVHUD_DISABLE_NETWORK_INDICATOR
#define SVProgressHUDShowNetworkIndicator 0
#else
#define SVProgressHUDShowNetworkIndicator 1
#endif

presentViewController with [SVProgressHUD dismiss]

When I called

[SVProgressHUD dismiss];

in presentView controller , the previous ViewController is appear and current presentViewController is lost.

I checked your code and I found

[[UIApplication sharedApplication].windows.lastObject makeKeyAndVisible];

I commented it and it's working fine for me.

UIWindow issue

Hi,

I had a problem when I wanted to show SVProgressHUD in some cases. Eventually in this part of the code:

    NSArray *keyWindows = [UIApplication sharedApplication].windows;
    UIWindow *keyWindow = [keyWindows lastObject];

The keyWindow is set to "_UIAlertOverlayWindow" and the the behavior of the SVProgressHUD is wrong (it showes and hides too fast). I've fixed with:

    UIWindow *keyWindow = nil;
    if ([keyWindows count] != 0) {
        keyWindow = [keyWindows objectAtIndex:0];
    }

Is it a problem?

Thank you!

maskType not working.

If I display a progessHUD without the maskType defined and thereafter dismiss it. When I try to display another progressHUD, this time round with maskType defined, it would not work. The UI is blocked but there's no dimming of the background.

Doesn't dismiss after n seconds...

Here's a strange one: when i call [SVProgressHud dismiss] it disappears, but when i use [SVProgressHUD dismissWithError:[NSString stringWithFormat:@"blahblahblah"] afterDelay:2.0]; it just stays.

I'm using it in a UITabBarController ARC-enabled application, on a view with a UINavigationController and dismiss it with delay in an AFNetworking completion block.

I've downloaded the latest build, just saying.

Could anybody please help?

Show network indicator ignored

It looks like all the calls through the convenience methods end up in showInView:status:networkIndicator:posY:maskType: where the value of show seems to be ignored. Instead [UIApplication sharedApplication].networkActivityIndicatorVisible = YES; is executed. Seems like that isn't right...

[Request] make spinnerView visibility optionnal

today, that's not possible to hide the spinnerview, to use HUD to display simple message...
is it possible to add a parameter, or a method which will permit to display a message without the spinnerview ?

check isloading or not

Is it possible to check SVProgressHUD is showing or not before call to dismiss function ?

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.