Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
246 views
in Technique[技术] by (71.8m points)

swift - Prevent default app opening on ios widget click

I have a widget made using widgetkit extension which have four tappable icons which opens specific screen in the app using deeplinks.

 Link(destination: URL(string: deepLinkUrl)!) {
    ..... //tappable UI components
  }

However, on tapping the area outside the icons, i.e the widget itself(the blank area), it opens the app by default. Is there any way to stop this default behaviour. Similar to Today widgets like whatsapp,snapchat


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share
...