18 Commits
Author SHA1 Message Date
Scott Goodson 678c201dbc [ASLayout] Add additional validation step to intercept incorrect values in production and safely zero them out.
These conditions already had assertions, but at runtime, an insufficiently tested and incorrect ASLayoutSpec could
generate values that cause UIKit to enter an infinite loop (e.g. inside of UICollectionView layout validation).
2016-04-10 16:42:22 -07:00
Eric Jensen ddd5ff1f75 Correct spelling errors 2016-03-15 21:56:51 -07:00
Levi McCallum 5cf5cb8452 Delegate layout frame calculation to sublayout method 2016-02-10 11:44:12 -08:00
Levi McCallum 8cdea808ec Expose calculated frame on layout 2016-02-10 11:44:11 -08:00
Levi McCallum 8238da8d00 Fix node deletion and flatten identification issues 2016-02-10 11:44:11 -08:00
Levi McCallum 51977ed162 Identify flattened layouts to allow filtering of non-hierarchy nodes 2016-02-10 11:44:11 -08:00
Adlai Holler 717df1cfd2 Merge latest master and update Layout headers 2015-09-17 11:39:59 -07:00
rcancro c06a6be188 ASLayoutSpec are temporarily mutable and have a more obj-c interface 2015-08-21 16:02:36 -07:00
Huy Nguyen 3992e9b09b [appledoc] Fix all remaining warnings. 2015-07-12 17:27:44 +07:00
Huy Nguyen e1fd58268c Clean up #468:
- -layoutSpecThatFits: must return an ASLayoutSpec.
- Move ASDisplayNode's -measureWithSizeRange: redeclaration to ASDisplayNode.h.
- Rename ASStackLayoutChild.h to ASStackLayoutDefines.h.
- Rename ASStaticLayoutSpecDimension.h to ASRelativeSize.h.
- Don't import ASLayout.h in other headers to prevent circular inclusions.
- Explain use cases of ASLayout's initializers.
- Clean up ASInternalHelpers.h.
2015-07-10 19:41:17 +07:00
Ryan Fitzgerald 83ac5ad823 changing layoutableObject to be a weak reference to avoid retain cycle between ASDisplayNode and its Layout 2015-07-08 09:58:31 -04:00
Huy Nguyen 51f1ed819f - ASDisplayNode now caches calculated layout requested by layout specs.
- constrainedSizeForCalculatedLayout is of type ASSizeRange.
- calculatedLayout is better explained.
- Since ASLayout is cached and reused, its position property is mutable.
2015-07-06 22:08:01 +07:00
Huy Nguyen 2a3753516a Fix naming convention: Rename ASLayout's "children" to "sublayouts". 2015-07-01 18:13:54 +07:00
Huy Nguyen 2149d44990 Fix naming convetion:
- "Layout node" is changed to "layout spec".
- Update tests.
- Update Kittens sample.
2015-07-01 18:13:44 +07:00
Huy Nguyen eb5670032d ASDisplayNode flattens the ASLayout calculated from its layout spec and stores the result. This reduces memory footprint and gives -layout a performance gain. 2015-06-30 20:18:11 +07:00
Huy Nguyen 4799a9d206 Remove ASLayoutChild. ASLayout now has a position property defaults to (NAN, NAN). 2015-06-30 19:42:38 +07:00
Huy Nguyen f588bceb4d Introduce ASLayoutable and eliminate ASCompositeNode:
- Both ASDisplayNode and ASLayoutNode conforms to this protocol.
- ASDisplayNode can be embeded directly into layout graph.
- Eliminate ASCompositeNode.
- Fix ASStaticSizeDisplayNode not recpect min constrained size.
- Updated tests.
2015-06-26 09:29:16 +07:00
Huy Nguyen f8531f467d Add Layout nodes.
- The code is forked from LayoutComponents in ComponentKit.
- Public interfaces are modified to be strictly Objective-C. As a result, users are not forced to switch to Objective-C++, the linker can happily compile and Swift fans can continue using the mighty ASDK.
2015-06-25 11:32:30 +07:00