Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alert doesn't appear #33

Open
zemadara opened this issue Dec 5, 2016 · 7 comments
Open

Alert doesn't appear #33

zemadara opened this issue Dec 5, 2016 · 7 comments

Comments

@zemadara
Copy link

zemadara commented Dec 5, 2016

Hello,

i want to show an UIAlertController from my KGFloatingDrawer, but when i click on my item, which must display the alert, it doesn't show anything and if i put my finger once again on the screen the alert appears.

It seems that without touching the screen the app doesn't know "where" to display the alert.

i use self.present(alert, animated: true, completion: nil) to show my alert from my KGFloatingDrawer

@KyleGoddard
Copy link
Owner

for the alert controller what is in the self.presentingViewController property?

@zemadara
Copy link
Author

zemadara commented Dec 22, 2016

let alert = UIAlertController(title: title,
                                      message: message,
                                      preferredStyle: UIAlertControllerStyle.alert)
        let acceptetAction = UIAlertAction(title: otherButtonTitle, style: UIAlertActionStyle.default) {
            UIAlertAction in
            ...
        }
        let refusetAction = UIAlertAction(title: cancelButtonTitle, style: UIAlertActionStyle.default){
            UIAlertAction in
            
        }
        alert.addAction(refusetAction)
        alert.addAction(acceptetAction)
        
        self.present(alert, animated: true, completion: nil)`

@KyleGoddard
Copy link
Owner

So far I'm unable to replicate this issue. Using the following code I am able to display an alert with no issues, and no second tap.

` @IBAction func displayAlert(_ sender:AnyObject) {
let alert = UIAlertController(title: "Alert!", message: "This is an alert message!", preferredStyle: UIAlertControllerStyle.alert)
let dismissAction = UIAlertAction(title: "Dismiss", style: UIAlertActionStyle.default, handler: nil)
alert.addAction(dismissAction)

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

simulator screen shot dec 23 2016 9 30 07 am

@zemadara
Copy link
Author

the problem is when you are you left Drawer opened, it's an action on the drawer not in ViewController

@KyleGoddard
Copy link
Owner

Okay. I'm out now, I'll try this asap.

@KyleGoddard
Copy link
Owner

I am able to replicate the issue and I'm looking into a fix.

@zemadara
Copy link
Author

it will be great, thx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants