squimer / DatePickerDialog-iOS-Swift

Date picker dialog for iOS
MIT License
581 stars 177 forks source link

Added showCancelButton dialog option #55

Closed misteral closed 7 years ago

misteral commented 7 years ago

Hi, in my case 'Cancel' button not useful. Created optional flag in the class init.

lfarah commented 7 years ago

Hey @misteral, thanks for the PR, really! 👍 Can you update the README, showcasing this new method?

lfarah commented 7 years ago

@squimer what do you think?

viniciussoares commented 7 years ago

Thanks @misteral, i'll take a look tomorrow.

In the mean time... This pull request made me wonder, do you guys think is a good idea to move all the parameters to variables and add a delegate? It would look more like how the default components behave.

Something like:

let datePicker = DatePicker()
datePicker.title = "Pick your date"
datePicker.defaultDate = Date()
datePicker.mode = .dateAndTime
datePicker.delegate = self
datePicker.show()
misteral commented 7 years ago

@lfarah, thanks, welcome. README was updated in PR, please describe if any additionals is necessary.

lfarah commented 7 years ago

@viniciussoares please merge if you also approve

lfarah commented 7 years ago

@viniciussoares we could add Delegation.... Please open an issue regarding this