31 Commits

Author SHA1 Message Date
Hannah Troisi
8e6f842b8d [ASLayoutElementStyle] implement -description with sizing info (#2495)
* Layout style object debugging

* Remove cocoapods crap
2016-11-01 07:58:43 -07:00
Garrett Moon
68990cb6cc Deprecations should be re-enabled. If there are specific deprecations… (#2519)
* Deprecations should be re-enabled. If there are specific deprecations we'd like to hold off on, we should address those specifically.

* Fix decleration

* Move select to undeprecated

* Fix deprecations
2016-10-31 17:30:40 -07:00
Garrett Moon
9aeef7b503 Revert "We need to ensure point dimensions are valid for sizing. (#2503)" (#2512)
This reverts commit 1165628905f92aa00c1605230f32953f5d7f0670.

I wanted to catch dimension issues early, we should move the assert to setting
width and height. The former was correct for here.
2016-10-31 00:02:50 -07:00
Garrett Moon
1165628905 We need to ensure point dimensions are valid for sizing. (#2503) 2016-10-28 15:18:45 -07:00
Michael Schneider
d4af95c9f1 Add ASLayoutSizeAuto (#2478) 2016-10-26 11:43:14 -07:00
appleguy
2c6f8b0506 [AsyncDisplayKit 2] Final changes to ease migration of clients to 2.0 APIs. (#2460) 2016-10-21 13:12:13 -07:00
Hannah Troisi
84d1a637d7 [2.0] add helpful deprecation messages (#2437)
[2.0] add helpful deprecation messages
2016-10-19 14:48:06 -07:00
Michael Schneider
3f11c67c82 Return CGSizeZero in case a ASNetworkImageNode is asked for the size and the image did not load yet (#2378) 2016-10-13 14:03:15 -07:00
Michael Schneider
8f8df537d2 Rename ASRelativeSize to ASLayoutSize (#2369) 2016-10-11 16:36:40 -07:00
Adlai Holler
c72b2b212c Tiny change to the doc for ASDimensionMake (#2362) 2016-10-07 10:00:58 -07:00
Adlai Holler
124234fef8 [Umbrella] Add warn_unused_result Attribute to Public Headers (#2353)
* Add some warn_unused_result attributes

* Add more

* Add some more
2016-10-06 16:44:49 -04:00
Michael Schneider
d6e5e27c39 [Layout] Add helper properties for setting sizes via CGSize and ASRelativeSize (#2324)
* Remove set layout style size helper

* Update API to set and get a CGSize / ASRelativeSize from an ASLayoutElementStyle

- Expose ASRelativeSize type
- Add new helper properties to set a size / relative size to ASLayoutElementStyle
- Don't expose the size in ASLayoutElementStyle anymore and move into ASLayoutElementStylePrivate

* Update examples

* Update comments for size helpers
2016-10-04 12:35:45 -04:00
Hannah Troisi
7551627b58 [Layout] Rename ASLayoutable to ASLayoutElement (#2290)
* [Layout API] Rename ASLayoutable to ASLayoutElement

* arg

* fix wrapperWithLayoutElement

* [Layout API] Rename ASLayoutable to ASLayoutElement

* arg

* address Michael's comments

* Remove ASLayoutValidation files that were deleted on master since this diff was created.
2016-09-29 00:02:47 -07:00
Michael Schneider
a9857f9963 Add assertions for creating an invalid ASDimension from type ASDimensionUnitAuto and ASDimensionUnitFraction (#2268) 2016-09-22 15:48:36 -07:00
Michael Schneider
8897614f0e [Layout] Layout API based on content area (#2110)
* Initial commit for adding a size constraint to ASLayoutable's

* Some more commits

* Fix sample projects in extra/

* Remove preferredFrameSize test of ASEditableTextNode

* Remove preferredFrameSize from examples_extra

* Add deprecation warning to -[ASDisplayNode preferredFrameSize]

* Add deprecation warning to -[ASDisplayNode measureWithSizeRange:]

* Commit

* Commit

* Remove ASRelativeSizeRange

* Make ASRelativeSize private

* Adjust examples

* Improve setting of -[ASLayoutable size] with points or fractions

* Add ASWrapperLayoutSpec

* Improve creation of ASRelativeDimension

* Add `preferredFrameSize` back and add deprecated logging

* Add `layoutSpecBlock` setter and getter and add locking for it

* Add better documentation and fix macros to create ASRelativeDimension

* Create new ASSizeRangeMake with just a CGSize as parameter

* Update Kitten and Social App Layout example

* Add layoutThatFits: and deprecate measure:

* Rename ASRelativeDimension to ASDimension

* Fix examples for ASDimension renaming

* Remove fancy height and width setter

* Fix ASDimension helper

* Rename -[ASLayout layoutableObject] to -[ASLayout layoutable]

* Update layout related methods and more clearer documentation around how to use it

* Deprecate old ASLayout class constructors

* Don't unnecessary recalculate layout if constrained or parent size did not change

* Use shared pointer for ASDisplayNodeLayout

* Fix rebase conflicts

* Add documentation and move implementation in mm file of ASDisplayNodeLayout

* Fix test errors

* Rename ASSize to ASLayoutableSize

* Address comments

* Rename setSizeFromCGSize to setSizeWithCGSize

* Improve inline functions in ASDimension

* Fix rebase conflicts
2016-09-07 08:44:48 -07:00
Adlai Holler
eb9f86cfdb Replace "percent" with "fraction" where appropriate 2016-08-10 10:26:21 -07:00
Michael Schneider
729766a365 Add convenience functions to create relative sizes with percentage 2016-07-15 10:51:45 -07:00
Hannah Troisi
c857e809f4 Clean up header comments (for consistent Facebook licensing info) (#1741)
[Licensing] Clean up header comments (for consistent Facebook licensing info)
2016-06-11 23:31:39 -07:00
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
Huy Nguyen
81d26994c5 Introduce ASLayoutableContext
- The struct is mapped to ID of the current thread and used by subnodes to decide whether they should proceed measurement.
2016-03-27 17:09:59 -07:00
appleguy
a4e3ba49b4 Merge pull request #1349 from levi/patch-8
[ASDimension / ASSizeRange] Add ASSizeRangeMakeExactSize method
2016-03-11 21:21:09 -08:00
Huy Nguyen
fa8f2f4429 Implement async transition 2016-03-11 18:56:58 -08:00
Levi McCallum
a07f7b73f0 Change method name in header 2016-03-09 10:42:35 -08:00
Levi McCallum
167b7d404e Add header for extern ASSizeRangeMakeWithExactCGSize 2016-03-09 10:38:25 -08:00
Adlai Holler
717df1cfd2 Merge latest master and update Layout headers 2015-09-17 11:39:59 -07:00
Huy Nguyen
3992e9b09b [appledoc] Fix all remaining warnings. 2015-07-12 17:27:44 +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
99fe79339d Simplify ASDimension:
- ASRelativeSize and ASRelativeSizeRange are used only by ASStaticLayoutNode. They are declared in a standalone header.
- ASDimension contains a minimal set of new size types required to use the common layouts. Thus minimize the learning curve.
2015-06-25 11:36:02 +07:00
Huy Nguyen
259bbf22bc Fix naming conventions on equal and resolve methods of new size types. 2015-06-25 11:34:37 +07:00
Huy Nguyen
93564899fd Remove Auto size type. 2015-06-25 11:34:37 +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