Skip to content

Commit

Permalink
Fix headers in markdown (#1053)
Browse files Browse the repository at this point in the history
  • Loading branch information
Un3qual authored and Adlai-Holler committed Aug 1, 2018
1 parent 9e2947e commit 9d8406e
Showing 1 changed file with 3 additions and 3 deletions.
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:`

0 comments on commit 9d8406e

Please sign in to comment.