A lot of our users would like to add "custom" behavior to their apps therefore we've included something called Logic into our pro version. Logic will let you add custom behavior / logic to your app in using a really easy and visual designer.
In this how to we will guide your through the process of setting up a simple logic flow to navigate to another block inside your app when the user clicks a button.
- An AppMachine app with at least one building block;
By following the steps below you are going to setup a simple logic flow that will open another block inside your app when the users clicks a button.
- Go to http://design.appmachine.com and log in;
- Open an existing app or create a new app;
- Click the "Add block" button;
- Select the "Pro" tab;
- Select the "Screen" block and click "Add block";
- Enter a name for your block and click "Finish";
- Once you've clicked Finish you will see the empty screen and our template / screen designer. Drag a button onto your screen;
For more information about our template / screen designer please take a look at this article: How To - Design your screen with the layout editor
- Select the button you've just added to your screen by clicking on it;
- Change the name of the button to a recognizable name like 'btnShowMeMore';
- Enter a title / caption for the button: "Show me more";
- Now save your changes;
- Select the "Logic" tab;
- Click the "btnShowMeMore.Click" event;
- Click the "+" button;
- You will be prompted with our Logic wizard. This wizard contains all the logic actions we are providing, in this case we want to use the "GoTo" action, so click the "GoTo" action;
- In the next step you can select the building block that should be opened when the users clicks your button. Select the building block you would like to open;
- Click "Finish" and save the changes by clicking the "Save" button;
That's it, you did just add your first custom logic to your app!