I’m creating an app with many pages, and the best way I have come up with to switch between them is to animate every other page out and then animate the correct page in. The problem is that every page I add requires a lot of work because I have to add the animation out block to all my previous workflows. I’m aware that I can automatically show and hide the groups by using a custom state, but it is important to me that the groups are animated out and in. Does anyone have a better solution to this?
If you want to navigate to “About” page, you create a workflow when “About” button is clicked:
Select action Naviagation/Go to Page…
Select page Index
Send more parameters to the page:
Key= p
Value = About
Then you create a workflow:
When Get parameter from URL (p) is “About” → animate section “About” (Show)
Then one more workflow:
When Get parameter from URL (p) is not “About” → animate section “About” (Hide)
And set all the sections as non-visible on page load (except for the home page section)
Yes.
If you are on page index and use the action “go to page…” → index, the page doesn’t get refreshed, it only updates the URL parameters.
If you don’t set any new parameters, it clears the current parameters.
Otherwise, it sets any new parameter that you send.
True. The reason why I don’t use that, is that those transition are limited and not customisable (duration, direction of the animation) compared to the “animate element” action…
Well once you have your workflows set up as suggested by another user it’s just a matter of copy paste and hope you don’t have to worry about it anymore.
The problem with using custom states is that they don’t allow you to navigate back / forward using the browser buttons.
This may cause issues. For example, if a user push the back button, it may navigate outside of your app.
Url parameters instead, create a different page history every time you navigate to a different section of your app.
I had initially used custom states for navigation on my single page app. Then, after discovering this issue, I rebuilt everything using url parameters…
I don’t think this will be a problem for me, as my app is meant to look and feel like a native app, so having back buttons would actually go against its design.
He meant the browser’s back button or when a user refreshes the page. Using states means the they get reset at every refresh/back and hence affecting the user experience.
Keep in mind that on iOS (I don’t know about Android) a user can instinctively swipe right to navigate to a previous page/section of your app.
With URL parameters this is not an issue but you can try to do that on your app and see how it behaves…