0

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: covered 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 :)

Grzegorz Aperliński
  • 848
  • 1
  • 10
  • 23
  • 1
    It's a known issue, stated in the Apple release notes of iOS 10 and 10.1 beta. This is a duplicate question. See other thread of workarounds. – Léo Natan Oct 20 '16 at 17:34
  • Thanks and sorry for the duplicate post – aparently I've been using the wrong search terms when looking for a solution – Grzegorz Aperliński Oct 20 '16 at 17:49

0 Answers0