<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/how-to-handle-tap-gestures-on-widgets--bbx9lop6y" -->

---
title: How to Handle Tap Gestures on Widgets? | daily.dev
description: The ‘Tap Me’ Widget I have created a small widget that may seem useless, but it serves as a helpful example of how to trigger various actions based on a...
canonical: https://daily.dev/posts/how-to-handle-tap-gestures-on-widgets--bbx9lop6y
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: How to Handle Tap Gestures on Widgets? | daily.dev
og:description: The ‘Tap Me’ Widget I have created a small widget that may seem useless, but it serves as a helpful example of how to trigger various actions based on a...
og:url: https://daily.dev/posts/how-to-handle-tap-gestures-on-widgets--bbx9lop6y
og:image: https://api.daily.dev/og/posts/bbX9lOP6y.png
og:image:alt: How to Handle Tap Gestures on Widgets?
og:image:width: 1200
og:image:height: 630
og:locale: en
---

[Swift Senpai](https://daily.dev/sources/swiftsenpai)

[Read post](https://api.daily.dev/r/bbX9lOP6y)

# [How to Handle Tap Gestures on Widgets?](https://api.daily.dev/r/bbX9lOP6y "Go to post")

The ‘Tap Me’ Widget I have created a small widget that may seem useless, but it serves as a helpful example of how to trigger various actions based on a widget’s configuration when it is tapped. When a widget detects taps, it will launch its host app, and this behavior cannot be altered.

[#ios](/tags/ios "Check all #ios posts")[#swift](/tags/swift "Check all #swift posts")[#xcode](/tags/xcode "Check all #xcode posts")[#swiftui](/tags/swiftui "Check all #swiftui posts")

Jul 10, 2023•6m read time•From [swiftsenpai.com](https://api.daily.dev/r/bbX9lOP6y "swiftsenpai.com")

[![Post cover image](https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/6cc5d4cc02aa89ed27a3577b1855bd93?_a=AQADKdt)](https://api.daily.dev/r/bbX9lOP6y "Go to post")

Table of contents

[How Do Tap Gestures Work on Widgets?](https://api.daily.dev/r/bbX9lOP6y "How Do Tap Gestures Work on Widgets?")[Handling Tap Gestures on Widgets](https://api.daily.dev/r/bbX9lOP6y "Handling Tap Gestures on Widgets")[Using Links on Widgets](https://api.daily.dev/r/bbX9lOP6y "Using Links on Widgets")

5 Impressions

Comment

Bookmark

Copy

![Placeholder image for anonymous user](https://media.daily.dev/image/upload/s--qsFuKGv_--/t_logo,f_auto/public/noProfile)Share your thoughtsPost

[![Swift Senpai's image](https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/18c570c17ff84c01b933a1559e428a5d)](https://daily.dev/sources/swiftsenpai)

[Swift Senpai](https://daily.dev/sources/swiftsenpai "https://daily.dev/sources/swiftsenpai")

Swift Senpai's platform covers topics related to Swift programming language, iOS app development, a... Read more

13 Followers

•

5 Upvotes

#### Would you recommend this post?

Copy link

WhatsApp

Facebook

X

New Squad

Copy linkShare with your friends

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"How to Handle Tap Gestures on Widgets?","url":"https://daily.dev/posts/how-to-handle-tap-gestures-on-widgets--bbx9lop6y","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/how-to-handle-tap-gestures-on-widgets--bbx9lop6y"},"datePublished":"2023-07-10T07:22:49.727Z","dateModified":"2023-07-20T14:15:11.734Z","description":"The ‘Tap Me’ Widget I have created a small widget that may seem useless, but it serves as a helpful example of how to trigger various actions based on a...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/6cc5d4cc02aa89ed27a3577b1855bd93?_a=AQADKdt","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/6cc5d4cc02aa89ed27a3577b1855bd93?_a=AQADKdt","isAccessibleForFree":true,"articleSection":"Swift Senpai","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Swift Senpai","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/18c570c17ff84c01b933a1559e428a5d","url":"https://daily.dev/sources/swiftsenpai"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/how-to-handle-tap-gestures-on-widgets--bbx9lop6y","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"ios,swift,xcode,swiftui","timeRequired":"PT6M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Swift Senpai","item":"https://daily.dev/sources/swiftsenpai"},{"@type":"ListItem","position":3,"name":"How to Handle Tap Gestures on Widgets?"}]}
```

