thellimist / EZAlertController

Easy Swift UIAlertController
MIT License
366 stars 50 forks source link

Use optionals for message #27

Open AlexGee17 opened 7 years ago

AlexGee17 commented 7 years ago

What do you think about using optionals in message?

It could look like so:

@discardableResult open class func alert(_ title: String, message: String?) -> UIAlertController { return alert(title, message: message ?? "", acceptMessage: "OK", acceptBlock: { // Do nothing }) }

thellimist commented 7 years ago

@goktugyil what do you think?

Esqarrouth commented 7 years ago

Makes sense

nissaba commented 5 years ago

The UIAlertController API does have optional string for both title and message, this should be reflected in the calls for the Wrapper.