20

UIAlertController を作成しました

let alertC = UIAlertController(title: "Title", message: "Message", preferredStyle: UIAlertControllerStyle.Alert)
alertC.addTextFieldWithConfigurationHandler(addTextField)
alertC.addAction(UIAlertAction(title: "Cancel", style: UIAlertActionStyle.Default, handler: nil))
alertC.addAction(UIAlertAction(title: "OK", style: UIAlertActionStyle.Default, handler: okButton))
presentViewController(alertC, animated: true, completion: nil)

しかしその後、UIAlertController の高さを変更したいですか? これどうやってするの?

4

5 に答える 5

7

入力するメッセージがなかったので、メッセージ フィールドに「\n \n \n」の行を追加して、アラート コントローラの高さを長くしました。

于 2016-01-26T17:40:06.720 に答える