Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. iOS
  3. PureLayout

PureLayout

NOASSERTIONObjective-Cv3.1.9

A cross-platform Objective-C library providing a simple, powerful API for iOS and macOS Auto Layout, compatible with Swift.

GitHubGitHub
7.6k stars731 forks0 contributors

What is PureLayout?

PureLayout is an open-source library that provides a simplified, high-level API for Apple's Auto Layout system on iOS and macOS. It solves the problem of writing verbose and tedious Auto Layout code by offering concise methods that automatically create and activate constraints, making UI layout programming faster and more readable.

Target Audience

iOS and macOS developers who build user interfaces programmatically and want a cleaner, more maintainable way to use Auto Layout without relying on Interface Builder or verbose native APIs.

Value Proposition

Developers choose PureLayout because it offers a comprehensive, type-safe, and backwards-compatible API that feels native to Cocoa, works across both Objective-C and Swift, and significantly reduces the boilerplate associated with manual constraint creation.

Overview

The ultimate API for iOS & OS X Auto Layout — impressively simple, immensely powerful. Objective-C and Swift compatible.

Use Cases

Best For

  • Programmatically building complex UI layouts in iOS apps
  • Creating cross-platform UI code shared between iOS and macOS projects
  • Reducing verbosity and improving readability of Auto Layout code
  • Supporting older iOS/macOS versions while using modern Auto Layout features
  • Swift projects that need a clean, Objective-C-compatible layout library
  • Dynamically adjusting constraints at runtime with a simple API

Not Ideal For

  • Projects exclusively using SwiftUI or other declarative UI frameworks
  • Teams that rely heavily on Interface Builder for visual layout design
  • Developers preferring ultra-concise layout DSLs like SnapKit or Cartography

Pros & Cons

Pros

Concise and Intuitive API

Methods like `autoPinEdge` and `autoCenterInSuperview` replace verbose native Auto Layout code, making layout programming more readable and maintainable, as shown in the Swift sample code comparisons.

Cross-Platform Compatibility

Works on both iOS and macOS with a single codebase, supporting Objective-C and Swift, which is emphasized in the README for shared project development.

Backwards Compatibility

Supports iOS 6.0+ and macOS 10.7+, ensuring it can be used in legacy projects while still leveraging Auto Layout features, as noted in the compatibility section.

Automatic Constraint Management

Constraints are automatically activated upon creation, reducing boilerplate code and minimizing manual installation errors, a key feature highlighted in the API overview.

Cons

Less Concise Than Modern DSLs

Compared to libraries like SnapKit or Cartography, PureLayout's API is more verbose, as admitted in the README's 'PureLayout vs. the rest' section, which may deter developers seeking minimal code.

Dependency on Objective-C Foundation

Being an Objective-C library, it can feel less idiomatic in pure Swift projects, especially with Swift's evolving syntax and features like SwiftUI, limiting seamless integration.

No Built-in Animation Support

PureLayout focuses on constraint creation but doesn't provide direct methods for animating layout changes, requiring developers to write additional native code for dynamic UI updates.

Frequently Asked Questions

Quick Stats

Stars7,603
Forks731
Contributors0
Open Issues38
Last commit3 years ago
CreatedSince 2014

Tags

#auto-layout#ios#objective-c#cocoa#ui-development#cross-platform#ui-layout#swift#macos#autolayout#constraints

Built With

O
Objective-C

Included in

iOS51.7kSwift26.0k
Auto-fetched 1 day ago

Related Projects

SnapKitSnapKit

A Swift Autolayout DSL for iOS & OS X

Stars20,334
Forks2,042
Last commit11 months ago
YogaKitYogaKit

Yoga is an embeddable layout engine targeting web standards.

Stars18,720
Forks1,531
Last commit3 days ago
MasonryMasonry

Harness the power of AutoLayout NSLayoutConstraints with a simplified, chainable and expressive syntax. Supports iOS and OSX Auto Layout

Stars18,197
Forks3,152
Last commit3 years ago
FDTemplateLayoutCellFDTemplateLayoutCell

Template auto layout cell for automatically UITableViewCell height calculating

Stars9,877
Forks1,992
Last commit4 years ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub