How do I create a number picker with a minimum and a maximum defined by a variable?
In my Android application, I created an AlertDialog with a picker number, and the maximum number is linked to a value from my database.
Is it possible to do the same thing in Swift, or something close to it?
My alert controller code is:
func createAlertCarte1(Title:String, Message:String) {
let alertCarte1 = UIAlertController(title: Title, message: Message, preferredStyle: UIAlertController.Style.alert)
alertCarte1.addAction(UIAlertAction.init(title: "Ok", style: UIAlertAction.Style.default, handler: { (action1) in
alertCarte1.dismiss(animated: true, completion: nil)
self.displayAd()
}))
alertCarte1.addAction(UIAlertAction.init(title: "Annuler", style: UIAlertAction.Style.cancel, handler: { (action1) in
alertCarte1.dismiss(animated: true, completion: nil)
}))
self.present(alertCarte1, animated: true, completion: nil)
}