Closed alperkayabasi closed 4 years ago
[hud.button removeTarget:nil action:nil forControlEvents:UIControlEventAllEvents];
[hud.button removeTarget:nil action:nil forControlEvents:UIControlEventAllEvents];
Doesn't remove it.
Also have same issue
[hud.button removeTarget:nil action:nil forControlEvents:UIControlEventAllEvents];
不删除它。
也有同样的问题
You'll need to check if any of the other third-party libraries have added methods to their hud objects, and you'll want to use this method first:
hud. Button. Hidden = YES; [hud. Button removeTarget: nil action: nil forControlEvents: UIControlEventAllEvents];
If this method can not solve your problem, you can also use traverse all child controls of the hud object, find MBProgressHUDRoundedButton object, and then use : [button removeTarget: nil action: nil forControlEvents: UIControlEventAllEvents];
At present, I can think of only these two methods. If you have a better solution, I hope we can communicate with each other~
Thank You! hud. Button. Hidden = YES; seems to have done the trick. Not sure what is setting it to true in the first place :(
@roarapps The thing is, I don't know why we need to set button.hidden = YES in the first place. It should already be hidden if you don't set a target. And using that code means we need to keep a variable for every HUD we use.
That's not a great solution. I stopped using this framework for now.
This should be fixed now. See https://github.com/jdg/MBProgressHUD/issues/587.
I don't set a target or anything. Only code I called is [MBProgressHUD showHUDAddedTo:self.view animated:YES]