Skip to content
This repository has been archived by the owner on Feb 2, 2023. It is now read-only.

Releases: facebookarchive/AsyncDisplayKit

1.9.5

14 Jan 08:49
Compare
Choose a tag to compare

AsyncDisplayKit 1.9.5 is a a smaller service release, but with several worthwhile and important improvements. Users on versions 1.9.4 or 1.9.3 should read the notes to determine if the two included bug fixes are critical for their apps. 1.9.5 is recommended for all production users as the stable version of ASDK.

37 commits from 7 contributors
54 files changed with 1,154 lines added and 349 lines deleted

New:

  • Significant upgrades to the new ASRangeControllerBeta, available to be enabled in ASDisplayNode+Beta.h — please report any bugs, and don’t rely on it for production without sufficient testing of your use case. This is the future of the framework - please give it a try if you have a chance, and file an issue or email me if you hit any kind of problem. Fortunately, there are not going to be any API changes required for app developers to benefit from this internal infrastructure component that drives the heart of some of ASDK's most important systems. Make the ASDisplayNode class method call at the beginning of your appDidFinishLaunching method if you want to enable it.
  • Lightweight generics support for the Node type in ASViewController, so strong typing information is available when accessing and calling custom subclass methods on it.
  • New didEndDisplayingNode: callback that provides the node that was just moved offscreen in case it has also been removed from the datasource. Available on both ASTable* and ASCollection.*
  • Workaround for an Apple force touch handling bug: iPhone 6S-specific ASControlNode issue where some taps could cause action methods to be triggered twice. There appears to be an Apple 9.2 bug — touchesEnded: may be called twice, for only one touchesBegan! It will probably be fixed in 9.3, as a radar is also tracking it, but ASControlNode is now robust against the errant force touch calling behavior.

Key bug fixes for 1.9.4:

  • Fixes a regression from 1.9.4 where retaining only the ASCollectionView or ASTableView could lead to a strong retain cycle.
  • Fixes a regression from 1.9.4 where removing index paths from a collection or table could cause a crash in the range controller under certain edit or scrolling patterns.

Cautions / Notes

  • A warning may trigger if you are using the older didEndDisplayingNodeAtIndexPath: call; it will still work fine at runtime. Simply adopt the new method signature that includes the node parameter, even if you don't need the parameter.
  • Replaced ASButtonState with ASControlState. Only affects ASButtonNode users, not ASControlNode users.

Full commit list here: 1.9.4...1.9.5

As always, email asyncdisplaykit@gmail.com with any questions or comments. Thanks for following the development of our framework — I hope the community continues to bring you advanced and exciting software technology for years to come!

1.9.4

31 Dec 10:23
Compare
Choose a tag to compare

AsyncDisplayKit 1.9.4 is an exciting release for Swift and Objective-C developers alike, as it broadly adopts generics and nullability annotations!

It also adds ASPagerNode, includes numerous impactful performance optimizations, and fixes a few subtle but important issues from 1.9.3.

This release is recommended for all production users. Please see the notes section below before installing for details on minor changes that could affect your project.

This release is double the size of 1.9.3 in most metrics, even with 1.9.3's big text engine changes:
201 commits from 14 contributors
219 files changed with 3,945 lines added and 1,170 lines deleted

