35
34

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Apple Watchをブルブルさせる

Last updated at Posted at 2015-07-07

Introducing WatchKit for watchOS 2 の中で一般にも公開されている内容です

Taptic Engine(バイブ機能のようなもの)のAPIがようやく公開されましたね。watchOS 2から利用可能です。

WKInterfaceDevice.currentDevice().playHaptic(type: WKHapticType)

type には下記の値を設定できます。

enum WKHapticType : Int {
    
    case Notification
    case DirectionUp
    case DirectionDown
    case Success
    case Failure
    case Retry
    case Start
    case Stop
    case Click
}

サンプルコード

リンク

35
34
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
35
34

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?