How to show touches on iOS Device
Sometimes you want to enable a tap indicator on your iOS Device (iPhone or Simulator), like a small circle, for touch events so users can easily spot where you have tapped.
To see where touches occur on iOS simulator:
- Open a terminal application (
/Applications/Utilities/Terminal.app
) and type following command:
defaults write com.apple.iphonesimulator ShowSingleTouches 1
- Now, restart your
iOS Simulator
. - That’s it. 🚀🚀🚀 🕺🕺🕺
Note: If you want to disable the touch then type the following command and restart the iOS Simulator
defaults write com.apple.iphonesimulator ShowSingleTouches 0
Reading Values
- If you want to read the current value of the variable before making any changes then, use the following command:
defaults read com.apple.iphonesimulator ShowSingleTouches
- If you are curious to know more options like
ShowSingleTouches
then use the following command:
defaults read com.apple.iphonesimulator
To see where touches occur on iPhone:
- Go to your iPhone’s
Settings > Accessibility > Touch > AssistiveTouch
- Tap on
AssistiveTouch
to turn it on, and hitCreate New Gesture…
- Now single tap anywhere on the screen and save the gesture with an appropriate name.
- That’s it. 🚀🚀🚀 🕺🕺🕺
Now we have created a new gesture. It’s time to play with the newly created tap gesture.
- First of all, launch any application on your iPhone.
- Click on the Assistive Touch (Transparent circle icon on the screen) button.
- Now tap the Custom button, and select the gesture you have just created.
Note: Every time you open the app, you have to manually enable your custom gesture.
Delete the Custom Gesture
- Go to your iPhone’s
Settings > Accessibility > Touch > AssistiveTouch
- Under
Custom Gesture
, swipe left on row to delete the gesture you want to.
Questions?
Please feel free to comment below, if you have any questions.
If you like this article, feel free to share it with your friends and leave me a comment. Also, click on the 👏 clap button below to show how much you like the article.
Thanks for reading! 👨🏼💻
You can find me on:
Twitter | LinkedIn | GitHub | Medium | HackerRank | Stack Overflow