Manière élégante de passe vide fermetures en Swift

Dans Swift, je dois souvent passer un noop fermeture d'une méthode juste pour se conformer à la méthode de paramètres (arité). Dans le bon vieux temps de l'Obj C, on pourrait passer nil pour un noop de rappel et être fait avec elle. Est-il plus rapide façon plus élégante de le faire dans Swift sans passer par un bloc vide comme ci-dessous?

UIAlertAction(title: "Ok", style: UIAlertActionStyle.Default, handler: { (UIAlertAction) -> Void in }) //do nothing in callback

Exemple complet:

import UIKit

class UIAlertControllerFactory {
    class func ok(title: String, message: String) -> UIAlertController {
        var alertController = UIAlertController(title: title, message: message, preferredStyle: UIAlertControllerStyle.Alert)
        var okAction = UIAlertAction(title: "Ok", style: UIAlertActionStyle.Default, handler: { (UIAlertAction) -> Void in
        })
        alertController.addAction(okAction)
        return alertController
    }
}

OriginalL'auteur dimroc | 2014-10-04