robb
@robb.is
SwiftUI and iOS shenanigans @ Linear.app • I put the UI in Ennui • today your love, tomorrow the world • previously: SwiftUI, Google Research, UIKit.
https://robb.is
https://robb.is
I'm working on a post on how to implement the iCloud Sign In animation in #SwiftUI – coming soon to patreon.com/swiftui_snippets
June 29, 2025 at 8:23 PM
I'm working on a post on how to implement the iCloud Sign In animation in #SwiftUI – coming soon to patreon.com/swiftui_snippets
I've published a new #SwiftUI Package to automatically visualize touches during Screen Recording, Screen Mirroring and when using the iOS Simulator: github.com/robb/visuali...
March 3, 2025 at 7:43 PM
I've published a new #SwiftUI Package to automatically visualize touches during Screen Recording, Screen Mirroring and when using the iOS Simulator: github.com/robb/visuali...
You’ll find the value is only dependent on the radius, so you can just multiply with the radius instead of creating a whole Path and taking it apart.
(unless of of course, it crosses the midpoint of the shortest edge)
(unless of of course, it crosses the midpoint of the shortest edge)
March 2, 2025 at 9:07 PM
You’ll find the value is only dependent on the radius, so you can just multiply with the radius instead of creating a whole Path and taking it apart.
(unless of of course, it crosses the midpoint of the shortest edge)
(unless of of course, it crosses the midpoint of the shortest edge)
If you create a 9-slice from a rounded rectangle you created on iOS, you need to take into account that the distance from the corner to the first axis-aligned control point is about 152.866% of the radius.
I found this value through some empirical computer science in a quick #SwiftUI preview.
I found this value through some empirical computer science in a quick #SwiftUI preview.
March 2, 2025 at 8:38 PM
If you create a 9-slice from a rounded rectangle you created on iOS, you need to take into account that the distance from the corner to the first axis-aligned control point is about 152.866% of the radius.
I found this value through some empirical computer science in a quick #SwiftUI preview.
I found this value through some empirical computer science in a quick #SwiftUI preview.
Using #SwiftUI’s UIGestureRecognizerRepresentable and Anchor Preferences, you can build a ButtonStyle that is triggered by a long-press in a parent view in addition to regular taps.
This enables building custom menus like this that allow triggering an action with a single long press.
This enables building custom menus like this that allow triggering an action with a single long press.
January 19, 2025 at 9:46 PM
Using #SwiftUI’s UIGestureRecognizerRepresentable and Anchor Preferences, you can build a ButtonStyle that is triggered by a long-press in a parent view in addition to regular taps.
This enables building custom menus like this that allow triggering an action with a single long press.
This enables building custom menus like this that allow triggering an action with a single long press.
Work-in-Progress #SwiftUI glitch effect featuring chroma subsampling; random offsets for lines, blocks and pixels; chromatic abberation in YCbCr as well as RGB channel shuffling.
January 1, 2025 at 8:40 PM
Work-in-Progress #SwiftUI glitch effect featuring chroma subsampling; random offsets for lines, blocks and pixels; chromatic abberation in YCbCr as well as RGB channel shuffling.
The SVG effect on display here is a group of feGaussianBlur ➝ feColorMatrix ➝ feOffset filters grouped in a feMerge. That translates 1:1 to GraphicsContext.Filter.blur, .colorMatrix and . projectionTransform drawn on top of each other.
December 8, 2024 at 1:03 PM
The SVG effect on display here is a group of feGaussianBlur ➝ feColorMatrix ➝ feOffset filters grouped in a feMerge. That translates 1:1 to GraphicsContext.Filter.blur, .colorMatrix and . projectionTransform drawn on top of each other.
Quick tutorial how the stitching was achieved:
- Use `strokedPath(_:)` to split the path into multiple lines, using a two-component dash array.
- Convert to a CGPath, split it into subcomponents using `componentsSeparated(using:)`.
- Apply a rotation to each line.
- Merge them back together.
- Use `strokedPath(_:)` to split the path into multiple lines, using a two-component dash array.
- Convert to a CGPath, split it into subcomponents using `componentsSeparated(using:)`.
- Apply a rotation to each line.
- Merge them back together.
December 5, 2024 at 11:27 PM
Quick tutorial how the stitching was achieved:
- Use `strokedPath(_:)` to split the path into multiple lines, using a two-component dash array.
- Convert to a CGPath, split it into subcomponents using `componentsSeparated(using:)`.
- Apply a rotation to each line.
- Merge them back together.
- Use `strokedPath(_:)` to split the path into multiple lines, using a two-component dash array.
- Convert to a CGPath, split it into subcomponents using `componentsSeparated(using:)`.
- Apply a rotation to each line.
- Merge them back together.