135 Commits

Author SHA1 Message Date
Adlai Holler
d273cda2b0 Remove unneeded _block specifier 2015-11-26 10:46:26 -08:00
Adlai Holler
41ecaa7bb2 _ASHierarchyChangeSet: add section change mapping methods, fix section exclusions 2015-11-26 10:42:35 -08:00
Adlai Holler
4bfdd82568 _ASHierarchyChangeSet: Exclude item-level changes that are redundant with section-level changes 2015-11-25 17:18:58 -08:00
Adlai Holler
b5e19a24a9 Consistency 2015-11-24 18:48:07 -08:00
Adlai Holler
2d633f118b Fix it better 2015-11-24 18:44:10 -08:00
Adlai Holler
6b3f0ada12 Fix table view change coalescing bug 2015-11-24 18:10:59 -08:00
Scott Goodson
2a0b9c8e14 Substantially improve behavior of nested Table & Collection Nodes
This ensures memory cleanup happens correctly and introduces a new test project
to support developing new features while stressing tough use cases for correctness.
2015-11-14 15:25:35 -08:00
Scott Goodson
98010c4e16 Include moved UIResponder methods in UIViewBridging Category Implementation. 2015-11-08 00:12:13 -08:00
appleguy
0598935957 Merge pull request #793 from nguyenhuy/ImproveCellNodeRelayout
ASCellNode delegate to automatically resize in table & collection when -setNeedsLayout called.
2015-11-01 11:11:32 -08:00
Huy Nguyen
cd31f884dd Move ASDisplayNodePerformBlockOnMainThread to ASInternalHelpers 2015-10-29 16:09:36 +02:00
Adlai Holler
50485663b9 Never use setAnimationsEnabled: so we don't risk corrupting enabledness 2015-10-28 16:09:56 -07:00
Ethan Nagel
a2bc2074cc release any CGColor's set while the node is in a pending state 2015-10-28 11:01:01 -07:00
appleguy
2c8626e1f6 Merge pull request #753 from nguyenhuy/DataControllerSortedTransaction
Sort edit commands during batch updating of table and collection views
2015-10-26 13:40:06 -07:00
Huy Nguyen
fd0b3aaf52 Revert "Revert "Make ASDisplayNode.name Thread Safe""
This reverts commit 906d7c759b471eda67b95574199b6f91d46b6782.
2015-10-26 06:29:01 +02:00
Huy Nguyen
ecc5e1ac83 Remove duplicate steps while coalescing changes in _ASHierarchyChangeSet 2015-10-26 06:22:30 +02:00
Huy Nguyen
0315d628c5 Rename as_inverseCompare to asdk_inverseCompare for prefix consistency 2015-10-26 06:22:30 +02:00
Huy Nguyen
5ea4b1b92d Implement ASChangeSetDataController. 2015-10-26 06:22:30 +02:00
appleguy
906d7c759b Revert "Make ASDisplayNode.name Thread Safe" 2015-10-25 19:40:47 -07:00
Adlai Holler
0d53a82985 Remove dead flag 2015-10-24 01:20:42 -07:00
Adlai Holler
55e22d2e57 Clean up more remnants of Old Ways 2015-10-24 01:09:31 -07:00
Adlai Holler
5a8e7daace Implement ASDisplayNode.name separate from CALayer 2015-10-24 00:56:00 -07:00
Huy Nguyen
5a2fea7c1d Use bounds and position to layout subnodes, instead of frame because it is not safe in case the transform property constains a non-identity transform. 2015-10-07 21:54:48 +03:00
ricky cancro
89a216b90d Fixes to baseline stack alignment
1) Set the ascender/descender of an ASTextNode when the attributeString is set. Previously ascender/descender were only being computed in `setValuesFromLayoutable` and only when the attribute string was not nil. May make sense to remove the computation from `setValuesFromLayoutable` entirely.
2) Remove ability to allow different children of a stack spec to aling to different baselines. This wasn't working before and I'm not convinced it is possible to do properly/useful enough to invest the time.
3) Have all stack spec run `ASStackBaselinePositionedLayout::compute` to compute the stack's ascender and descender. Even if the stack isn't aligning its children to a baseline, the stack itself may be a child of another stack that IS aligning to a baseline.
2015-10-06 21:41:39 -07:00
Garrett Moon
8a70c8d416 Adds support for disabling and re-enabling should rasterize. 2015-10-06 11:47:13 -07:00
Garrett Moon
b1d03f1d58 Address comments 2015-10-05 16:02:01 -07:00
Garrett Moon
d6c107a896 Fix shouldRasterizeSubnodes skipping setting offset and clipping. 2015-10-05 16:02:01 -07:00
Scott Goodson
61bb4f022e Improved messages for thread affinity and frame transform identity assertions. 2015-10-04 11:15:57 -07:00
Garrett Moon
c90708a25b Corner radius and clipsToBounds should be captured outside block 2015-10-02 09:30:49 -07:00
Scott Goodson
a58844379c Implementation of Synchronous Concurrency features for AsyncDisplayKit 2.0
This provides internal features on _ASAsyncTransaction and ASDisplayNode to facilitate
implementing public API that allows clients to choose if they would prefer to block
on the completion of unfinished rendering, rather than allow a placeholder state to
become visible.

