1
時間の入力を求めるポップアップが必要です。私はalertviewが行く方法だと思っていましたが、時刻選択ツールをalertviewに埋め込む場所をどこにはわからないのです。UIAlertViewの時間ピッカー
これを行うより良い方法がないかぎりですか?誰のために
時間の入力を求めるポップアップが必要です。私はalertviewが行く方法だと思っていましたが、時刻選択ツールをalertviewに埋め込む場所をどこにはわからないのです。UIAlertViewの時間ピッカー
これを行うより良い方法がないかぎりですか?誰のために
、私はそうのような時間ピッカーであることをコメントで質問を適応:
let vc = UIViewController()
vc.preferredContentSize = CGSize(width: 250,height: 300)
let pickerView = UIDatePicker(frame: CGRect(x: 0, y: 0, width: 250, height: 300))
vc.view.addSubview(pickerView)
let editRadiusAlert = UIAlertController(title: "Choose ETA", message: "", preferredStyle: UIAlertControllerStyle.alert)
editRadiusAlert.setValue(vc, forKey: "contentViewController")
editRadiusAlert.addAction(UIAlertAction(title: "Set ETA", style: .default, handler: nil))
editRadiusAlert.addAction(UIAlertAction(title: "Cancel", style: .cancel, handler: nil))
self.present(editRadiusAlert, animated: true)
しかしそのコピーが私の答えthatsなぜupvote –
あなたは 'AlertController'で' datePicker'を追加することができ、このようにhttpのようにしてみてください:// stackoverflowの。 com/a/40191156/6433023 –
[pickerViewボタンアクションを使用した[swift UIAlertController]の重複の可能性があります(http://stackoverflow.com/questions/40190629/swift-uialertcontroller-with-pickerview-button-action-stay-up) –