New:

  • ASPagerNode is a new component - a truly fast replacement for UIPageViewController, with a simpler and cleaner API as well. It subclasses ASCollectionNode.
  • The API has been broadly updated with generics and nullability annotations! This improves interoperation with Swift and helps type-checking with Objective-C as well. Expect more to come — and send in your diffs if you see a good adoption opportunity. I’m excited to add a covariant type to ASViewController, allowing subclasses to specify the exact node type that an it wraps!
  • Performance optimizations have been done across the system at several levels of the stack. The improvements should be directly visible for many apps - if you were able to make ASDK stutter before, then it should now be substantially less. That said, with more advanced tricks, you should be able to eliminate any stutters - send me an email!
  • Xcode 7 now runs Unit Tests for ASDK. We had to work around some crappy Apple Bugs, but hey, we're up and running. This is exciting because we can now see Code Coverage for our unit tests right in Xcode. So folks: run them early, run them often, and please write up a few test PRs for a guaranteed showering of love from the community :). Check out the screenshot - it allows you to enjoy how well covered our key components are, while spotting easy to fix blind spots!
  • ASMapNode has new API refinements and a more robust implementation. Its standard mode is a fully asynchronous snapshot, with loading automatically triggered by any ASTableView or ASCollectionView; its liveMap mode can be flipped on with ease to provide a cached, fully interactive map when necessary. ASMapNode is now being successfully used in production apps. File bugs or feature requests and we’ll jump on them!
  • ASVideoNode was not merged for this release, but remains available as a PR. The team has some big plans for it, and wants to make it a highly flexible, customizable, and fast video component. Let us know what features you’d like to see it include! #952
  • ASDisplayNode+Beta.h is a new playground for nerds - and we just got the permit to build it :). There are a couple tantalizing options there in 1.9.4, and I have to say that both of them are quite solid and useful. More to come here...

Key bug fixes for 1.9.3:

  • Fix for flashing of content after rendered nodes were removed from the view hierarchy and then re-added. This returns the behavior to the UIKit expectations that only a memory warning will clear the contents of a rendered view that is taken offscreen. Developers may manually call -clearContents or -clearFetchedData (or the -recursively* versions) to reclaim memory in these situations, especially if it is unlikely that the view contents will be needed again soon.
  • Fix for line wrapping / text layout issue caused by the new text renderer in 1.9.3. There are now no known text regressions from the shiny new renderer.
  • ASTextNode is now smarter about how it decides that the text renderer needs to be recreated, leading to fewer new renderer creations. This fixes a performance regression from 1.9.3, but goes further to achieve the greatest state of optimization that the framework ever has.

Cautions / Notes

  • A warning may trigger if you are using the asyncDataFetching: parameter for ASTableView or ASCollectionView initializers, as it is now deprecated. It will still work fine, unless your project treats warnings as errors. Simply delete the asyncDataFetching: argument, as it has been ignored internally for several versions.

  • As a reminder: features added to AsyncDisplayKit since 1.9 are considered to be in “late Beta” form until 2.0 launches in Q1 2016. This includes ASMapNode, ASPagerNode, ASInterfaceState, ASVideoNode, etc. I encourage the community to make use of these new features - but also evaluate their suitability for your use case, skim their implementation, and file issues for any bugs or feature requests.

  • ASCollectionView no longer supports forwarding the below methods to its delegates. Though accurate the majority of the time, they were not intended to be forwarded, as the calls can be misleading if they are triggered during an edit transaction. A task has been opened to track implementation of the fully supported versions. Please let me know if these calls are important to you, and I can provide a workaround.

      collectionView:canMoveItemAtIndexPath:
      collectionView:moveItemAtIndexPath:toIndexPath:
      collectionView:willDisplaySupplementaryView:forElementKind:atIndexPath:
      collectionView:didEndDisplayingSupplementaryView:forElementOfKind:atIndexPath:
    

Full commit list here: 1.9.3...1.9.4

As always, email asyncdisplaykit@gmail.com with any questions or comments. Thanks for following the development of our framework — I hope the community continues to bring you advanced and exciting software technology for years to come!

screen shot 2015-12-31 at 2 15 46 am

1.9.3

07 Dec 06:35
Compare
Choose a tag to compare

AsyncDisplayKit 1.9.3 is another big release! It has a fully revamped text engine, adds ASMapNode, and fixes two notable bugs from 1.9.2 last week. Recommended for all production users - but note that there is one "find-and-replace" API rename (see below).

72 commits from 7 contributors
92 files changed with 3,255 lines added and 1,846 lines deleted

