Advertisement
Advertisement

More Related Content

Advertisement

20151130 Apple Pencilを使う

  1. Apple Pencilを使う 2015.11.30 関西モバイルアプリ研究会 #8 @itok_twit
  2. @itok_twit • いとうけい(itok) • そらかぜの中の人 • 公私共にプログラマ iOS / Mac(たまに Android や Windows) • http://itok.jp/
  3. iPad Pro + Apple Pencil
  4. 関連API • UIResponder • UITouch iOS9.1以降
  5. UIResponder // プロパティ更新 func touchesEstimatedPropertiesUpdated(_ touches: Set<NSObject>)
  6. UITouch // より詳細な座標 public func preciseLocationInView(view: UIView?) -> CGPoint public func precisePreviousLocationInView(view: UIView?) -> CGPoint // 方位角(ディスプレイ面と水平方向) public func azimuthAngleInView(view: UIView?) -> CGFloat public func azimuthUnitVectorInView(view: UIView?) -> CGVector // 仰角(ディスプレイ面と垂直方向) public var altitudeAngle: CGFloat { get } // プロパティ public var estimationUpdateIndex: NSNumber? { get } public var estimatedProperties: UITouchProperties { get } public var estimatedPropertiesExpectingUpdates: UITouchProperties { get }
  7. 動作環境 iPad Pro + finger iPad Pro + Apple Pencil iPhone 6s preciseLocation ○ altitude / azimuth ○ force ○ ○
  8. DEMO
Advertisement