123 Commits

Author SHA1 Message Date
Levi McCallum
36d24950e0 Add custom collection view layout example project 2015-11-27 18:58:44 -08:00
Scott Goodson
18dffb41e8 Fix an issue that could cause the view / layer to be created early by -clearContents. 2015-11-19 17:10:06 -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
appleguy
b295eda4b1 Merge pull request #823 from vitalybaev/SocialAppExample
New example app -- a "social" feed similar to Facebook or Twitter
2015-11-08 18:53:22 -08:00
appleguy
7c9698a833 Merge pull request #812 from nguyenhuy/ImproveCellNodeLayoutDelegate
Improve cell node layout delegate
2015-11-08 18:29:35 -08:00
Vitaly Baev
d143aba6c2 changed deployment target and device family in SocialApp example 2015-11-06 19:38:30 +03:00
Vitaly Baev
318bb0342a fix Travis-CI build for SocialApp example 2015-11-06 19:02:09 +03:00
Vitaly Baev
19c2e8b2e3 Fixed copyright in SocialApp example 2015-11-06 17:11:39 +03:00
Vitaly Baev
78293ad785 Added example of typical social app layout example 2015-11-06 17:09:11 +03:00
appleguy
fd24314c69 Merge pull request #801 from facebook/RangeTeardown
Add "Push Another Copy" to ASViewController demo for memory testing.
2015-11-04 23:06:03 -08:00
Huy Nguyen
9e4c274a5b Animate relayout in Kittens example 2015-11-04 16:53:36 +02: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
Scott Goodson
fdcace6061 Add multiple view push to the ASTableViewStressTest app to evaluate memory issues
No issues found.  Have not been able to create a leak either with the test itself
or scrolling / popping back view controlliers.
2015-11-01 10:54:11 -08:00
Scott Goodson
59c1a642ba Add reload button to ASViewController demo for memory testing. 2015-10-31 16:53:56 -07:00
Scott Goodson
2e331656cf Add "Push Another Copy" to ASViewController demo for memory testing.
So far unable to reproduce the reports of rows or items not being released.
2015-10-31 16:40:26 -07:00
Scott Goodson
3416450f11 Adding ASButtonNode. Simple but flexible, add features as desired! 2015-10-31 15:12:05 -07:00
Scott Goodson
3175ce2fe7 Fix retain cycle in basic, cache-less ASNetworkImageNodes
This should not directly affect more complex apps that don't use the ASBasicImageDownloader.

Also disables the default-on text placeholders, as they churn memory during the measurement pass.
These were intended to be written with pure layers (without using backing stores), so I don't
think it is a reasonable default-on behavior until that is fixed.
2015-10-30 22:42:05 -07:00
Huy Nguyen
fb18e7635b Notify ASCellNodeDelegate even if a relayout doesn't result in a resize
If the delegate is an ASTableView, relayoutAnimation will still be considered for animation.
2015-10-29 21:27:29 +02:00
Huy Nguyen
00400e166f Introduce ASCellNodeDelegate
- Cell node automatically notifies the delegate after a relayout (via -setNeedsLayout) that results in a new size. Confirming to ASCellNodeDelegate; ASTableView and ASCollectionView reload the calling cell upon notifications. These views automatically set themselves as delegate of every node.
- The result is that ASCellNode subclasses don't need to manually notify the containing view. Thus, `-relayoutItemAtIndexPath` and `-relayoutRowAtIndexPath` are removed.
- Kittens example is updated to reflect the change.
2015-10-29 16:59:46 +02:00
appleguy
7e616756a7 Merge pull request #722 from nguyenhuy/RelayoutCellAPI
Add relayout item/row APIs to ASTableView and ASCollectionView
2015-10-25 21:28:20 -07:00
Levi McCallum
722b90f1cf Implement basic immediate reloadData method on table and collection view 2015-10-22 21:28:44 -07:00
Levi McCallum
c33d6efa8a WIP synchronous reload data on collection view 2015-10-22 21:28:30 -07:00
Levi McCallum
ee0cc2001a Add support for loaded node layout for supplementary views 2015-10-15 11:40:52 -07:00
Levi McCallum
a9023dd400 Fix layout of example supplementary nodes 2015-10-15 11:40:52 -07:00
Levi McCallum
fddb0061b0 Use ASCellNodes for supplementary nodes 2015-10-15 11:40:52 -07:00
Levi McCallum
e410595f42 Add functioning header/footer supplementary view support to example 2015-10-15 11:40:50 -07:00
Levi McCallum
afda471bd0 Clean up interfacing with internal editing/completed stores 2015-10-15 11:40:50 -07:00
Levi McCallum
da7a2a5d48 Further implement data controller support and layout introspection 2015-10-15 11:40:49 -07:00
Levi McCallum
e492770aed Expose collection view supplementary node data source method 2015-10-15 11:38:48 -07:00
Levi McCallum
0d2332bd82 Allow ASCollectionView to register for supplementary container 2015-10-15 11:38:48 -07:00
Levi McCallum
4e32c075d4 Add launch storyboard to collection view example to fix screen size 2015-10-15 11:38:47 -07:00
Levi McCallum
2956c0cd8a Extract flow layout methods into a separate delegate 2015-10-15 11:38:47 -07:00
Huy Nguyen
210a89e83c Animate subnodes swap in Kitten example. 2015-10-12 22:24:19 +03:00
Huy Nguyen
f13f61c2f0 Add relayout item/row APIs to ASTableView and ASCollectionView. 2015-10-07 21:25:07 +03: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
appleguy
c824644482 Merge pull request #685 from facebook/ASTableViewStressTestFix
Fix simple issue with ASTableViewStressTest, make Table / Collection handle changes to dataSource / delegate.
2015-09-24 20:14:51 -07:00
Scott Goodson
ee4b771d5d Fix simple issue with ASTableViewStressTest, make Table / Collection handle changes to dataSource / delegate. 2015-09-24 19:59:12 -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
Huy Nguyen
1ef1b647c9 Remove unnecessary import in ScreenNode.m 2015-09-17 15:59:38 +03:00
Huy Nguyen
8ebc3bdf67 Fix Multiplex sample does not load image: screenNode must be started before its -fetchData method is called. 2015-09-17 15:59:38 +03:00
Huy Nguyen
72d108cd98 Minor fixes in ASViewController and Multiplex sample. 2015-09-17 15:58:21 +03:00
Huy Nguyen
07c0d78c71 Add ASViewController and update Multiplex sample to use it. 2015-09-17 15:58:21 +03:00
Adlai Holler
b1dfaa1eff Update project indentation settings 2015-09-16 14:17:52 -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
rcancro
61b72d2c46 fix kittens example 2015-09-08 09:49:40 -07:00
Scott Goodson
08e31e1c37 Created ASCollectionNode with new example project.
Eases support for nesting horizontally scrolling elements within a vertical scroller.

Further changes will improve the API, and optimize handling of the nested working ranges.
2015-09-07 12:54:42 -07:00
appleguy
ecfacd0bd7 Merge pull request #621 from nguyenhuy/table_cell_node_min_width
New min constrained width for cell nodes in table view
2015-08-28 23:47:22 -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
680305704a addressed comments and fixed tests 2015-08-21 21:03:40 -07:00