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
issue when i try present CRNotifications #3
Comments
It sounds like you are doing something wrong. When calling the show() method it presents the notification on the current ViewController. If you need to show a notification as soon as you have pushed or used a segue to a new VC, you need to call the show() method in that VC's viewDidAppear. |
i try but didn't work |
i mean i try pushed |
@adelbios I have fixed this problem. You should replace following with the above one to work I think @dkcas11 you should have to update this in library as well. |
oK thanks but i fix it before 5 days |
The problem doesn't lie with the way the view is presented. The UIApplication object holds a list of UIWindows which have a UIViewController (their "parent"). So, in order to add something, you go to the ViewController and fetch it's view and add whatever you like there. Adding it to the UIWindow itself may be dangerous and this ensures that the view actually is there. I just tested this from the example project, where i added a NavigationController to the ViewController class, a button to the View, made a new UIViewController class and added a segue to this, from the button. In the newly added class, i ran the Clearly, something is wrong with how you do it, adelbios. Could you provide me with the code of how you do this? And possibly a short outline of your setup. Just to show you my code, here is the PushViewController class i made:
And the execution of my push, which is as trivial as it gets:
|
i wanna contact you... give me u're Email |
u've issue when i try display CRNotifications
in this class CRNotifications
UIApplication.shared.keyWindow?.rootViewController.view.addSubview(view)
but i fix it .....
adding parms
showNotification(type: CRNotificationType, title: String, message: String, dismissDelay: Int , viewController : UIViewController )
because when i try implement pushView controller or segue
the CRNotifications Displayed in the previous VC
so... viewController.view.addSubview(view)
it's work
The text was updated successfully, but these errors were encountered: