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

No possibility to show rate alert dialog except from RootViewController #7

Closed
webwarrior06 opened this issue May 6, 2018 · 3 comments

Comments

@webwarrior06
Copy link

Hello,
I cannot show rating alert dialog except from root view controller. I will implement this library in a game.
My rating logic is like following;
If a user makes a very high score, I will show rating dialog. But the problem is that the gameplay view is not the RootViewController. That's why it is impossible to show that dialog in every viewcontroller on pre-iOS 10.3 devices.

SwiftRater.swift
UIApplication.shared.keyWindow?.rootViewController?.present(alertController, animated: true, completion: nil)

Is it possible that you implement some logic by which developers can pass desired ViewController as a parameter? So we can have the ability to show it everywhere.
Thanks!

@takecian
Copy link
Owner

takecian commented May 7, 2018

okay, I will check and get back to you.

@takecian
Copy link
Owner

takecian commented Jun 7, 2018

@webwarrior06 sorry for late. Could you try 1.1.0 and pass viewcontroller like https://github.com/takecian/SwiftRater/blob/1.1.0/Demo/Demo/ViewController.swift#L21 ?

@takecian
Copy link
Owner

takecian commented Jun 8, 2018

I will close this if you find any issues, please reopen.

@takecian takecian closed this as completed Jun 8, 2018
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