# SDAutoLayout

> One-line chained Auto Layout for iOS views, labels and table cells

Source: https://talira.ai/catalog/sdautolayout-z0g8wra2
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library
- Categories: [libraries / ui layout / auto layout](https://talira.ai/categories/libraries/ui-layout/auto-layout), [languages / objective c](https://talira.ai/categories/languages/objective-c)
- Platforms: ios[^2]
- Licence: MIT[^1]
- Pricing: Free and open source[^1]
- Free tier: yes[^1]
- Backed by: [GSD_iOS](https://talira.ai/orgs/gsdios.md)

SDAutoLayout is an Objective-C layout library for iOS that sets up a view's layout in one chained line (view.sd_layout.leftSpaceToView(...).topSpaceToView(...).heightIs(...)). Beyond positioning views relative to each other, it sizes UILabels to their text (including attributed text and a maximum number of lines), makes scroll views fit their content, and calculates and caches UITableView cell heights automatically, adjusting the cache when rows are inserted or deleted. It's installed with CocoaPods, and its README and support channels are in Chinese.

## Links

- GitHub: https://github.com/gsdios/SDAutoLayout

## Problems it solves

- lay out iOS views in code without verbose NSLayoutConstraint calls
- make UITableView cells size themselves to their content in Objective-C
- auto-size a UILabel to its text in an Objective-C app

## Features

- Chained one-line layout constraints on any view
- UILabel height and width that fit the text, including attributed text
- Automatic UITableView cell height calculation with caching
- Scroll views that size to their content
- Maximum, minimum and equal width and height constraints

## Trust

Overall: 0.37 out of 1.
Signals: maintenance 0.27, adoption 0.75, momentum 0.50, community 0.28, backing 0.30, extensibility 0.00.

- latest release 2.2.1 8.4 years ago
- 5.9k GitHub stars
- 4 contributors
- backed by GSD_iOS

Warnings:

- last commit 6 months ago

## Sources

[^1]: https://github.com/gsdios/SDAutoLayout/blob/master/LICENSE (checked 28 Nov 2026)
[^2]: https://github.com/gsdios/SDAutoLayout/blob/master/README.md (checked 28 Nov 2026)
