#CoreAnimation

Kuba Suder • @mackuba.eu on 🦋mackuba@martianbase.net
2025-05-21

Seriously, this "stupid autocomplete that just predicts tokens" understands and explains AppKit and Core Animation better than probably most iOS devs would… that's good enough for me ¯\_(ツ)_/¯

#AppKit #CoreAnimation #MacDev

Yes — that absolutely makes sense, and it’s actually a great example of just how far you can get with only Core Animation’s presentation layer, as long as:
	•	You don’t need to rely on the final transform being applied to the model layer, and
	•	You don’t interact with the layer again in a way that would force a re-evaluation of its actual transform.

⸻

🧠 What you’re doing now:
	•	You’re animating the presentation layer from identity to a scale.
	•	You’re using:

scaleAnimation.fillMode = .forwards
scaleAnimation.isRemovedOnCompletion = false

which keeps the animation “frozen” at its final visual state.

	•	And since you’re not changing the model layer’s transform at all, Core Animation never has a reason to “snap back” — it just keeps displaying the final frame of the animation.

⸻

✅ Why this works (for now)

You’re relying entirely on the animation system to display the scaled view.

This works beautifully as long as:
	1.	You don’t query or modify the layer’s transform later.
	2.	You don’t trigger something that flushes the animation (like removeAllAnimations()).
2024-12-28

Okay, I gave this a try, but for some reason, it’s not working with all CATransitionTypes. Push and Reveal work, Flip not.
#swiftui #coreanimation #iosdev #macosdev

2024-12-28

That is the best way to implement this as SwiftUI Transition? The old version was using a CATranstion (Flip) but I haven't figured a good / easy way as a transition.
#swiftui #coreanimation #iosdev #macosdev

Mario Alberto Guzmánmarioguzman
2024-10-12

I'm having way too much fun with this new UI for my Arrival Times view and some animation.

Mario Alberto Guzmánmarioguzman
2024-10-12

I finally found a reason to use my scrolling marquee that I made for Music Widget, QuickTune, etc. etc. for an iOS app...

My PDX Transit SwiftUI re-write!!! Check it out:

(still a work in progress but you get the idea!)

Mario Alberto Guzmánmarioguzman
2024-09-02

I wrote the scrolling marquee using Core Animation for my apps but a while back, I found some issues where the text would look blurry on non-retina displays.

Unfortunately I found a few more cases (still happening a lot less than before), but finally found the issue and fixed it.

The top image has the blurry text (in the titlebar), and the bottom image has it fixed. 🛠️😄

Text now appears super sharp on non-retina displays and have yet to see a blurry example.

Mario Alberto Guzmánmarioguzman
2024-05-31

I just posted a sample project to GitHub which has the code I wrote for the Brushed Metal background in QuickTune.

It seems performant but I am probably not the best in determining if it is at its most performant. Seems good though.

This is done in Core Animation layers & good for both 1x and 2x displays.

I hope to see more Brushed Metal interfaces soon 😉

github.com/marioaguzman/Brushe

calicodingcalicoding
2023-08-25

Not sure if this is widely known but you can animate the path property on a CAShapeLayer. It just doesn’t _implicitly_ animate. And if you use paths that have the same number of points, in roughly the same locations, will smoothly animate between them. With the right paths it looks really good. Since it’s vector based, it’s razor sharp at any scale. And since it’s all just CALayers it’s super lightweight.

Eric Vitiellopixel@toot.cafe
2020-10-09

Using matchedGeometryEffect to Create View Animation in iOS 14

#iOS #Programming #CoreAnimation
appcoda.com/matchedgeometryeff

Client Info

Server: https://mastodon.social
Version: 2025.04
Repository: https://github.com/cyevgeniy/lmst