Skip to content

CameraButton 1.0.0

Latest

Choose a tag to compare

@Ramiz69 Ramiz69 released this 19 Oct 12:36
5d10919

CameraButton 1.0 refreshes the library for iOS 26 and Swift 6: Liquid Glass, a SwiftUI wrapper and a set of long-standing bug fixes.

Highlights

  • Liquid Glass style. button.style = .glass renders the shutter on a UIGlassEffect disc on iOS 26 and later. Earlier systems fall back to the classic ring.
  • SwiftUI. CameraShutterButton wraps the same CameraButton, with an isRecording binding and a configure closure for every other property.
  • Recording progress ring. recordingProgress, animateRecordingProgress(duration:) and progressColor; the ring resets when recording stops.
  • Feel and accessibility. Haptic feedback (isHapticFeedbackEnabled), Reduce Motion support, VoiceOver labels ("Take Photo", "Record Video", "Stop Recording") that you can override.
  • New example app. A SwiftUI camera screen with a Playground sheet that edits every property live and shows the matching code, plus a SwiftUI / UIKit switch.

Fixes

  • Shapes are built from bounds and rebuilt on layout changes, so Auto Layout and CameraButton() with a zero frame work.
  • A quick photo tap now plays the full shutter animation; before, only a press-and-hold was visible.
  • Dragging a finger off the button no longer leaves it shrunk; a cancelled touch no longer starts recording.
  • The video stop square is centered.
  • Removed the awakeFromNib constraint hack; the button has a 60×60 intrinsic size.
  • Colors follow light/dark appearance changes.

Breaking changes

  • CocoaPods is no longer supported. RKCameraButton 0.0.4 stays the last pod. Use Swift Package Manager:
    .package(url: "https://github.com/Ramiz69/CameraButton.git", from: "1.0.0")
  • Minimum iOS in Package.swift is now 15 (was 14), matching the documented requirement.
  • Swift 6 language mode; Xcode 26 or later is needed for the glass style (older compilers build the classic style only).

The public API is otherwise source-compatible with 0.0.4.