UIAlertController inside alert shows error iOS swift

 Solution:

  If you had multiple UIAlertController then it will shows error.Then follow the below step.

Add extra UIKit that will be for additional alert.


                        let alertReplace = UIAlertController(titleAppTitlemessagemessageToshowpreferredStyle: .alert)

                        let okReplaceAction = UIKit.UIAlertAction(title"YES"style: UIKit.UIAlertAction.Style.destructive) {

                            UIAlertAction in

// add the action here

                        }

                        let cancelReplaceAction = UIKit.UIAlertAction(title"NO"style: UIKit.UIAlertAction.Style.cancel) {

                            UIAlertAction in

                            

                        }

                        alertReplace.addAction(okReplaceAction)

                        alertReplace.addAction(cancelReplaceAction)

                        view.present(alertReplace, animatedtruecompletionnil)


Comments

Popular posts from this blog

Invalid bundle error while upload the app to the app Store

Saved Image in document directory and save path in coredata not able to fetch the image file iOS swift