Not the Answer I Was Looking For
Sometimes when you post a question on social media, your intent gets misunderstood. Responses veer off track, and your original point gets lost. That happened to me last week.
I was experimenting with the symbolEffect
function on SF Symbols and discovered that it accepts an isActive
parameter. This parameter defaults to true
, so you can omit it if needed. For example, you can create a pulsing image using an SF Symbol like this:
Image(systemName: "plus.circle.fill)
.symbolEffect(.breathe)
.breathe
is just one of many available symbol effects, and it creates a nice pulsing animation like the one shown here.
What caught my attention was the ability to control whether the effect is active. That inspired me to create a quick demo where the effect is only active when needed. I shared a simple ToDo list example: when the list is empty, a toolbar button pulses to draw the user’s attention. Once a ToDo is added, the pulsing stops:
.symbolEffect(.breathe, isActive: todos.isEmpty)
The intent was to highlight a subtle way to direct a user’s attention—without relying on the Tips framework.
Unfortunately, my example backfired. I asked:
I’m looking for subtle ways to draw attention to a button only if necessary, without using the Tips framework.
Comments?
It was a poorly worded post with a questionable example, and the majority of responses focused on how I should have used ContentUnavailableView
instead. And they’re right—that would have been the better approach for this particular case. I’d normally use ContentUnavailableView
too.
But that wasn’t really the point.
What I hoped to spotlight was the flexibility of symbolEffect
, particularly with the isActive
parameter, and how it could be used in other scenarios where ContentUnavailableView
isn’t appropriate.
I still believe this technique has potential, and I’d love to hear your thoughts. Have you used symbolEffect
in a clever way? Reach out and share—I’d love to learn from your ideas!