• Stars
    star
    350
  • Rank 121,229 (Top 3 %)
  • Language
    Swift
  • License
    MIT License
  • Created about 7 years ago
  • Updated about 1 month ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Intuitive and powerful Auto Layout library

logo

The best way to create constraints in code.

  • Semantic. Align APIs focus on your goals, not the math behind Auto Layout constraints.
  • Powerful. Create multiple constraints with a single line of code.
  • Type Safe. Makes it impossible to create invalid constraints, at compile time.
  • Fluent. Concise and clear API that follows Swift API Design Guidelines.
  • Simple. Stop worrying about translatesAutoresizingMaskIntoConstraints and constraints activation.

To give you a taste of what the semantic APIs look like, here is an example:

view.anchors.edges.pin(insets: 20, alignment: .center)

pin edges with center alignment

Documentation

The documentation for Align is created using DocC and covers all of its APIs in a clear visual way. There is also a cheat sheet available that lists all of the available APIs.

Screen Shot 2022-07-13 at 10 08 57 AM

Requirements

Align Swift Xcode Platforms
Align 3.0 Swift 5.6 Xcode 13.3 iOS 12.0 / tvOS 12.0 / macOS 10.14
Align 2.0 Swift 5.1 Xcode 11.0 iOS 11.0 / tvOS 11.0 / macOS 10.13

Why Align

Align strives for clarity and simplicity by following Swift API Design Guidelines. Although most of the APIs are compact, it is a non-goal to enable the most concise syntax possible.

Align is for someone who:

  • Prefers fluent high-level APIs
  • Doesn't want to depend on big, complex libraries – Align has only ~330 lines of code
  • Prefers to have as little extensions for native classes as possible – Align adds a single property: anchors
  • Doesn't overuse operator overloads, prefers fast compile times
  • Likes NSLayoutAnchor but wishes it had simpler API which didn't require manually activating constraints

More Repositories

1

Nuke

Image loading system
Swift
8,112
star
2

Pulse

Network logger for Apple platforms
Swift
6,307
star
3

DFImageManager

Image loading, processing, caching and preheating
Objective-C
1,180
star
4

Get

Web API client built using async/await
Swift
941
star
5

Preheat

Automates prefetching of content in UITableView and UICollectionView
Swift
629
star
6

PulsePro

A macOS app for viewing logs from Pulse
Swift
482
star
7

Future

Streamlined Future<Value, Error> implementation
Swift
317
star
8

FetchImage

Makes it easy to download images using Nuke and display them in SwiftUI apps
Swift
212
star
9

Regex

Open source regex engine
Swift
211
star
10

Arranged

Open source replacement of UIStackView for iOS 8 (100% layouts supported)
Swift
208
star
11

VPN

Sample custom VPN client/server in Swift
Swift
182
star
12

Formatting

Swift
179
star
13

DFCache

Composite LRU cache with fast metadata using UNIX extended file attributes
Objective-C
162
star
14

RxNuke

RxSwift extensions for Nuke
Swift
148
star
15

CreateAPI

Delightful code generator for OpenAPI specs
Swift
142
star
16

SwiftSQL

Swift API for SQLite
Swift
131
star
17

ThreeColumnNavigation

A minimal example of three-column navigation for iPad and macOS using SwiftUI
Swift
127
star
18

Stacks

A micro UIStackView convenience API inspired by SwiftUI
Swift
73
star
19

Nuke-FLAnimatedImage-Plugin

FLAnimatedImage plugin for Nuke
Swift
53
star
20

RxUI

Auto-binding for RxSwift inspired by SwiftUI
Swift
45
star
21

Nuke-Alamofire-Plugin

Alamofire plugin for Nuke
Swift
40
star
22

NukeDemo

Nuke Demo
Swift
34
star
23

DFJPEGTurbo

Objective-C libjpeg-turbo wrapper
C
33
star
24

ImagePublisher

Combine publishers for Nuke
Swift
25
star
25

NukeUI

Lazy image loading for Apple platforms: SwiftUI, UIKit, AppKit
Swift
19
star
26

articles

Articles for kean.github.io
19
star
27

URLQueryEncoder

URL query encoder with support for all OpenAPI serialization options
Swift
17
star
28

NukeBuilder

A fun and convenient way to use Nuke
Swift
14
star
29

ScrollViewPrefetcher

Prefetching for SwiftUI
Swift
14
star
30

PulseLogHandler

SwiftLog Extension for Pulse
Swift
12
star
31

HTTPHeaders

Parsing Simple HTTP Headers
Swift
11
star
32

OctoKit

GitHub API client built with Fuse
Swift
8
star
33

PulseApps

Base Pulse macOS and iOS apps and a few demo projects
Swift
7
star
34

kean

1
star