2016-06-13 10 views
0

私は、以下に示すように、いくつかのUIAlertActionsを持つUIAlertControllerを持っています。ユーザーは、「詳細を追加」アクションをクリックするとswiftを使用してUIAlertActionを通じて入力アクセサリビューを開く方法は?

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のようなチャットアプリで見るように)。

これを迅速に行うにはどうすればよいですか?

答えて

0

おそらくinputAccessoryViewのプロパティを探しています。 this tutorialを確認することができます。これを使用して、キーボードの上部に表示できる独自のビューを作成できます。

+0

私の質問は、どのようにしてアクセサリービューをuialertactionから呼び出すのですか? – user1246197

関連する問題