Advent · Day 7
This one opens on December 7.
Every door opens at midnight Pacific.
See the calendarPattern · Media
Photo Adjust SwiftUI Block
Photo Adjust SwiftUI Block is a paid SwiftUI pattern in SwiftPieces Pro. Thirteen photo adjustments on dials, a ruler slider with a detent at zero, Auto from the histogram and a live histogram. iOS 17.0 and later. SwiftPieces Pro is $199 once.
Thirteen photo adjustments on dials, a ruler slider with a detent at zero, Auto from the histogram and a live histogram.
Buyers also search for this as a SwiftUI section.
| Price | $199 once |
|---|---|
| iOS | iOS 17.0 and later |
| License | A per-developer commercial license for unlimited personal and commercial apps, including client work. Do not resell or redistribute the source as a template or UI kit. |
| Dependencies | No third-party packages. Apple frameworks only. |
| Files | 1 Swift file in the install. |
The light and colour tool of a photo editor as one section. A row of dials shows every adjustment's value in its ring, from Exposure to Vignette, and a ruler slider sets the chosen one with a haptic detent at zero. The photo renders live off the main actor with a small luminance histogram in its corner, Auto sets a starting point from that histogram, and holding the photo shows the original.
- SwiftUI
- iOS 17.0+
- photo-adjust
$199 once, every piece included. See how installing works · Sign in
Proof
This targets iOS 17.0 and later. On iOS 26 it uses Liquid Glass. On iOS 17 through iOS 18 it uses a material fallback, including when Reduce Transparency is on.
No simulator still is published for this page yet.
01
What's included
SwiftUI source you own, built on Apple frameworks only.
- Thirteen adjustments, each ring showing its value
- A ruler slider with a detent at zero and double tap to reset
- Live rendering off the main actor, keeping the last frame
- A live luminance histogram and Auto from it
- Hold the photo to compare with the original
Used in
Photo Editor (screen)
02
Implementation notes
How it behaves, what it handles, and the decisions behind it.
The photo sits on a stage with the adjustments applied live, and a small luminance histogram in its top corner follows every change. Under it, a row reads Auto, the chosen adjustment with its value (such as "Exposure +12"), and Reset once anything has changed. A scrolling row of dials holds all thirteen adjustments: Exposure, Brilliance, Highlights, Shadows, Contrast, Brightness, Black Point, Saturation, Vibrance, Warmth, Tint, Sharpness and Vignette. Each is an SF Symbol in a 38 point ring. The ring's stroke grows clockwise for positive values and counterclockwise for negative ones, in the accent on the chosen dial. A ruler slider sets the chosen adjustment, with its fill running from the centre. It has a detent and a light haptic at zero, and a double tap resets that value. Auto reads the photo's histogram and sets exposure, contrast, black point, highlights, shadows and a little vibrance. Press and hold the photo to see the original.
Notes
PhotoAdjustBlock(image:values:)binds aPhotoAdjustBlock.Values. Passing nil draws a ghost.Valuesholds thirteenDoubles, 0 meaning untouched. Most run -100...100, while Sharpness and Vignette run 0...100. It isSendable,EquatableandCodable, and you can subscript it byPhotoAdjustBlock.Adjustment.values.apply(to:)is pure Core Image andnonisolated. It chains exposure adjust, highlight and shadow, a tone curve (positive highlights, black point and negative brilliance), colour controls, vibrance, temperature and tint, luminance sharpening and a vignette, and it keeps the photo's extent.- The preview renders at 1000 pixels in a detached task. A new change cancels the render in flight, and the last frame stays up until the next one lands.
- The histogram is
CIAreaHistogramover 64 bins, read back and combined into luminance. - VoiceOver: each dial reads its name and value. The slider is adjustable in steps of five and reads the chosen adjustment.
PhotoAdjustBlockExampleis the preview: the painted sample photo, warmed and lifted (Values.sample).
Theming
The block reads these tokens:
surfacefor the stage.textPrimaryfor the labels, the chosen symbol and the slider's fill.textSecondaryfor the other dials and their rings,separatorfor the empty rings.accentfor the chosen dial's ring.fillfor the slider's track,textTertiaryfor its centre tick,surfaceElevatedfor its thumb.radius.lgandmotion.snappy/motion.smooth.
The histogram is white on a dark scrim in every family.
03
Keep building
Pieces that work well next to this one.