[iOS] Haptic Feedback에 대해서 알아보자🐣
Haptic Feedback에 대해서 알아보자
이 글을 벌써 두번째 쓰고 있다 ㅎㅎ 다 썼는데 뒤로가기 스와이프해서 글 다 날아가ㅁ
✅ 개요
✅ Essentials
안에 더 내용이 있는데 쭉 읽어보면 쉽게 이해할 수 있다.
장치 상태 확인하라던가, 햅틱 엔진은 싱글톤이 아니라던가 등등
✅ 코드
class HapticManager {
static let shared = HapticManager()
private var generator: UIImpactFeedbackGenerator?
func setupGenerator() {
generator = UIImpactFeedbackGenerator()
generator?.prepare()
}
func createImpact(style: UIImpactFeedbackGenerator.FeedbackStyle = .heavy) {
generator?.impactOccurred()
}
func release() {
generator = nil
}
}
(참고)
https://zeddios.tistory.com/726
iOS ) Haptic Feedback
안녕하세요 :) Zedd입니다. 어제 Feedback HIG를 읽어봤는데요, 이걸 이제 쓰는 법을 알아야겠죠? Feedback중에서도 Haptic Feedback을 사용해보는 방법을 공부해볼게요. Animation and Haptics에 가보면 요런..
zeddios.tistory.com
https://developer.apple.com/design/human-interface-guidelines/ios/user-interaction/haptics
Haptics - User Interaction - iOS - Human Interface Guidelines - Apple Developer
Haptics Haptics engage people’s sense of touch to enhance the experience of interacting with onscreen interfaces. For example, the system plays haptics in addition to visual and auditory feedback to highlight the confirmation of an Apple Pay transaction.
developer.apple.com
https://developer.apple.com/documentation/corehaptics
Apple Developer Documentation
developer.apple.com