How to move from one view to another on condition?

how to move/slide from one view to another view on certain condition.

Check out this doc