UIDatePicker为倒数计时器,带秒(Swift)

时间:2022-02-10 05:18:17

So, apple updated the timer app in IOS 11, and one of the most useful things they've done is add a seconds column in the countdown timer, like this: countdown timer

因此,苹果更新了IOS 11中的计时器应用程序,他们所做的最有用的事情之一是在倒数计时器中添加一个秒列,如下所示:倒数计时器

I am building an app for personal use and need to use the timer, but for intervals smaller than a minute, but on xcode I can't use the same date picker that Apple used. Is there a way to build one or to make the UIDatePicker look like that?

我正在构建一个供个人使用的应用程序,需要使用计时器,但对于小于一分钟的间隔,但在xcode上,我不能使用Apple使用的相同日期选择器。有没有办法构建一个或使UIDatePicker看起来像那样?

Note: I don't understand Objective-C

注意:我不了解Objective-C

1 个解决方案

#1


0  

You're looking for UIPickerView that helps you configure a UIDatePicker-like interface but with custom values to pick from.

您正在寻找UIPickerView,它可以帮助您配置类似UIDatePicker的界面,但可以选择自定义值。

#1


0  

You're looking for UIPickerView that helps you configure a UIDatePicker-like interface but with custom values to pick from.

您正在寻找UIPickerView,它可以帮助您配置类似UIDatePicker的界面,但可以选择自定义值。