I added UIDatePicker in my storyboard, and set mode to CountDownTimer. It shows hours and minutes only, but what i need is minutes and seconds mode. I don't need hour column, need minute and seconds columns. I try to change interval, but it's minimum value is 1 minute. Is it possible? How can I do this?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
You can create a datasource for you minute-seconds picker. It has two Components: minute and seconds. You have to implement some methods in UIPickerViewDelegate
and UIPickerViewDataSource
Protocols.
Apple's sample code UICatalog.app is for your reference. You can find there is a sample for how to create a customized picker.