Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does watchOS 2 have API for Force Touch?

As the title, for say I wanna determine if the WKInterfaceButton is clicked normally or by Force Touch. Is it achievable now through watchOS 2?

like image 998
Jieyi Hu Avatar asked Sep 28 '22 03:09

Jieyi Hu


2 Answers

Force Touch is available to use in watchOS, but you can only determine if Force Touch is used on the whole screen or not, and then show the context menu. You can put selectable buttons there, up to four for each menu. Note that each storyboard can contain only one menu, which contains up to four buttons.

So you can't determine Force Touch on a specific button. Also you can't access the direct APIs. The only way to implement Force Touch actions is to make a menu as described before, and then tell the Apple Watch to bring up the menu when Force Touch is used by the user. You only have the ability of control the menu, and everything happening before and after Force Touch is being used, and you have no direct access to Force Touch APIs, even in watchOS 2.

like image 55
Seyyed Parsa Neshaei Avatar answered Dec 31 '22 20:12

Seyyed Parsa Neshaei


It unavailable at the moment. Look at this answer referring to an Apple Evangelist.

like image 41
Philip Avatar answered Dec 31 '22 20:12

Philip