New:

  • New ASTextNode Rendering Engine - back-ported from ComponentKit! Thanks to @ocrickard, who has done amazing work on this component both for the original ASDK 1.0 version and the subsequent improvements in a ComponentKit fork. @levi did some epic work here to cleanly back-port around a year of improvements to this essential and amazingly powerful part of ASDK.
  • ASMapNode is available for the first time. Note: its primary initializer method will be changed soon to require a region rather than coordinate. It supports easily switching to liveMap mode - try adding a simple tap gesture recognizer to the map for users to enable it! The new map component offers completely asynchronous preparation, automatic preloading, and efficient memory handling.
  • New ASHierarchyState property on ASDisplayNode. This bitfield, currently internal, provides new performance enhancements and enables simplification of internal framework behaviors. This is top-down state that is pushed down from each node (which adds any special options it has enabled, such as rasterization or the ability to drive .interfaceState). Newly added nodes inherit their parent’s ASHierarchyState, too.
  • ASTextNode property rename: .maximumLineCount is now .maximumNumberOfLines. The behavior and values are identical, so please find-and-replace in your project if you use this property.

Key bug fixes for 1.9.2:

  • ASHierarchyState resolves an extremely rare deadlock caused by checks for a supernode that has rasterization enabled, by making this information available to each node without any locking calls to parent nodes. It is now banned to access the supernode hierarchy if the main node lock is held.
  • ASInterfaceState is now automatically set to “InHierarchy” when nodes outside of the management of an ASRangeController are added to a window. This fixes automatic loading of images outside of Tables and Collections.

Full commit list here: 1.9.2...1.9.3

Thank you, ComponentKit team! It's great hacking with you :)

screen shot 2015-12-06 at 10 00 43 pm

1.9.2

30 Nov 06:52
Compare
Choose a tag to compare

AsyncDisplayKit 1.9.2 has two very useful new APIs, and several key refinements over 1.9.1. It is recommended for all production users of ASDK.

60 commits from 6 contributors
125 files changed with 3,565 lines added and 492 lines deleted

New APIs:

  • ASStackLayoutSpec now includes Space Between and Space Around as options for .justifyContent. This enables positioning two elements at the opposite extremes of a stack (in either orientation), and additional elements equally spaced in between. Optionally, Space Around allows you to donate half a padding width to before the start and after the end (could be simulated using an ASInsetLayoutSpec). These capabilities are part of FlexBox, but that neither ASDK or CK had implemented it yet: #848
  • Powerful new ASInterfaceState property on ASDisplayNode. This bitfield allows any node in the hierarchy to know if it is in the fetch data, render, or visible ranges at any time, and react to any state transitions. Though calls for the FetchData and Render ranges had existed, it was not possible to read the current state — and the Visible range is brand new, with many animation-related uses.

Other Noteworthy:

  • Another awesome new example app in examples/CustomCollectionView, showing a Pinterest-like collection view layout with support for supplementary nodes.
  • Bug fix for issues with ASRangeController that cause a failure to call range-related callback for visible elements after reloading data of a table or collection.
  • Bug fix for loading issues with ASMultiplexImageNode (especially, a newly-set higher res URL may not load if the node is already in the FetchData range).

Full commit list here: 1.9.1...1.9.2

Thanks for using AsyncDisplayKit! I'd love to hear your questions or suggestions in a Github Issue.

screen shot 2015-11-29 at 10 41 57 pm

1.9.1

09 Nov 04:28
Compare
Choose a tag to compare

AsyncDisplayKit 1.9.1 has several useful refinements over 1.9, and is recommended for all production users of ASDK. Relative to 1.9, just a week ago, it has:

