I'm having trouble displaying an action sheet in an iMessage app I'm developing. The problem is that iMessage's input view partially covers the last option on the action sheet:
The code I'm using to display the alertViewController is pretty basic:
func displayCorrectAnswerSelect(_ viewModel: CreateQuestion.ViewModel) {
let alertController = UIAlertController(title: viewModel.info, message: nil, preferredStyle: .actionSheet)
viewModel.answers.enumerated().forEach({ (index, answer) in
let alertAction = UIAlertAction(title: answer, style: .default, handler: { (action) in
let request = QACreateQuestion.Request(question: nil, answers: nil, correctAnswerIndex: index)
self.output.updateAnswerModel(request)
})
alertController.addAction(alertAction)
})
present(alertController, animated: true, completion: nil)
}
I've tried enabling the Defines Context and Provides Context properties of the parent view controller, but that didn't help.
Has anyone encountered and managed to fix this issue? Any help would be appreciated :)