It is not the UIAlertController that is “already presenting”, it is MessagesMasterVC. A view controller can only present one other view controller at a time. Hence the error message.
In other words, if you have told a view controller to presentViewController:...
, you cannot do that again until the presented view controller has been dismissed.
You can ask the MessagesMasterVC whether it is already presenting a view controller by examining its presentedViewController
. If not nil
, do not tell it to presentViewController:...
– it is already presenting a view controller.