Home Features Docs Blog Support GitHub

UIAlertAction handler

    UIAlertController alertController = UIAlertController.alertControllerWithTitleMessagePreferredStyle(title,
            message, UIAlertControllerStyle.Alert);

    UIAlertAction okay = UIAlertAction.actionWithTitleStyleHandler("Okay",UIAlertViewStyle.Default,{calledOnAlert(alertInterface)}); ===> Handler 

    alertController.addAction(okay);
    this.presentViewControllerAnimatedCompletion(alertController, true, null);

I want to add a function in handler of UIalertAction? Please guide me.

UIAlertAction.actionWithTitleStyleHandler("Okay", UIAlertActionStyle.Default, action ->
{
    do_something();
});
1 Like

Thanks. It really help