Gary
Gary

Reputation:

Hide UIAlertView

Is there a way to hide the UIAlertView programatically. I am displaying a progress view in mine and when the progress view is = 1.0 I want to hide the UIAlertView.

Upvotes: 3

Views: 4405

Answers (2)

Tim
Tim

Reputation: 60120

What you can do is observe (using key-value observing) the progress attribute in your progress view, then when it hits 1.0 send the dismissWithClickedButtonIndex:animated: message to the alert view.

Upvotes: 7

coneybeare
coneybeare

Reputation: 33101

I would use a UIActionSheet to do this kind of behavior. The user is trained to manually dismiss the UIAlertView and this would just confuse them.

UIActionSheets are highly customizable to do whatever you need.

Upvotes: -2

Related Questions