$ show LinXunFeng/SwiftyFitsize
SwiftyFitsize is an iOS SDK that provides screen size adaptation for UI elements. It allows developers to define UI dimensions based on a reference design size and automatically scales those dimensions to fit different screen sizes, with special handling for iPhone vs iPad differences and safe area considerations (notch, home indicator). The library offers both operator-based syntax (~ value) and function-based syntax for flexibility, plus Interface Builder support through UIKit extensions. It includes a property wrapper for reusable adapted values and maintains full Objective-C compatibility through a bridging header.
The LLM identified 1 files worth highlighting for reuse:
Implements a property wrapper that automatically applies screen adaptation to stored values. This component encapsulates the adaptation logic in a reusable attribute (@WrappedSwiftyFitsize) that can be applied to any CGFloat property, demonstrating the Swift property wrapper pattern for domain-specific value transformation. It isolates the adaptation concern, making it easy to reuse in other projects with minimal modification.