Fast Swift manual layout framework for iOS/macOS/tvOS without auto layout, offering full control and concise syntax.
PinLayout is a Swift framework for manually laying out UIViews, NSViews, and CALayers on iOS, macOS, and tvOS without using auto layout. It solves the performance and complexity issues of auto layout by providing a fast, code-based alternative with full control over view positioning. Developers can define layouts concisely using a chainable syntax that is intuitive and readable.
iOS, macOS, and tvOS developers who need high-performance UI layout without auto layout constraints, particularly those building complex interfaces where control and speed are critical.
PinLayout offers unparalleled performance—up to 12x faster than auto layout—with a simple, chainable API that gives developers complete control. Unlike auto layout, there's no magic; layouts are explicit, debuggable, and work seamlessly across all Apple platforms.
Fast Swift Views layouting without auto layout. No magic, pure code, full control and blazing fast. Concise syntax, intuitive, readable & chainable. [iOS/macOS/tvOS/CALayer]
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Benchmarks show PinLayout is 8–12x faster than auto layout, matching manual layouting speed, as detailed in the performance section with charts comparing iPhone models.
The API allows layouting most views in a single readable line, such as `view.pin.top(10).left(10).width(100).aspectRatio()`, making code intuitive and maintainable.
As a manual layout framework, it avoids auto layout's black box, giving developers complete control over positioning and sizing, which is emphasized in the philosophy section.
Supports iOS, tvOS, and macOS with consistent methods, and includes dedicated APIs for right-to-left languages, ensuring broad compatibility.
Requires explicit updates in `layoutSubviews()` or `viewDidLayoutSubviews()` to handle size changes, adding boilerplate and risk of missed updates compared to auto layout's automatic system.
Lacks direct support for Interface Builder or other visual design tools, forcing all layout to be code-based, which can slow down prototyping and visual adjustments.
Developers accustomed to auto layout's declarative constraints may struggle with PinLayout's imperative approach and need to learn new patterns for relative positioning and margins.
Has fewer third-party libraries, tutorials, and community resources compared to auto layout, making problem-solving and adoption more challenging for teams.