1.9
AsyncDisplayKit 1.9 is the largest release ever, by far!
Relative to the last release, 1.2.3, it has:
573 commits from 12 contributors
352 files changed with 15,932 lines added and 1,823 lines deleted
GitHub can't display the full comparison :).
If you are shipping a production app on 1.2.3, it is strongly recommended that you upgrade to 1.9. Please report any functional regressions, as it is expected to be a seamless update. All of the 1.2.3 API is still present, and is considered significantly improved, with important bug fixes and performance enhancements.
1.9 includes most of the features of AsyncDisplayKit 2.0, but is primarily intended to bring a large number of improvements to existing 1.2.3 users with low adoption cost. This release includes the automatic layout / Flexbox / CSS box model features, one of the key parts of 2.0.
Although the 2.0 features are also considered stable and are in production by large apps, there may be minor revisions to the API in the final 2.0 release. These could include property names, default values, and other tweaks that may require you to make small adjustments to your implementation after updating to 2.0. We will attempt to document any such breaking changes, and expect only a small number.
These release notes will not describe the full breadth of 2.0 features that are available in 1.9, but a raw list of brand new files is included below. We are still working on documentation for 2.0 features, which is one reason they are not yet highlighted. ASLayoutSpec in particular is a very powerful tool that clients are welcome to begin adopting immediately if you can figure it out without much documentation :)
- Extensive improvements to ASTableView, ASCollectionView, and their underlying architecture. This resolves all known crashers that could occur with complex editing interactions.
- ASCellNode can now seamlessly relayout and notify its parent Table / Collection to allow it to change its size, simply by calling -setNeedsLayout on the cell (no need to notify the Table / Collection).
- ASCollectionView now supports Supplementary elements for Flow layouts. A well-defined delegate API is available that allows custom layouts to support Supplementary elements as well.
- ASButtonNode is a new class that supports simple buttons, with multiple states for a text label and an image with a few different layout options.
- ASViewController Provides a mechanism to host a node hierarchy more easily without using a Table or Collection (automatically handling the measurement step). It's ideal for use in modal sheets, multi-tabbed apps, or when pushing new content in navigation controllers. This class is fairly simple and will be meaningfully extended in the November and December.
- ASCollectionNode provides an easy way to embed an asynchronous collection, complete with intelligent preloading, inside of an ASTableView or ASCollectionView. The most common use case is a horizontally-scrolling element inside of a cell in a vertically-scrolling table/collection. 2.0 will include a variant on this that is optimized for paging content, ASPagerNode.
- ASLayoutSpec and the many included subclasses provide an extremely simple yet powerful layout system. Check out the NSSpain talk for more information until documentation is available: https://www.youtube.com/watch?v=RY_X7l1g79Q
- ASCII Art is now a first-class citizen of AsyncDisplayKit :). ASLayoutSpecs can print complex hierarchies of objects in a visual text-based format, powered by ASAsciiArtBoxCreator. Because the text generation is abstracted out, it can later be expanded to print node hierarchies as well as the layout spec hierarchies — and may be suitable for you to use to log your own app objects!
- ASTextNode Placeholders are now disabled by default. This can be re-enabled by setting textNode.placeholderEnabled = YES; The text placeholders were causing performance overhead for some apps, and until they are further optimized, it is better for apps to opt-in for the behavior. An issue is tracking the optimization.
Please file new GitHub issues with any comments, questions, or requests you have.
Thanks for using AsyncDisplayKit!
New Files
Inside the AsyncDisplayKit/ directory
ASButtonNode.h
ASButtonNode.mm
ASCollectionNode.h
ASCollectionNode.m
ASTableViewInternal.h
ASViewController.h
ASViewController.m
Inside the new AsyncDisplayKit/Layout directory
ASAsciiArtBoxCreator.h
ASAsciiArtBoxCreator.m
ASBackgroundLayoutSpec.h
ASBackgroundLayoutSpec.mm
ASCenterLayoutSpec.h
ASCenterLayoutSpec.mm
ASDimension.h
ASDimension.mm
ASInsetLayoutSpec.h
ASInsetLayoutSpec.mm
ASLayout.h
ASLayout.mm
ASLayoutOptions.h
ASLayoutOptions.mm
ASLayoutOptionsPrivate.mm
ASLayoutSpec.h
ASLayoutSpec.mm
ASLayoutable.h
ASLayoutablePrivate.h
ASOverlayLayoutSpec.h
ASOverlayLayoutSpec.mm
ASRatioLayoutSpec.h
ASRatioLayoutSpec.mm
ASRelativeSize.h
ASRelativeSize.mm
ASStackLayoutDefines.h
ASStackLayoutSpec.h
ASStackLayoutSpec.mm
ASStackLayoutable.h
ASStaticLayoutSpec.h
ASStaticLayoutSpec.mm
ASStaticLayoutable.h
Inside the AsyncDisplayKit/Details directory
ASChangeSetDataController.h
ASChangeSetDataController.m
ASCollectionDataController.h
ASCollectionDataController.mm
ASCollectionViewFlowLayoutInspector.h
ASCollectionViewFlowLayoutInspector.m
ASDataController+Subclasses.h
ASIndexPath.m
ASPhotosFrameworkImageRequest.h
ASPhotosFrameworkImageRequest.m
Inside the AsyncDisplayKit/Private directory
ASBatchFetching.h
ASBatchFetching.m
ASInternalHelpers.h
ASInternalHelpers.mm
ASLayoutOptionsPrivate.h
ASLayoutSpecUtilities.h
ASMultidimensionalArrayUtils.h
ASMultidimensionalArrayUtils.mm
ASStackBaselinePositionedLayout.h
ASStackBaselinePositionedLayout.mm
ASStackLayoutSpecUtilities.h
ASStackPositionedLayout.h
ASStackPositionedLayout.mm
ASStackUnpositionedLayout.h
ASStackUnpositionedLayout.mm
_ASHierarchyChangeSet.h
_ASHierarchyChangeSet.m