Wouldn't it better to make the class a singleton so that there is only one instance. You would then just call functions:
SweetAlert.sharedInstance.showAlert("Here's a message!")
Just need the: static let sharedInstance = SweetAlert()
static let sharedInstance = SweetAlert()
and make the init() private.
init()
Very nice work, thanks!!
Activity