schmidyy/Loaf

completionHandler stopped working

64knl opened this issue · 1 comments

64knl commented

This example code from readme no longer works:

    Loaf("Loaf message", sender: self, completionHandler: {
        print("Dismissal complete")
    }).show()

Error messages in xCode:

  1. Argument 'completionHandler' must precede argument 'sender'
  2. Incorrect argument label in call (have ':completionHandler:sender:', expected ':state:sender:')

Hey, I should've posted an update. I've moved and renamed the completion handler in the 0.3.0.

A completion handler can now be specified in the show() function.

Loaf(example.rawValue, sender: self).show {
       print("Dismissed!")
}

I'll update the README accordingly 🙂