我有UIAlertController
一些UIAlertActions
,如下所示。
let alertController = UIAlertController(title: nil, message : nil, preferredStyle: .ActionSheet)
let addMoreAction = UIAlertAction(title: "Add more", style: .Default) { (action) in
// Want to be able to call an input accessory view from here
}
alertController.addAction(addMoreAction)
self.presentViewController(alertController, animated: true, completion: nil)
当用户单击“添加更多”操作时,它应该关闭UIAlertController
并打开键盘,并在键盘UITextView
顶部附加一个。(就像您在 Facebook Messenger 等聊天应用程序中看到的那样)。
如何使用 swift 实现这一目标?