yogi_bear
yogi_bear

Reputation: 323

How to present UIAlert in its own Screen

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.

Upvotes: 1

Views: 24

Answers (0)

Related Questions