0

I have created a UIAlertController with two text fields, it turned out like this:

screenshot of alert controller

Is it possible to create some space between them without creating my own pop up view controller?

This is my code:

let alert = UIAlertController(title: "Please enter Dish description and price", message: "", preferredStyle: .alert)
    alert.addTextField(configurationHandler: desc)
    alert.addTextField(configurationHandler: price)
Tamás Sengel
  • 55,884
  • 29
  • 169
  • 223
H.Epstein
  • 721
  • 1
  • 7
  • 26
  • 1
    You need to create your own if you wish to customize its appearance. – rmaddy Oct 18 '18 at 15:50
  • `UIAlertController` is that what it is – with a very few options to customise it. – holex Oct 18 '18 at 15:55
  • As others mentioned you need to create a custom alertcontroller. Take a look at this tutorial https://medium.com/if-let-swift-programming/design-and-code-your-own-uialertview-ec3d8c000f0a – lionserdar Oct 18 '18 at 16:03
  • Hi maybe consider this, really cool PopupDialog and easy to use: https://github.com/Orderella/PopupDialog – ValW Oct 18 '18 at 16:10
  • I'll consider using that, Thanks. – H.Epstein Oct 18 '18 at 16:28
  • Possible duplicate of [UIAlertController - change size of textfields and add space between them](https://stackoverflow.com/questions/33787115/uialertcontroller-change-size-of-textfields-and-add-space-between-them) – Tamás Sengel Oct 18 '18 at 16:32
  • You are correct I tried to find similar question but couldn't find it. Thanks – H.Epstein Oct 18 '18 at 16:37

0 Answers0