How to present UIAlert in its own Screen

24 views Asked by At

I am opening registration screen from login screen as follows.enter image description here

Now in the registration screen, i am trying to trigger alert message - rmq.app.alert("test alert") but I get this error message:"attempt to open UIAlertController on LoginScreen whose view is not in window hierarchy.

When I just open the registration screen as open RegistrationScreen.new(nav_bar: true, title: "") then the alert message pops up, but crashes on calling the screen close method. How can I make the alert message work with the above code.

0

There are 0 answers