Shimmer is a super-light modifier that adds a shimmering effect to any SwiftUI
View, for example, to show that an operation is in progress. It works well on light and dark modes, and across iOS, macOS, tvOS and watchOS.
import SwiftUI import Shimmer ⋮ ⋮ Text("SwiftUI Shimmer").modifier(Shimmer())
or more conveniently
active: Convenience parameter to conditionally enable the effect. Defaults to
duration: The duration of a shimmer cycle in seconds. Default:
bounce: Whether to bounce (reverse) the animation back and forth. Defaults to
delay: A delay in seconds. Defaults to
You can now provide a custom animation:
Text("Loading...") .shimmering( active: isAnimating, animation: .easeInOut(duration: 2).repeatCount(5, autoreverses: false).delay(1) )
Of course, you can combine
.shimmering(...) with the
.redacted(...) modifier to create interesting animated skeleton views.
Text("Some text") .redacted(reason: .placeholder) .shimmering()
SwiftUI-Shimmer can be installed using Swift Package Manager.
Use the package URL to search for the URLImage package: https://github.com/markiv/SwiftUI-Shimmer.
For how-to integrate package dependencies refer to Adding Package Dependencies to Your App documentation.
Mobile App Development Best Practices – 30.01
iOS Native iOS Touch Events w/ Rust SwiftUI — Using Frames To Align Use Core ML To Build a Minority...
What’s New In Kotlin 1.8 – Multiplatform Mobile and Native
In this video, Pamela chats about some of the Kotlin 1.8.0 updates relating to Kotlin/Native and Kotlin Multiplatform Mobile.
The most popular cross-platform frameworks
It seems that Flutter has become mainstream in 2021 and it is unlikely that anything will stop its growth.
WhatIf – Fluent syntactic sugar of Kotlin
Fluent Kotlin expressions for handling single if-else statements, nullable, collections, and boolean. Gradle Add the dependency below to your module’s build.gradle file:...
Jetpack Compose Codelabs
This repository contains a set of Android Studio projects to help you learn about Compose in Android. Each sample contains...
Mobile App Development Best Practices – 26.01
iOS ChatGPT in an iOS Shortcut — Worlds Smartest HomeKit Voice Assistant Multi-select Filter in Swift Prevent copy & paste...