28 commits from 5 contributors
64 files changed with 1,795 lines added and 95 lines deleted

  • Fantastic new example app in examples/SocialAppLayout, showcasing how to use ASLayoutSpec in a variety of circumstances that should be familiar to most app developers. Dig in and look at the -layoutSpecThatFits: methods!
  • Improved ASCellNode Resizing / Relayout. Now simply by doing -setNeedsLayout on an ASCellNode, you can even change the size in its containing ASTableView or ASCollectionView! If you call -layoutIfNeeded inside an animation block, the change will animate for you. Gone are the days where it is tough and frustrating to handle cell resizing with UIKit.
  • New class ASTableNode to go alongside ASCollectionNode (added previously). It makes it easier to add an ASTableView as part of a node hierarchy. Example: using ASCollectionView as a full-screen horizontal pager, you might use an ASTableNode inside each of the collection's ASCellNodes. This class does not yet have the ability to size itself based on its content, so take care to position it using manual layout or an ASStaticLayoutSpec. It does work with Intelligent Preloading, like ASCollectionNode.
  • Bug fix for an unusual cell content blanking issue when the content was scrolled down after a relatively large new cells is inserted above existing cells.
  • Bug fix for a memory issue where a small number of nodes could have been orphaned and not deallocated in apps that use row / item deletion calls (does not appear to affect reloads or insertions).

Full commit list here: 1.9...master

Thanks for using AsyncDisplayKit! I'd love to hear your questions or suggestions in a Github Issue.

screen shot 2015-11-08 at 8 13 16 pm

screen shot 2015-11-08 at 8 13 25 pm

1.9

01 Nov 20:23
Compare
Choose a tag to compare
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

1.2.3

26 Jul 19:37
Compare
Choose a tag to compare

AsyncDisplayKit 1.2.3 has about 15 commits with 4 committers. It has 22 files changed with 650 additions and 91 deletions

Special thanks to @eanagel for this release. He did some great debugging and made several important changes on top of the recent work done in ASTableView & ASCollectionView.

The changes he made include a couple well-considered API improvements, and key bug fixes:

  • Crash fix for some clients using the batch editing API of ASTableView. Please report any issues encountered with the table or collection classes, as we believe the full API surface area of these complex and high-performance app components to be stable for production-critical usage.
  • ASTableView now provides an option to automatically adjust its content offset to keep content in place across data source editing operations.
  • ASCollectionView now supports batch updating via the block-based API (same as UICollectionView).
  • Completion blocks are now provided by both ASTableView and ASCollectionView for begin/endUpdates and the block-based update API, respectively. The completion block is called after the results of the edit transaction have been exposed to UIKit, which allows for sophisticated use cases to account for the asynchronous layout stage that occurs between insertion of new content and those elements entering the scrollable range.
  • ASCollectionView now enforces an assertion that its asyncDataSource /not/ implement the method that provides supplementary views. Supplementary views are not currently supported, but implementation of support can be expected within a few weeks. This is usually easy to work around by adjusting index paths and using regular items in place of supplementary views.
  • Significantly expanded header documentation (AppleDoc format, posted on asyncdisplaykit.org).

This release excludes the automatic / box model layout features that have been in master for a few weeks. Those changes are quite stable right now — feel free to run AsyncDisplayKit master if you are willing to adapt to a few API tweaks before 2.0 is released around September.

There will likely be a couple more releases before AsyncDisplayKit 2.0. Please file an issue or start a topic in our Google Group if there are improvements you would like to see in an upcoming 1.x release, or in 2.0!

https://groups.google.com/forum/#!forum/asyncdisplaykit

1.2.2

05 Jul 21:18
Compare
Choose a tag to compare

AsyncDisplayKit 1.2.2 has about 63 commits with 10 committers. It has 59 files changed with 2,884 additions and 768 deletions

Despite all that in a point release, we already have AsyncDisplayKit 2.0 Beta getting ready for release. With over 150 files changed as part of the Box Model layout support being added with PR #468, it will be the biggest change ASDK has seen since its public launch.

