Show / Hide Objects
In the demo file I used a slide control with three panels and hide / show arrows based on a global variable using Hide object when and OnGestureTap. Below shows how I am getting the result using a single tap with two fingers.
Using the GetValue of “3” ( number of fingers ) with a value of 2 and the other GetValue of “2” ( tap Count ) with a value of 1. I didn’t need to get the coordinates in this example.
The Variable being set is used with Hide object when on the Arrows with a value of “null” for them to hide. The only step you don’t currently see is a Refresh Window at the end to update the objects. I could have coded this differently to use refresh object instead and update a Global Variable with the previous panel and the next panel but I’m just using a Go To Object script passing the object as a parameter.[space ]
Show Custom Dialog
For this example, tap the screen one time with 3 fingers. In the script I used the Show Custom Dialog script step but it could be used to create a new record, display a print dialog or anything to speed up a workflow for common tasks.
The script steps below show how to get the value.
Using the GetValue of “3” ( number of fingers ) with a value of 3 and the other GetValue of “2” ( tap count ) with a value of 1. I also didn’t need to get the coordinates in this example.
The Else If is at the beginning since this is all part of the same script, just pulling the parts for the demo.[space ]
Show Custom Dialog Using Tap Coordinates
I have placed a Green Dot below to click on with one finger and one tap.
The Gesture Info values to get the dialog to display are below but using the same script steps from the Panel 2. I added the TriggerGestureInfo to the right of the dot to show the coordinates of the tap which are updated with each tap.
To display the dialog the tap must be in the coordinates: x = 710-730 and y = 400-420
This is used in the Else If portion of the script with the Show Custom Dialog.
And that is how to use the OnGestureTap Trigger and Get ( TriggerGestureInfo ) Function. The workflow enhancements that this can be used for are awesome.
I hope you enjoyed this post. Call us at 877-501-8038 for iOS Development!
Demo File: SCG_TapControl.fmp12
For best results with the Demo File, view on an iPad in landscape mode.
Coordinates panel does not work on an iPhone.