The internal features are:
-[_ASAsyncTransaction waitUntilComplete]
-[ASDisplayNode recursivelyEnsureDisplay]

Also provided are two such implementations:
-[ASCellNode setNeverShowPlaceholders:], which integrates with both Tables and Collections
-[ASViewController setNeverShowPlaceholders:], which should work with Nav and Tab controllers.

Lastly, on ASDisplayNode, a new property .shouldBypassEnsureDisplay allows individual node types
to exempt themselves from blocking the main thread on their display.

By implementing the feature at the ASCellNode level rather than ASTableView & ASCollectionView,
developers can retain fine-grained control on display characteristics.  For example, certain
cell types may be appropriate to display to the user with placeholders, whereas others may not.

Follow-up work will include unit tests, revisiting names, and the header locations of definitions.
2015-09-27 19:14:36 -07:00
Scott Goodson
47be24037d Reduce _ASAsyncTransaction allocations by ensuring nodes without display methods don't create them. 2015-09-24 19:26:00 -07:00
Jack Flintermann
ce33149548 make additional private headers actually private; import all public headers in AsyncDisplayKit.h 2015-09-16 23:31:48 -04:00
rcancro
9c8aaeb17e Move ASLayoutOptionsPrivate to the private folder
fixes:
https://github.com/facebook/AsyncDisplayKit/issues/654
2015-09-15 17:11:20 -07:00
rcancro
2f3562fa09 scott's comments 2015-09-15 09:11:19 -07:00
rcancro
01be5acece added a callback for initWithViewBlock/initWithLayerBlock 2015-09-14 20:36:08 -07:00
rcancro
b14e189bfb Addressed comments to LayoutOptions PR 2015-09-11 16:07:18 -07:00
rcancro
4bb8472182 Removed ASBaselineLayoutSpec and made baseline alignment part of ASStackView 2015-09-10 17:29:39 -07:00
Ethan Nagel
8ea40a0265 Merge branch 'master' into ASDisplayNode-init-perf
Conflicts:
	AsyncDisplayKit/ASDisplayNode.mm
	AsyncDisplayKit/Private/ASDisplayNodeInternal.h
2015-09-09 22:17:49 -07:00
rcancro
5786bc1b5b Fixed infinite recursion in finalLayoutable, removed child properties from ASLayoutSpecs 2015-09-08 09:50:47 -07:00
rcancro
8263a9f53a Kittens sample working 2015-09-08 09:50:47 -07:00
rcancro
cbaf178950 Hide ASLayoutOptions from the user 2015-09-08 09:50:47 -07:00
rcancro
15b3fd6eab Moved ASLayoutable* properties into ASLayoutOptions class 2015-09-08 09:50:27 -07:00
Garrett Moon
32582fca58 Fixes shouldRasterizeSubnodes
Currently, subnodes of nodes marked with shouldRasterizeSubnodes do not get layout calls. This adds the call to layout and changes the __layout method to reference self.bounds instead of _layer.bounds.

Also adds support for corner radius when rasterizing subnodes.
2015-09-01 13:25:27 -07:00
rcancro
9bf62d14ab Merge remote-tracking branch 'upstream/master' into baseline
# Conflicts:
#	AsyncDisplayKit/Layout/ASLayoutSpec.h
#	AsyncDisplayKit/Layout/ASStackLayoutSpec.mm
2015-08-24 09:54:36 -07:00
rcancro
1d31a21ccb Merge branch 'baseline' of github.com:rcancro/AsyncDisplayKit into baseline
# Conflicts:
#	AsyncDisplayKit.xcodeproj/project.pbxproj
#	AsyncDisplayKit/ASTextNode.h
#	AsyncDisplayKit/Details/ASDataController.mm
2015-08-22 19:14:59 -07:00
rcancro
e991242513 removed "Stack" from baseline related layout names 2015-08-22 19:03:55 -07:00
rcancro
49ac178166 huy's comments 2015-08-22 19:03:55 -07:00
ricky cancro
5d286930f6 Renamed ASStackText... to ASBaselineStack... 2015-08-22 19:03:54 -07:00
rcancro
830d39af92 fixed bug for baseline last 2015-08-22 19:03:54 -07:00
ricky cancro
2d6ddfe32e moved baseline alignment to a layout spec. 2015-08-22 19:03:54 -07:00
rcancro
9036ab8e7d new stack layout spec for text 2015-08-22 19:03:54 -07:00