Hide UIAlertView

Is there a way to hide the UIAlertView programmatically. I show the progress view in the mine, and when the progress view is 1.0, I want to hide the UIAlertView.

+3
source share
2 answers

What you can do is observe (using key observation) the attribute progressin your progress view, and then when it reaches 1.0, send a message dismissWithClickedButtonIndex:animated:to the alert view.

+7
source

I would use a UIActionSheet for this behavior. The user learns to manually disable the UIAlertView, and that just confuses them.

UIActionSheets are highly customizable to do whatever you need.

-2
source

Source: https://habr.com/ru/post/1718394/


All Articles