fabiangruss/playful-swiftui-examples
حول
A collection of SwiftUI examples to use
التعلّم والتعليمالنمو المقاس للنجوم
- خلال 24 ساعة
- ٠
- خلال 7 أيام
- ٠
- خلال 15 يومًا
- ٠
- خلال شهر
- جارٍ جمع السجل
تغيّر صافي النجوم خلال فترات متداخلة، وليس مجموعًا يوميًا. تبقى القياسات المفقودة فارغة. النجوم تقيس الاهتمام لا جودة البرمجيات.
README.md
الأصلplayful-swiftui-examples
A growing collection of pretty SwiftUI code snippets to use in your projects based on code from my projects.
Most examples are focused on having a great UX and adding a little bit of fun for the user.
Feel free to star the repo and follow @fabiangruss on Twitter - many more examples to come :)
Playful, squishy play button
This button toggles between play and pause and is a squishy button that changes its shape when pressed. It uses a combination of animations and symbol effects to achieve a playful look.
https://github.com/fabiangruss/swiftui-examples/assets/22966490/6bba3c00-b21a-4f3e-bc69-a97642b6129a
Squishy waveform button
This button handles audio playback (provided as Data) and displays an animated waveform when music/voicenotes are playing. Works like this:
- audio data is divided into chunks
- each chunk's average amplitude is converted to decibels to create waveform bars
- these are rendered in SwiftUI
https://github.com/fabiangruss/swiftui-examples/assets/22966490/094e8db2-2d65-46bc-adbc-4dcd52eeb2b2
Highlighted search
This code snippet shows how to highlight the search term in a list of results. It builds a custom HStack with multiple text elements in which the search term is highlighted and contrasted against the rest of the text.

Custom pull to refresh/action
This code snippet shows how to build a custom pull to refresh and attach it to a scroll view. It replaces iOS' default ProgressView by your own view. This view receives the current pull down percentage from 0 to 1 to be used for custom interactions. Inspiration to this refresh view is based on kavsoft.dev
Notification animation
This code snippet shows an animation of a stack of notifications that I used in a notification permission priming screen. Add custom image/avatar paths to make the file runnable.
استكشف مشاريع مشابهة ومرتبطة
جارٍ التحميل…