Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disabling user interaction not working in SVProgressHUD on iOS app

I've just downloaded SVProgressHUD and incorporated it into my project as explained in the github documentation page, but even if I wrote out [SVProgressHUD showWithMaskType:SVProgressHUDMaskTypeGradient];, it's not different from the default mask type, and when I tapped the screen while the cursor was revolving I got my app crashed - meaning I wasn't able to disable the user interaction feature since my app crashes before showing all of the table view cells there.

And note that clear or black mask type didn't work, either.

So how can I successfully disable the user interaction? And which file of the AppDelegate.m's applicationDidFinishWithLaunchingOptions: and FirstViewController.'s viewDidLoad: should I write the above code?

I use the latest version of the SVProgressHUD and use Xcode 5.1 and iOS 7.1. I also use ARC. Am I missing something?

[Update]

This was a bug issue and it has been resolved in the current version. Check it out on the Github page for the further info.

like image 829
Blaszard Avatar asked Nov 28 '22 21:11

Blaszard


2 Answers

This is very late to answer but just in case it can help someone because I was stuck with this issue for a while today. If you are using latest classes from github you won't face any issue but if you are using old classes then Replace below method from SVProgressHUD.m as below

+ (void)showWithStatus:(NSString *)status 
  {   
     [self setDefaultMaskType:SVProgressHUDMaskTypeGradient];
     [self showProgress:SVProgressHUDUndefinedProgress status:status];
  }
like image 127
Milan Gupta Avatar answered Dec 21 '22 22:12

Milan Gupta


I am using SVProgressHUD with swift and iOS 10.2 . Just setting mask type

In AppDelegate

SVProgressHUD.setDefaultMaskType(.black) works.

and every time you write

SVProgressHUD.show()

it will show the mask and userInteraction is managed by it.

like image 21
Bindiya Avatar answered Dec 21 '22 22:12

Bindiya