@IBAction func onButton() { var message = "" for _ in 0..<1000 { message += "長い文言" } let alertController = UIAlertController(title: "aaa", message: message, preferredStyle: .alert) alertController.addAction(UIAlertAction(title: "button1", style: .default) { print($0) }) alertController.addAction(UIAlertAction(title: "button2", style: .default) { print($0) }) alertController.addAction(UIAlertAction(title: "cancel", style: .cancel) { print($0) }) present(alertController, animated: true, completion: nil) }