pmusolino / PMAlertController

PMAlertController is a great and customizable alert that can substitute UIAlertController
MIT License
2.52k stars 187 forks source link

PMAlertController hides in another view #44

Closed forlearnios closed 7 years ago

forlearnios commented 7 years ago

I'm working with google maps the PMAlertController hides behind the map what could do to get it front? I'm stuck here.

pmusolino commented 7 years ago

Can you show me the code?

forlearnios commented 7 years ago

func newPMAlert(){

    let alertVC = PMAlertController(title: "WITHOUT PHONE NUMBER", description: "You need to set your phone number in profile without phone number driver can't able to contact you", image: UIImage(named: "ic_cardss.png"), style: .alert) //Image by freepik.com, taken on flaticon.com

    alertVC.addAction(PMAlertAction(title: "Cancel", style: .cancel, action: { () -> Void in
        print("Cancel")
    }))

    alertVC.addAction(PMAlertAction(title: "Set now", style: .default, action: { () in
        print("Set now")

        let editProfileVC = ARMainEditProfileVC()
        self.homePassEditProfile = "No Phone Number Alert"
        editProfileVC.passEditProfile = self.homePassEditProfile
        self.navigationController?.pushViewController(editProfileVC, animated: true)

    }))

    self.present(alertVC, animated: true, completion: nil)
}

It works fine but displayed behind the map

pmusolino commented 7 years ago

Are you sure that the alert is presented? If you are sure, check if the map is presented in a new view controller after the presentation of PMAlertController.

Let me know. -Paolo

forlearnios commented 7 years ago

Both are present in the same viewController

pmusolino commented 7 years ago

I need more information to understand where the problem is. Actually your implementation of the alert seems to be correct. If you can, please show me all the code of your view controller.

Thanks -Paolo

forlearnios commented 7 years ago

the codes are too long to show....

pmusolino commented 7 years ago

Without the code I can not help you :| sorry