Skip to content

Redesign example app in SwiftUI - #2

Merged
Ramiz69 merged 1 commit into
masterfrom
example-redesign
Oct 19, 2026
Merged

Ramiz69 merged 1 commit into
masterfrom
example-redesign

Conversation

@Ramiz69

@Ramiz69 Ramiz69 commented Oct 19, 2026

Copy link
Copy Markdown
Owner

Stacked on #1 (release/1.0.0). Once #1 is merged, GitHub retargets this PR to master.

Summary

The example app becomes a modern showcase and the source of the README GIF.

  • One SwiftUI camera screen instead of the storyboard table and three view controllers
  • Live AVCaptureSession preview on device; animated mesh gradient in the Simulator, so Liquid Glass is visible; a clear state when camera access is denied
  • Glass bottom bar: Photo/Video modes, shutter, last-capture thumbnail (nothing is saved to Photos)
  • Video: recording timer, progress ring and auto-stop at the limit (15 s by default)
  • Playground sheet: live editing of every CameraButton property, with copyable Swift code for the current setup
  • SwiftUI / UIKit switch: the same button through CameraShutterButton or through CameraButton with CameraButtonDelegate

Project

  • Example target uses a synchronized folder and a generated Info.plist; storyboards removed
  • Example deployment target iOS 18 (library stays iOS 15)
  • New example.gif: 4.4 MB, previously 5.7 MB

Library changes (small, additive)

  • CameraShutterButton(..., configure:) closure to set the remaining CameraButton properties from SwiftUI
  • Appearance setters skip unchanged values, so repeated SwiftUI updates no longer cancel running animations

Test plan

  • xcodebuild example and package for iOS Simulator (Xcode 27.1), no warnings
  • Simulator: photo tap and thumbnail, video record/stop with timer and ring, playground edits applied live, code snippet and copy, UIKit path with classic style
  • Device: live preview, camera permission prompt, photo thumbnail from the camera
  • Auto-stop at the limit (only checked by reading the code)

Replace the storyboard screens with a single SwiftUI camera screen:
- live AVCaptureSession preview on device, animated mesh scene in the
  Simulator, graceful handling of denied camera access
- glass bottom bar with Photo/Video modes, shutter and last-capture
  thumbnail; recording timer and progress ring with an auto-stop limit
- Playground sheet that edits every CameraButton property live and
  shows copyable Swift code
- SwiftUI / UIKit switch: CameraShutterButton vs CameraButton + delegate

Project: example target uses a synchronized folder and a generated
Info.plist; deployment target iOS 18. New example.gif (4.4 MB, was 5.7).

Library: CameraShutterButton gains a `configure` closure for the rest of
the CameraButton properties; appearance setters skip unchanged values so
repeated SwiftUI updates no longer cancel running animations.
@Ramiz69
Ramiz69 deleted the branch release/1.0.0 October 19, 2026 12:32
@Ramiz69 Ramiz69 closed this Oct 19, 2026
@Ramiz69 Ramiz69 reopened this Oct 19, 2026
@Ramiz69
Ramiz69 changed the base branch from release/1.0.0 to master October 19, 2026 12:34
@Ramiz69
Ramiz69 merged commit 5d10919 into master Oct 19, 2026
2 checks passed
@Ramiz69
Ramiz69 deleted the example-redesign branch October 19, 2026 12:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant