Peacemoon
Peacemoon

Reputation: 3318

Dynamic buttons in UIAlertController (iOS 8)

I try to create and remove buttons on UIAlertController (with action sheet style) dynamically. I can create the UIAlertController and add button to it. No i want to clear all buttons and add other buttons but couldn't find any method to clear the buttons. Anyone has experiences with this?

Upvotes: 1

Views: 611

Answers (1)

Greg
Greg

Reputation: 9168

Simply create a new UIAlertController with your new set of buttons, then present it immediately after dismissing the first one. You can play around with the options for animations and UIViewControllerTransitioning if you're not happy with the default animations.

Upvotes: 1

Related Questions