Skip to content

A simple SwiftUI APP to demonstrate how to use haptic function on iPhone

Notifications You must be signed in to change notification settings

kr1s0404/SwiftUI_HapticDemo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SwiftUI-HapticDemo

Screen Shots

.


Table of Contents


Description

  • A simple SwiftUI APP to demonstrate how to use haptic function on iPhone

  • There will be two views for you to choose. First one demonstrate the default haptic that APPLE give us. The second view is the custom haptic view. Which you can adjust the slider to feel differnt vibration.

  • I combine tabView and NavigationLink to switch between two different views

  • Project was completed using 100% SwiftUI (No Storyboard)

  • Did not use any design pattern

Frameworks

  • SwiftUI
  • CoreHaptics

What I Learned:

  • I learned how to imply custom haptic into SwiftUI
  • Apple prvides some default haptics that we can use
  • If I want my vibration to be more precise, I have to use "prepare" in my code

How To Use

  • Clone the project and run it on Xcode
  • Your iPhone has to be at least iOS 13 or above to use the haptic function

Author Info

Back To The Top

About

A simple SwiftUI APP to demonstrate how to use haptic function on iPhone

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages