Skip to content

1.0.0

Latest

Choose a tag to compare

@Dicky019 Dicky019 released this 27 Jun 16:58
· 1 commit to main since this release
9f2245b

First tagged release of ScreenUtil — a thread-safe, responsive screen-adaptation
library for Apple platforms (iOS 15 / macOS 12 / tvOS 15 / watchOS 8). Scale your
UI from a fixed design size to the real device. Inspired by flutter_screenutil.

Highlights

  • Swift 6 language mode, builds clean under -strict-concurrency=complete.
  • Lock-free, race-free reads via an immutable atomic scale-factor snapshot
    (verified under ThreadSanitizer); configure(with:) / refreshMetrics() are @MainActor.
  • Numeric scaling: .w .h .sp .r .sw .sh on Int/Float/Double/CGFloat.
  • Performance paths: capture-once FastScale / withFastScale, bulk BatchScaler / withBatchScaler.
  • First-class UIKit & SwiftUI: scaled UIFont/UIView/UIEdgeInsets helpers, EnvironmentValues.screenUtil.
  • Platform-isolated layout (Core / Internal / Metrics / Scaling / UIKit / SwiftUI / Debug) — macOS build is structurally safe.
  • Ships a privacy manifest declaring no data collection and no tracking.

One dependency: apple/swift-atomics (lock-free snapshot).

See CHANGELOG.md for the full list of changes, fixes, and breaking removals.