Thank you to all the members of the community who contributed, both via reports and diffs. Keep the feedback coming, as it's leading to great new things.

  • ASTableView and ASCollectionView are substantially overhauled, with ASDataController, ASRangeController, and ASLayoutController almost completely rewritten for robustness and readability.
  • Fixed all known crashes with edit-heavy workloads for ASTableView and ASCollectionView. Added examples/ASTableViewStressTest and improved unit test coverage. Please try to break these classes — any reported issues will be investigated with top priority.
  • ASCollectionView now supports custom UICollectionViewLayouts! Previously it was restricted to UICollectionViewFlowLayout. This is tested, but improvements will come to make it more clear to developers what data they should access from inside the layout implementation. It must get data from the ASCollectionView, not from the asyncDataSource directly
  • Support for two-dimensional "working ranges" so that a 2D collection view can scroll both vertically and horizontally while nodes it manages can receive "network fetch" and "display / render" calls as they approach the visible area.
  • Carthage support added via a new framework target. #449
  • Improved accessibility support in ASDisplayNode
  • Added UIResponder methods to ASDisplayNode to more seamlessly regulate participation in the responder chain.

1.2.1

15 Jun 03:17
Compare
Choose a tag to compare

AsyncDisplayKit 1.2.1 has about 15 commits with 5 committers

Thank you to all the members of the community who contributed, both via reports and diffs. Keep the feedback coming, as it's leading to great new things.

  • iOS 9.0 & Xcode 7 Beta — Tested compatibility of all example projects with no issues.
  • Ran the improved Static Analyzer in Xcode 7 Beta. No issues.
  • ASBasicImageDownloader now correctly handles multiple requests for an identical image URL.
  • ASTextNode now provides an option that supports passing through touch events if the touch does not encounter a link within the text.
  • .shouldRasterizeDescendants (Subtree Precompositing) is now better-tested and easier to adopt. A bug was fixed that affected positioning of elements in some apps, and there are more reasonable defaults if your nodes have a backgroundColor of [UIColor clearColor]. Try out this great optimization and file an issue if you have any trouble!
  • .asyncDataFetching is now unconditionally disabled on ASTableView and ASCollectionView, even if your code passes in YES to the initializer. This should not break any existing client, and in fact, should resolve any reliability issues you may see with this feature. As described in the 1.2 release notes, it is considered unreliable and slated for refactoring.

1.2

22 May 09:22
Compare
Choose a tag to compare
1.2

AsyncDisplayKit 1.2 has 209 commits with 25 committers - just since 1.1.1!

Thank you to all the members of the community who contributed, both via reports and diffs. Keep the feedback coming, as it's leading to great new things.

Major additions in AsyncDisplayKit 1.2

  • ASEditableTextNode provides a flexible, efficient, and animation-friendly editable text component. New EditableText sample project.
  • ASScrollNode provides a convenience wrapper of UIScrollView, so that asynchronous layout can operate across a contiguous node hierarchy.
  • ASBasicImageDownloader provides a convenient option for user-driven image loading without integrating with a custom networker.
  • Significant implementation and API additions to ASCollectionView and ASTableView:
  • Introduction of the “Network Range” to help you download content (such as images) ahead of when the user needs it. Implement -fetchRemoteData on your subclasses to participate.
  • Introduction of ASBatchContext / “Batch Fetch” callbacks to help you trigger paginated data requests from your server or database.

Minor improvements

  • Touch handling within ASCellNode is now properly hooked up.
  • ASControlNode touch handling within UITableViews now works properly.
  • Wrapping standard views and layers is now easier than ever with -initWithViewBlock: and -initWithLayerBlock:, so classes that need custom initialization can be wrapped without subclassing.
  • -addSubnode: is implemented on UIView and CALayer as a category method.
  • ASTextNode now supports .exclusionPaths and .maximumLineCount.
  • Significantly expanded test coverage

New subclass hooks

  • -reclaimMemory has been broken up into -clearContents and -clearFetchedData.-reclaimMemory` is still callable, but now deprecated and may not be called by the framework.

Known issues

  • .asyncDataFetching on ASTableView and ASCollectionView is unreliable when performing edits on the data source during user interaction. Use the default option (NO) if you edit the data source while these views are visible.