Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix headers in markdown #1053

Merged
merged 1 commit into from
Aug 1, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/_docs/automatic-layout-basics.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ prevPage: scroll-node.html
nextPage: automatic-layout-containers.html
---

##Box Model Layout
## Box Model Layout

ASLayout is an automatic, asynchronous, purely Objective-C box model layout feature. It is a simplified version of CSS flex box, loosely inspired by ComponentKit’s Layout. It is designed to make your layouts extensible and reusable.

`UIView` instances store position and size in their `center` and `bounds` properties. As constraints change, Core Animation performs a layout pass to call `layoutSubviews`, asking views to update these properties on their subviews.

`<ASLayoutable>` instances (all ASDisplayNodes and subclasses) do not have any size or position information. Instead, Texture calls the `layoutSpecThatFits:` method with a given size constraint and the component must return a structure describing both its size, and the position and sizes of its children.

##Terminology
## Terminology

The terminology is a bit confusing, so here is a brief description of all of the Texture automatic layout players:

Expand All @@ -30,7 +30,7 @@ Every ASLayoutSpec must act on at least one child. The ASLayoutSpec has the resp

You don’t need to be aware of **`ASLayout`** except to know that it represents a computed immutable layout tree and is returned by objects conforming to the `<ASLayoutable>` protocol.

##Layout for UIKit Components:
## Layout for UIKit Components:
- for UIViews that are added directly, you will still need to manually lay it out in `didLoad:`
- for UIViews that are added via `[ASDisplayNode initWithViewBlock:]` or its variants, you can then include it in `layoutSpecThatFits:`