ストリーミングはほとんどのブラウザと
Developerアプリで視聴できます。
-
Apple Pencilを最大限に活用
iOS 18、iPadOS 18とvisionOS 2の新機能として、PencilKitツールピッカーでカスタム属性を使用し、包括的なカスタムツールを利用できるようになりました。システム全体におけるツール選択と同等の優れた体験をもたらすツールピッカーで、カスタムの描画体験を実現する方法を確認しましょう。ロール角度、スクイーズジェスチャ、触覚フィードバックなど、Apple Pencil Proに搭載された新機能の利用方法もご紹介します。
関連する章
- 0:00 - Introduction
- 1:16 - Configuring the tool picker
- 5:20 - Custom tools in the tool picker
- 8:47 - Apple Pencil Pro features and APIs
リソース
- Apple Pencil
- Apple Pencil updates
- Configuring the PencilKit tool picker
- Forum: UI Frameworks
- Human Interface Guidelines: Apple Pencil and Scribble
- Playing haptic feedback in your app
関連ビデオ
WWDC20
WWDC19
-
ダウンロードArray
-
-
10:24 - Respond to squeeze in UIKit
class MyViewController: UIViewController, UIPencilInteractionDelegate { func pencilInteraction(_ interaction: UIPencilInteraction, didReceiveSqueeze squeeze: UIPencilInteraction.Squeeze) { if UIPencilInteraction.preferredSqueezeAction == .showContextualPalette && squeeze.phase == .ended { let anchorPoint = squeeze.hoverPose?.location ?? myDefaultLocation presentMyContextualPaletteAtPosition(anchorPoint) } } }
-
10:46 - Respond to squeeze in SwiftUI
@Environment(\.preferredPencilSqueezeAction) var preferredAction @State var contextualPalettePresented = false @State var contextualPaletteAnchor = MyPaletteAnchor.default var body: some View { MyView() .onPencilSqueeze { phase in if preferredAction == .showContextualPalette, case let .ended(value) = phase { if let anchorPoint = value.hoverPose?.anchor { contextualPaletteAnchor = .point(anchorPoint) } contextualPalettePresented = true } } }
-
11:50 - Provide canvas feedback in UIKit
class MyViewController: UIViewController { @ViewLoading var feedbackGenerator: UICanvasFeedbackGenerator override func viewDidLoad() { super.viewDidLoad() feedbackGenerator = UICanvasFeedbackGenerator(view: view) } func dragAlignedToGuide(_ sender: MyDragGesture) { feedbackGenerator.alignmentOccurred(at: sender.location(in: view)) } func snappedToShape(_ sender: MyDrawGesture) { feedbackGenerator.pathCompleted(at: sender.location(in: view)) } }
-
12:29 - Provide canvas feedback in SwiftUI
@State var dragAlignedToGuide = 0 @State var snappedToShape = 0 var body: some View { MyView() .sensoryFeedback(.alignment, trigger: dragAlignedToGuide) .sensoryFeedback(.pathComplete, trigger: snappedToShape) }
-
-
特定のトピックをお探しの場合は、上にトピックを入力すると、関連するトピックにすばやく移動できます。
クエリの送信中にエラーが発生しました。インターネット接続を確認して、もう一度お試しください。