我的代碼中是這樣的:的UIImage用的UITextField重疊的UIAlertController
let alert = UIAlertController(title: "title", message: "alert", preferredStyle: UIAlertControllerStyle.Alert)
let image_view = UIImageView(frame: CGRectMake(70, 10, 200, 200))
image_view.image = UIImage(named: "logo")
alert.view.addSubview(image_view)
alert.addTextFieldWithConfigurationHandler { textField in textField.placeholder = "a textfield"
alert.addTextFieldWithConfigurationHandler { textField in textField.placeholder = "another textfield" }
然而,這導致我與UITextFields標誌重疊。我如何確保它們整齊地堆疊在一起?
您沒有設置文本框的框架來設計您的自定義報警控制器。 – Anuraj