How to add date picker to UIAlertController(UIAlertView) in Swift?

前端 未结 2 501
北荒
北荒 2021-01-15 05:07

I have an application in which I need to display a popup to pick a date and write that date back to the view controller.

I have searched online a lot but wasn\'t suc

2条回答
  •  -上瘾入骨i
    2021-01-15 05:54

    Do not use any kind of UIAlertView or UIAlertController. Make your own view and pop it up (using, probably, a presented view controller). The view can be small, like an date picker, and you can put a shadow view behind it, like an alert does.

提交回复
热议问题