Mac O’Clock
Published in

Mac O’Clock

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. 🚀🚀🚀 🕺🕺🕺
Tap Gesture on iOS Simulator

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 onAssistiveTouch to turn it on, and hit Create New Gesture…
  • Now single tap anywhere on the screen and save the gesture with an appropriate name.
  • That’s it. 🚀🚀🚀 🕺🕺🕺
Tap Gesture on iPhone

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.
Delete custom gesture on iPhone

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

--

--

The best stories for Apple owners and enthusiasts

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Milan Panchal

iOS Team Lead ǁ Swift ǁ Objective-C ǁ Lifelong Learner ǁ Blogger — Join Medium from the following link: https://medium.com/@milanpanchal24/membership