13
SwiftでUIAlertControllerにTextFieldを追加する方法
でを表示しようとしUIAlertControllerていUITextViewます。行を追加すると: //Add text field alertController.addTextFieldWithConfigurationHandler { (textField) -> Void in } 私が取得Runtimeエラー: 致命的なエラー:オプション値のアンラップ中に予期せずnilが見つかりました let alertController: UIAlertController = UIAlertController(title: "Find image", message: "Search for image", preferredStyle: .Alert) //cancel button let cancelAction: UIAlertAction = UIAlertAction(title: "Cancel", style: .Cancel) { action -> Void in //cancel code } alertController.addAction(cancelAction) //Create an optional action let …