最近關於 A9 的新聞都很紅,不管是 HTC A9 還是 Apple 的 A9 處理器,都是近期的焦點。
在 Apple A9 處理器的分佈與分析當中,有些人有些疑惑,想說會不會 iPad Pro 的 A9x 處理器也有分兩個代工廠商,剛好昨天 iOS 9.1 韌體發布,這個版本有包含 iPad Pro 的正式版韌體,所以我們可以來一探究竟。
最近關於 A9 的新聞都很紅,不管是 HTC A9 還是 Apple 的 A9 處理器,都是近期的焦點。
在 Apple A9 處理器的分佈與分析當中,有些人有些疑惑,想說會不會 iPad Pro 的 A9x 處理器也有分兩個代工廠商,剛好昨天 iOS 9.1 韌體發布,這個版本有包含 iPad Pro 的正式版韌體,所以我們可以來一探究竟。
去年寫了一篇 iPhone 6 Plus 用三天的簡易心得 ,在 iPhone4.TW 論壇有一些迴響,今年因為還是腦波弱,買了 iPhone 6s Plus,不過這次是用了一個星期之後才來寫。模式大概會跟之前差不多,我不會從開箱什麼的外觀、功能一個一個講(還是會簡單提一下啦),我只會在意一些新的變化,然後對一些新的互動方式來發表一些簡單的看法這樣。
Few days ago, I learned that some developers call the “Peep” and “Pop” haptic feedback by using private APIs. For example, https://github.com/peterbaral/TapticPeekAndPop and http://unifiedsense.com/development/using-taptic-engine-on-ios.html
However, as they mentioned, these methods use private APIs. It means that you can’t submit an application with these methods. Fortunately, there’s a method that can use Tapic Engine, with public API, and it’s more easier.
So, let’s start!
Firstly, there’re three (not two!) kinds of haptic feedbacks in iOS 9.
Most developers know that we can call vibrate by using
1 |
AudioServicesPlaySystemSound(kSystemSoundID_Vibrate); |
Just like kSystemSoundID_Vibrate, there’re the values for haptic feedback.
The values are:
1 2 3 |
AudioServicesPlaySystemSound(1519); AudioServicesPlaySystemSound(1520); AudioServicesPlaySystemSound(1521); |
All you need to do is import AudioToolbox.framework and call these functions.
Then, it just work.