Type Safely

Type Safely

Share this post

Type Safely
Type Safely
Use a Long Press Gesture To Toggle a Boolean State Back To False

Use a Long Press Gesture To Toggle a Boolean State Back To False

Daily Coding Tip 130

Millie Sturgeon's avatar
Millie Sturgeon
Jul 19, 2022
∙ Paid

Share this post

Type Safely
Type Safely
Use a Long Press Gesture To Toggle a Boolean State Back To False
Share
body of water surrounded by trees
Photo by Bailey Zindel on Unsplash

Sometimes you want to be sure that a touch gesture is being done deliberately.

A regular tap for instance can be done accidentally when the user is trying to scroll and, when using a Toggle, it can lead to a state that was set to true being reverted back to false. In order to make it harder to undo an action, I’m going …

Keep reading with a 7-day free trial

Subscribe to Type Safely to keep reading this post and get 7 days of free access to the full post archives.

Already a paid subscriber? Sign in
© 2025 Type Safely
Privacy ∙ Terms ∙ Collection notice
Start writingGet the app
Substack is the home for great culture

Share