Releases: facebookarchive/AsyncDisplayKit
2.2: Farewell, iOS 7!
This is primarily a bug fix release. Changes can be found here: 2.1...2.2
Some highlights:
2.1: Declarative Collections (IGListKit Support)
2.1 add support for IGListKit and has a few bug fixes as well 2.0.2...2.1
Some highlights:
2.0.2
This is primarily a bug fix release. Changes can be found here: 2.0.1...2.0.2
Some highlights:
- Added an efficient, alternative to the UIImage
imageNamed:
method #2859 - Removed locking while calling into image downloader #2864
- Fixed an issue where objects released by the ASRunLoopQueue might not be fully released: #2890
- Respect hitTestSlop in ASControlNode #2896
- Improved scroll performance #2861
- Fixed an issue where ASVideoNode's wouldn't autoplay in certain network conditions #2876
2.0.1
This is primarily a bug fix release. Changes can be found here: 2.0...2.0.1
Some highlights:
- Visual debugging in Xcode was fixed #2784
- Support for automatically managing content size of ASScrollNode's #2753
- Visibility events have been fixed in scroll nodes #2799
- Range controller now explicitly marks disappeared nodes as invisible #2805
- Carthage support was fixed #2761
- Improved handling of rasterized nodes #2731
- Better support for using an ASNetworkImageNode as an ASImageNode #2708
- Fixing interface states being updated off main #2814
- A relatively rare cause of deadlocks has been eliminated #2764
2.0
2.0 Release Notes
AsyncDisplayKit 2.0 is now available!
This is the most important release since 1.0 — and breaks yet another record for the AsyncDisplayKit community, as the largest changeset we've ever shipped in a single release!
Look for 2.0
in Cocoapods, or point to that git tag.
Should I upgrade?
2.0
is very stable, tested at scale by shipping with apps like Pinterest and Buffer.
There are many advantages to adopting 2.0 including more intuitive layout, significant performance increases and a myriad of bug fixes.
For details, please see our Adoption Guide.
A full API changelog from 1.9.92
to 2.0
is available here.
Long awaited, much anticipated — and carefully designed.
You might be wondering: wasn't 2.0 supposed to launch last year? Once we started, we just couldn't stop innovating long enough to do the work to make it public.
Here is the recent history and upcoming roadmap:
1.9.0
launched at NSSpain 1 year ago, offering some features of2.0
in beta form.- After receiving positive feedback from developers, we were excited to keep iterating on the API, since we take semantic versioning extremely seriously! So, we chose to extend the lifecycle of
1.9.x
and launch2.0
only after a full audit of how the new APIs performed in real apps. - Since then, we've launched 17 releases in the
1.9.x
series, refining and extending its functionality. In August 2016,1.9.90
was the last release off of master as the core team began integrating API-breaking changes. - The carefully considered architecture of the
2.0
API is vetted by hands-on experience: working with hundreds of developers using1.9.x
over many months!2.0
is quite stable, as it has been used during development by large clients like Pinterest and Buffer (shipping apps to tens of millions of users). - On December 1st, we shipped a
2.0
"RC" release, meaning no major API-breaking changes until3.0
. We take changes that break the API very seriously and will always attempt to reduce them and provide the easiest path to upgrade we can. - The team already has an ambitious roadmap for the
2.0.x
and2.1.x
release series. We plan to openly publish our roadmap soon, and make it easier for both clients and contributors to influence development.
At a moment like this, it's amazing to see how far we've come. Here's the statistics on what the AsyncDisplayKit community has shipped — excluding configuration & project files.
- 1.0 (2014-10-15) 132 files, 8075 (+)
- 1.0.1 (2014-10-22) 28 files, 358 (+), 113 (-)
- 1.1 (2015-01-06) 88 files, 5470 (+), 944 (-)
- 1.1.1 (2015-01-15) 15 files, 137 (+), 124 (-)
- 1.2 (2015-05-23) 112 files, 4694 (+), 931 (-)
- 1.2.1 (2015-06-17) 12 files, 237 (+), 59 (-)
- 1.2.2 (2015-07-05) 49 files, 1950 (+), 768 (-)
- 1.2.3 (2015-07-26) 22 files, 650 (+), 91 (-)
- 1.9 (2015-11-01) 194 files, 12669 (+), 924 (-)
- 1.9.1 (2015-11-09) 35 files, 1119 (+), 95 (-)
- 1.9.2 (2015-11-30) 68 files, 2259 (+), 459 (-)
- 1.9.3 (2015-12-07) 71 files, 3052 (+), 1711 (-)
- 1.9.4 (2015-12-31) 167 files, 3782 (+), 1183 (-)
- 1.9.5 (2016-01-14) 48 files, 1099 (+), 265 (-)
- 1.9.6 (2016-01-28) 90 files, 3818 (+), 247 (-)
- 1.9.7 (2016-02-25) 257 files, 10303 (+), 3938 (-)
- 1.9.7.1 (2016-03-26) 17 files, 241 (+), 56 (-)
- 1.9.7.2 (2016-04-11) 69 files, 1818 (+), 796 (-)
- 1.9.73 (2016-05-04) 157 files, 7028 (+), 1018 (-)
- 1.9.74 (2016-05-17) 76 files, 2611 (+), 521 (-)
- 1.9.80 (2016-06-06) 100 files, 3464 (+), 715 (-)
- 1.9.81 (2016-07-10) 603 files, 11889 (+), 5702 (-)
- 1.9.90 (2016-08-23) 130 files, 3022 (+), 3597 (-)
- 1.9.91 (2016-10-19) 2 files, 4 (+), 4 (-)
- 1.9.92 (2016-11-02) 1 file, 3 (+), 2 (-)
- 2.0-beta.1 (2016-11-07) 372 files, 19451 (+), 7421 (-)
- Since initial commit: 763 files, 80463 (+), 6143 (-)
Stats
Cocoapod Specs:
https://cocoapods.org/pods/AsyncDisplayKit
Total Downloads: 820,018
Apps: 10,407
We'd love to hear from you
As always, email [email protected] or ping us on Slack. 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!
2.0-beta.1
2.0 Release Notes
AsyncDisplayKit 2.0 Beta 1 is now available!
This is the most important release since 1.0 — and breaks yet another record for the AsyncDisplayKit community, as the largest changeset we've ever shipped in a single release!
Look for 2.0-beta.1
in Cocoapods, or point to that git tag.
Join us to celebrate!
The 2.0 release candidate (RC) is set to launch on December 1st. The AsyncDisplayKit core team is hosting a tech talk and celebration for the community, and we hope you can make it! RSVP
Should I upgrade?
Despite the name, 2.0-beta.1
is already very stable, tested at scale by shipping with apps like Pinterest and Buffer. As such, we're marking this release as a beta and not an alpha.
There are many advantages to adopting 2.0 including more intuitive layout, significant performance increases and a myriad of bug fixes. We'd love to get your feedback in the next two weeks as the RC is finalized. Any changes in the GM will be minor, so adopting this release will mean you're ready!
For details, please see our Adoption Guide.
A full API changelog from 1.9.92
to 2.0-beta.1
is available here.
Long awaited, much anticipated — and carefully designed.
You might be wondering: wasn't 2.0 supposed to launch last year? Once we started, we just couldn't stop innovating long enough to do the work to make it public.
Here is the recent history and upcoming roadmap:
1.9.0
launched at NSSpain 1 year ago, offering some features of2.0
in beta form.- After receiving positive feedback from developers, we were excited to keep iterating on the API, since we take semantic versioning extremely seriously! So, we chose to extend the lifecycle of
1.9.x
and launch2.0
only after a full audit of how the new APIs performed in real apps. - Since then, we've launched 17 releases in the
1.9.x
series, refining and extending its functionality. In August 2016,1.9.90
was the last release off of master as the core team began integrating API-breaking changes. - The carefully considered architecture of the
2.0
API is vetted by hands-on experience: working with hundreds of developers using1.9.x
over many months!2.0
is quite stable, as it has been used during development by large clients like Pinterest and Buffer (shipping apps to tens of millions of users). - On December 1st, we'll ship the final
2.0
"RC" release, meaning no major API-breaking changes until3.0
. We take changes that break the API very seriously and will always attempt to reduce them and provide the easiest path to upgrade we can. - The team already has an ambitious roadmap for the
2.0.x
and2.1.x
release series. We plan to openly publish our roadmap soon, and make it easier for both clients and contributors to influence development.
At a moment like this, it's amazing to see how far we've come. Here's the statistics on what the AsyncDisplayKit community has shipped — excluding configuration & project files.
- 1.0 (2014-10-15) 132 files, 8075 (+)
- 1.0.1 (2014-10-22) 28 files, 358 (+), 113 (-)
- 1.1 (2015-01-06) 88 files, 5470 (+), 944 (-)
- 1.1.1 (2015-01-15) 15 files, 137 (+), 124 (-)
- 1.2 (2015-05-23) 112 files, 4694 (+), 931 (-)
- 1.2.1 (2015-06-17) 12 files, 237 (+), 59 (-)
- 1.2.2 (2015-07-05) 49 files, 1950 (+), 768 (-)
- 1.2.3 (2015-07-26) 22 files, 650 (+), 91 (-)
- 1.9 (2015-11-01) 194 files, 12669 (+), 924 (-)
- 1.9.1 (2015-11-09) 35 files, 1119 (+), 95 (-)
- 1.9.2 (2015-11-30) 68 files, 2259 (+), 459 (-)
- 1.9.3 (2015-12-07) 71 files, 3052 (+), 1711 (-)
- 1.9.4 (2015-12-31) 167 files, 3782 (+), 1183 (-)
- 1.9.5 (2016-01-14) 48 files, 1099 (+), 265 (-)
- 1.9.6 (2016-01-28) 90 files, 3818 (+), 247 (-)
- 1.9.7 (2016-02-25) 257 files, 10303 (+), 3938 (-)
- 1.9.7.1 (2016-03-26) 17 files, 241 (+), 56 (-)
- 1.9.7.2 (2016-04-11) 69 files, 1818 (+), 796 (-)
- 1.9.73 (2016-05-04) 157 files, 7028 (+), 1018 (-)
- 1.9.74 (2016-05-17) 76 files, 2611 (+), 521 (-)
- 1.9.80 (2016-06-06) 100 files, 3464 (+), 715 (-)
- 1.9.81 (2016-07-10) 603 files, 11889 (+), 5702 (-)
- 1.9.90 (2016-08-23) 130 files, 3022 (+), 3597 (-)
- 1.9.91 (2016-10-19) 2 files, 4 (+), 4 (-)
- 1.9.92 (2016-11-02) 1 file, 3 (+), 2 (-)
- 2.0-beta.1 (2016-11-07) 372 files, 19451 (+), 7421 (-)
- Since initial commit: 763 files, 80463 (+), 6143 (-)
Stats
Cocoapod Specs:
https://cocoapods.org/pods/AsyncDisplayKit
Total Downloads: 723,910
Apps: 7,484
We'd love to hear from you
As always, email [email protected] or ping us on Slack. 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.90
1.9.90 fixes many bugs and has several performance improvements.
Cocoapod Specs:
https://cocoapods.org/pods/AsyncDisplayKit
Total Downloads: 587,270
Dev-installs this week: 18,364
Apps: 5,448
1.9.90 Release Changes:
167 commits from 18 contributors
139 files changed with 3,515 lines added and 3,634 lines deleted (More deletions than additions!)
New features:
- Improvements to beta transition API (Check it out in ASDisplayNode+Beta.h!)
- Many more asserts to identify incorrect usage in development before they reach production.
- Many performance improvements
API improvements or extensions:
- ASLayout: New
-description
method with more useful debugging details. - ASDisplayNode and ASLayoutSpec: New
-recursiveDescription
method for debugging.
Key bug fixes in this release:
- Significant fix for the ASDN::Mutex, now uses a shared pointer to prevent deallocation while lock is held.
- Several fixes to improve ASDataController behavior (e.g. causing a synchronous wait during a batch call)
- ASCollectionView: Improvements to how layout is updated during rotation and resizing.
- ASDisplayNode: Fixed propogation of transition id and environment state, added check to prevent nil layouts.
- ASEnvironmentTraitCollection: Fix for default trait collection.
- ASMapNode: Fixed locking around custom annotation drawing options (thanks @george-gw !)
- ASNetworkImageNode: Performance improvement for PINDiskCache which allows for lock to be released while images are rendered on background thread, fix for attempting to cancel with a nil identifier (thanks @aljc !), fix for incorrect progress being reported, fixed an issue where cache was not shared if you used PINRemoteImage elsewhere in your app.
- ASTextNode: Fixed shadow rendering, fix ascender to include line height specified in attributed string paragraph style (thanks @Yue-Wang-Google !), fixed sizing issues when constrained size changed and a fix for truncation (also @Yue-Wang-Google ).
ASVideoNode: Fixed local asset loading
ASViewController: Fixes wrong size reported while rotating, fixed wrong size in modal.
Xcode 7.3.1: Fixed analyzer warnings.
Infer: Many warnings fixed (mostly stylistic) as flagged by Facebook's Infer tool.
Snapshot testing: Fixed recursively setting displaysAsynchronously (thanks Yue-Wang-Google!).
Full commit list here: 1.9.81...1.9.90
As always, email AsyncDisplayKit(at)gmail.com or ping us on Slack (#1582) 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.81
This release is particularly important for Carthage users. It properly expresses the default dependency on PINRemoteImage, which provides very dramatic performance and user experience improvements for ASNetworkImageNode. Even Progressive JPEG works by default! Give it a try — make sure you are creating your ASNetworkImageNodes with a simple alloc / init or +new, not providing a cache / downloader manually.
Cocoapod Specs:
https://cocoapods.org/pods/AsyncDisplayKit
Total Downloads: 484,101
Dev-installs this week: 11,347
Apps: 4,718
1.9.81 Release Changes:
245 commits from 22 contributors
758 files changed with 6,572 lines added and 3,921 lines deleted
New features:
- Xcode 8 Beta 1 & 2 compatible
- Improvements to Carthage (standard build) & static library compatibility
- Convenience methods for creating performance-focused flat-colored resizable circles & rounded rects. See more in [AsyncDisplayKit+Utilities.h]
API improvements or extensions:
- ASEditableTextNode now implements protocol. These may even be set before the view is loaded.
- ASCellNode now provides -applyLayoutAttributes: for subclasses to override.
- Improvements to table / collection batch fetching. Programmatic scrolls or collection layout transitions will now trigger a new fetch.
- ASPagerNode now supports nodeForPageAtIndex: and has improved rotation support.
Key bug fixes in this release:
- ASTextNode / Text Kit crash fixes (improved locking around Text Kit objects).
- ASCellNode: Improve selection / highlight implementation; writing to the properties now updates UITableView / UICollectionView, and they will not be called again if the value hasn't changed.
- ASDisplayNode: Measurement is now always allowed off the main thread, even if the node's view is loaded and Implicit Hierarchy Management is used.
- ASViewController: Modal view controller rotation now works properly on iOS 8.
- ASEditableTextNode: Insets are now included in the size returned when measuring.
- ASVideoNode (shout out to @gazreese!) Ensure activity indicator view is transparent. Only seek to beginning when auto repeating. Improved placeholder image behavior during video loading
Full commit list here: 1.9.80...1.9.81
As always, email AsyncDisplayKit(at)gmail.com or ping us on Slack (#1582) 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.80
AsyncDisplayKit 1.9.8 sets a new record as the biggest release yet. We’ve been quietly shipping small dot releases to Cocoapods, but this is the first GitHub release with a documented changelog since 1.9.6.
Many thanks to our vibrant community, which has been especially active since January. Newcomers and experienced developers alike are invited to:
- Join the 120+ developers on our new Slack channel for real-time debugging help, community updates, and interesting discussion on app architecture. Signup at http://asdk-slack-auto-invite.herokuapp.com or email [email protected] to get an invite.
- Check out our upgraded website and (work-in-progress) documentation at http://asyncdisplaykit.org/docs/getting-started.html. To submit a documentation request, see our #documentation channel on Slack. After a long wait, we have phenomenal momentum building a detailed docset.
- Look for Luke Parham’s AsyncDisplayKit tutorial series, which will be on raywenderlich.com in the next few weeks! Three full-scale tutorials are planned, complete with example projects and very detailed advice on best practices.
Cocoapod Specs:
http://cocoapods.org/pods/AsyncDisplayKit
Total Downloads: 424,017
Dev-installs this week: 12,200
Apps: 4,146
1.9.8 Release Changes:
1,299 commits from 20 contributors
924 files changed with 47,413 lines added and 17,620 lines deleted
New features:
-
PINRemoteImage is now the default image downloader for ASDK’s powerful image components. PINRemoteImage is one of the best image downloaders on iOS, battle-tested by loading trillions of images for Pinterest. It’s most popular feature improves the experience of downloading images on slow network connections by progressively rendering JPEGs; Apple’s libraries don’t do this, nor do many image libraries.
- Progressive JPEG This isn't just the bare minimum. Images load automatically, with dynamic network reprioritization to focus on images closest to the screen, smart memory management, and a beautiful gaussian blur applied to progressive scans so they look smooth instead of blocky. https://github.com/pinterest/PINRemoteImage
-
Animated GIF support for ASImageNode and ASNetworkImageNode. This much requested feature is finally here!
-
Accessibility now works seamlessly in ways that even UIKit doesn’t provide. When using the powerful optimization features of
.layerBacked
and.shouldRasterizeDescendants
, VoiceOver can now access fine-grained metadata about each element. This is pretty amazing: CALayer doesn’t support accessibility, and rasterization reduces everything to a single flat image. The ASDK team fundamentally believes in Accessibility, and invested the time to create an innovative system to make this possible with zero developer effort. As a bonus, this also allows Automated UI Testing greater access to the interface. -
ASNavigationController and ASTabBarController, which implement a new protocol ASVisibility. These classes can be used even without ASDisplayNodes, making them suitable base classes for your inheritance hierarchy. For any child view controllers that are ASViewControllers, these classes know the exact number of user taps it would take to make the view controller visible (0 if currently visible).
Knowing a view controller’s visibility depth allows view controllers to automatically take appropriate actions as a user approaches or leaves them. Non-default tabs in an app might preload some of their data; a controller 3 levels deep in a navigation stack might progressively free memory for images, text, and fetched data as it gets deeper. Any container view controller can implement a simple protocol to integrate with the system. For example, ASNavigationController will return a visibility depth of it's own visibilityDepth + 1 for a view controller that would be revealed by tapping the back button once. -
ASEnvironment a performant and scalable way to enable upward and downward propagation of information throughout the node hierarchy. It stores a variety of critical “environmental” metadata, like the trait collection, interface state, hierarchy state, and more. This data flow is accomplished much more efficiently than UIKit, by using bit-packed C structures. ASEnvironment powers many of the most valuable features of AsyncDisplayKit.
-
ASVideoPlayerNode, a full video player with a variety of playhead controls. It contains an ASVideoNode, which will remain the lightweight, core video playback element. ASVideoPlayerNode is highly customizable, allowing the developer to build a completely custom look (and even completely different layout specification) without writing any initialization or controller code for the control behaviors. Out of the box, it provides a clean set of default controls. Check out the new ASDKTube app in examples/, and help us extend it!
-
ASLayoutTransition, was designed to make all animations with AsyncDisplayKit easy, even transforming an entire set of views into a completely different set of views! With this system, AsyncDisplayKit will do the work to animate between any two possible ASLayoutSpecs...even adding and removing nodes automatically!
Starting a transition is as easy as calling -transitionLayoutWithDuration:. This triggers -layoutSpecThatFits: - and the new spec is compared for each difference to the current layout. It will automatically add new elements, remove unneeded elements after the transition and update the position and size of any existing elements.There are also easy to use APIs that allow you to fully customize the starting state of new elements, as well as the ending state of removed elements. Commonly, you may want new things to fade in and old ones to fade out, which makes these transitions look great by default (existing elements animate from start to end). For a demo and documentation: http://asyncdisplaykit.org/docs/layout-transition-api.html
-
When enabled, Implicit Hierarchy Management (IHM) means that your code can optionally omit
addSubnode:
andremoveFromSupernode
calls! Instead, -layoutSpecThatFits: fully specifies the hierarchy; nodes which are present in a layout spec are then included in the hierarchy. If a node is no longer in the spec with a later relayout, it is removed.This feature is currently Beta, but will soon be enabled by default for all ASDisplayNodes using ASLayoutSpec. It is used in most parts of the Pinterest app, and is very stable; it is Beta only because API name adjustments are being considered. For details on the BOOL that enables it, see: http://asyncdisplaykit.org/docs/implicit-hierarchy-mgmt.html
-
ASTraitCollection provides thread-safe access to all of the UITraitCollection values from any ASViewController or ASDisplayNode.
-
ASRunLoopQueue is one of the most important optimizations in the history of AsyncDisplayKit, and has a few uses at the application level as well! It allows spreading work across multiple turns of the main thread runloop, when it is technically impossible to avoid that work occurring on the main thread. This means that touch events have dozens of new opportunities to capture control, as the runloop checks for touches on each turn — then enters a special “tracking” mode to pause less important work once a touch is locked in. Main thread stalls that could be >100ms are often reduced to 10ms, allowing an unprecedented level of 60FPS and zero-touch-latency operation even on very old devices!
It is brand new in this release. In testing with Pinterest, touch latency on slow devices like the iPad 3 was reduced by a full 3-5x from ASDK’s automatic use of the queue to spread out UIView -init, -addSubview:, and -removeFromSuperview.
Currently, the only common type of main thread stall that cannot be prevented with this technique — UIKit internal overhead for collection or table edit operations. ASDK does dramatically improve the performance of collections and tables (via concurrent measurement of sizes), but a lesser portion of the overhead remains in the form of one large UIKit operation.
Reach out on Slack if you’d like to learn more about this incredibly exciting achievement, such as how it builds on many other capabilities of ASDK in order to work (this technique cannot be used with a regular UIKit app). We’re also especially happy to look at Instruments profiles and help you dial in performance of your app.
-
ASTextKitFontSizeAdjuster is an advanced new typography feature that simplifies building a polished experience with localized and/or user-generated strings. ASTextNode now accepts an array of scale factors, customizable by your app designer, that will attempt to fit a string inside the constrained size. It also has a class method to take all of the attributed string attributes impacted by size (line spacing, kerning, etc) and scale them by the scale factor value.
-
ASRelativeLayoutSpec This new layout spec allows positioning a child at any 9-part box position (corners, edges, or center). For an example of this layout spec in action, check out the layoutSpecThatFits: method in the CatDealsCollectionView example app.
-
ASWeakSet is an easy-to-use collection class for maintaining zeroing weak references to objects. We have found a variety of useful applications for this class at both the framework and application layer, so try it out!
-
New debug tools, including an Image Scaling Tool for ASImageNodes to quickly check for image upscaling / downscaling and a Hit Test Visualization Tool for ASControlNodes. Check out the documentation at:
http://asyncdisplaykit.org/docs/debug-tool-pixel-scaling.html
http://asyncdisplaykit.org/docs/debug-tool-hit-test-visualization.html -
New example apps including
AsyncDisplayKitOverview: A catalog of ASDK’s UI components.
**ASDK...
1.9.6
AsyncDisplayKit 1.9.6 has an awesome new load-ahead and display-ahead range controller, accelerating load time further without impacting main thread stalls. There are a a few significant new features, like ASVideoNode and tvOS build support, but performance accelerations and a few important bug fixes are the most broadly applicable reasons to upgrade.
Users on 1.9.5 should upgrade as soon as possible, as the release from last week has an issue where the preloading ranges may delay triggering until content is beginning to come onscreen. A text rendering edge case — partial clipping when using NSParagraphStyle centering — is also fixed.
Cocoapod Specs:
http://cocoapods.org/pods/AsyncDisplayKit
Total Downloads: 131,004
Dev-installs this week: 17,359
Apps: 1,771
Release Specs:
95 commits from 13 contributors
124 files changed with 5,386 lines added and 246 lines deleted
New:
-
ASRangeController is substantially updated, with a simpler, clean and well-commented new implementation that is more accurate and results in even faster dispatch of fetch-ahead and display-ahead. The new version has more advanced behavior with nested ranges, like an ASPagerNode containing ASTableNodes, and automatically minimizes memory usage while aggressively prioritizing the visible content area's interface state changes so any direction of scrolling is fast.
This is one of the most important classes in AsyncDisplayKit, leveraging abstractions like ASInterfaceState to allow it to drive the super-valuable interface change methods: -layoutSpecThatFits:, -fetchData, -display, and -visibilityDidChange:.
-
tvOS support is coming to AsyncDisplayKit! 1.9.6 builds for tvOS, preserving almost every aspect of its functionality. This is being actively developed by the community, and the next step is improved integration with the UIFocus APIs.
-
ASVideoNode is a new class that exposes a relatively full-featured API, and is designed for both efficient and convenient implementation of embedded videos in scrolling views. It supports autoplay (and pause) when items become visible, even if they are in a nested scroller (e.g. an ASPagerNode containing ASTableNodes). It also offers asynchronous downloading and decoding of a thumbnail / placeholder image if a URL is provided, but if unavailable, will use hardware frame decoding to display the first video frame. ASVideoNode is not yet optimized and should be used with caution for production purposes. Interested clients should follow developments in master, as performance in scrolling views with many ASVideoNodes will be improved in the next several weeks.
-
New Example Apps, including two ASVideoNode apps and a Groupon-like CatDealsCollectionView (including iPad support)
API improvements or extensions
- ASMapNode now uses MKMapSnapshotOptions as its primary specification format for map details. Among other things, this allows specifying 3D camera angles for snapshots loaded automatically and asynchronously while scrolling, with seamless transitions to an interactive map.
- ASButtonNode now supports state-changing background images. It also now offers methods that allow more convenient usage than creating attributed strings — title NSString, UIFont, and UIColor. Enabled layerBacking for subnodes to significantly lighten main thread impact relative to UIButton (though async preparation is the bigger win).
- -[ASCellNode initWithViewControllerBlock:] makes paging content views easier than ever on iOS. ASPagerNode has easy-to-tune parameters for how many controllers to fetch and display, and calls the UIViewController lifecycle methods. Much easier to build a fast and simple pager than with UIPageViewController's unusual API.
- ASEditableTextNode is now scrollable, for long fields of text that are larger than the sizeRange or constrainedSize allow.
- ASNetworkImageNode now offers an @optional delegate method to receive NSError objects if a download fails.
- ASDisplayNode now offers a subclass override method called -calculatedLayoutDidChange. This ASDisplayNode+Subclasses.h method is called immediately after the ASLayout is set on a node, which is typically on a concurrent queue. ASTextNode uses this to account for smaller-than-constrained-size text, which affects centering behavior (but incidentally does not appear to impact left-aligned or RTL behavior).
Key bug fixes in this release:
- Fixes a regression from 1.9.4 where ASTextNodes would incorrectly handle an NSParagraphStyle for centering. Depending on the true width of the text relative to the available constrained space, mismatches in the centering calculation could cause the text to shift by half the width difference (and become partially clipped). This is fixed via structural improvements in the efficiency and call behavior of ASTextNode and ASTextKitRenderer.
- Fixes a regression from 1.9.5 where preloading data or display may be delayed until the element comes onscreen. This is fixed by the new range controller.
- Workaround for an Apple CoreGraphics bug in iOS 9 / Mac OS X 10.11 El Capitan clients who provide the same UIImage reference to many ASImageNodes may find that the system can deadlock when calling drawInRect: with the same object on different threads. This is prevented with @synchronized on the image for just the draw call, which was profiled to be absolutely negligible in performance impact on an iPhone 4 with iOS 7.1.2. The bug is a very serious one for Apple, and has been causing many apps to hang, including the latest version of Pro apps like Adobe Premier on OS X.
Full commit list here: 1.9.5...1.9.6
As always, email [email protected] 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!