UIAlertController - 更改文本字段的大小并在它们之间添加空格 [英] UIAlertController - change size of textfields and add space between them

查看:180
本文介绍了UIAlertController - 更改文本字段的大小并在它们之间添加空格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的提醒如下:

是否可以使输入更大并在它们之间增加空间?这是我的代码示例。我试图更改第二个textField的frame属性,但它没有帮助:

Is it possible to make inputs bigger and add space between them? Here is example of my code. I tried to change frame property of second textField but it didn't help:

let alert = UIAlertController(title: title, message: message, preferredStyle: .Alert)

// Add the textfields
alert.addTextFieldWithConfigurationHandler({ (textField) -> Void in
  textField.placeholder = "Vaše jméno"

})

alert.addTextFieldWithConfigurationHandler({ (textField) -> Void in
  textField.placeholder = "Společné heslo"

  var oldFrame = textField.frame
  oldFrame.origin.y = 40
  oldFrame.size.height = 60
  textField.frame = oldFrame
})


推荐答案

UIAlertController视图旨在简单且无法自定义。如果您制作自己的视图控制器,那么该视图属于您,您可以执行任何您喜欢的操作。

UIAlertController views are intended to be simple and not customizable. If you make your own presented view controller, then the view belongs to you and you can do anything you like.

这篇关于UIAlertController - 更改文本字段的大小并在它们之间添加空格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