Commit Graph
4532 Commits
Author SHA1 Message Date
Eric Jensen ddd5ff1f75 Correct spelling errors 2016-03-15 21:56:51 -07:00
appleguy 192e9398e5 Merge pull request #1381 from ejensen/image_modification_block_nullability
[ASImageNode] Annotate imageModificationBlock as nullable
2016-03-15 17:49:34 -07:00
appleguy 1e993c1516 Merge pull request #1377 from erichoracek/fix-umbrella
[AsyncDisplayKit] Ensure overall .h (umbrella header) includes new ASRunLoopQueue.h
2016-03-15 17:31:44 -07:00
Scott Goodson abd148ae2e [Testing] ASVideoNodeTests should not pass in an invalid combination of ASInterfaceState flags. 2016-03-15 17:25:47 -07:00
appleguy 8fb18714ac Merge pull request #1385 from maicki/DisplayNodePendingNodePropertyDeadlock
[ASDisplayNode] Remove unnecessary lock for subnode display notifications (main thread only), avoid potential deadlock by traversing up hierarchy.
2016-03-15 17:15:13 -07:00
appleguy f13f2ab980 Merge pull request #1384 from nguyenhuy/add_shouldAnimateSizeChanges
[ASCollectionView] Don't animate size changes if some of the updated cell nodes don't want to
2016-03-15 17:12:48 -07:00
Michael Schneider f385fa8ada Replace recursive methods with ASDisplayNodePerformBlockOnEveryNode function 2016-03-15 16:34:40 -07:00
Michael Schneider b7a92b2947 Add documentation for visibilityDidChange: 2016-03-15 16:30:49 -07:00
Michael Schneider 863b0ca956 Remove the lock for accessing _pendingDisplayNodes and force methods regarding display to the main thread
This should fix a deadlock in ASDisplayNode and it's caused by displayWillStart: and where one thread is recursing down the tree and another thread is recursing up the tree. We remove the lock in _pendingDisplayNodes for the property, but need to guarantee that we only modify the _pendingDisplayNodes state on the main thread.

Furthermore add documentation on what thread displayWillStart and displayDidFinish will be called
2016-03-15 16:30:08 -07:00
Huy Nguyen 22b105bfdc ASCollectionView doesn't animate size changes if some of the updated cell nodes don't want to 2016-03-15 16:17:43 -07:00
Eric Jensen 6ebb376a4d Annotate ASImageNode's imageModificationBlock as nullable 2016-03-15 12:58:23 -07:00
Engin Kurutepe 0223893315 generate Cartfile using the local path 2016-03-15 18:13:49 +01:00
Hannah Troisi 7f6ce4e9de [ASMultidimensionalArrayUtils]
- optimized ASRecursivelyFindIndexPathsForMultidimensionalArray() to remove enumerateUsingBlock:
- replaced single project call to ASIndexPathsForMultidimensionalArray() in ASRangeController with ASIndexPathsForTwoDimensionalArray()
2016-03-14 22:47:43 -07:00
Eric Horacek f39eacf789 Fix umbrella header
`ASRunLoopQueue` was added in #1341 and declared as a public header. However, it was not added to the umbrella header. As-is, when consumers integrate `1.9.7`, the framework will not compile with the error:

```
Umbrella header for module 'AsyncDisplayKit' does not include header 'ASDisplayNode+Beta.h'
```
2016-03-14 11:27:20 -07:00
Gareth Reese a95300e145 Merged master into AVPlayerItem-construction 2016-03-14 13:21:42 +00:00
Michael Schneider 13aa891ecf Improve way to go into full mode on scroll 2016-03-12 17:45:09 -08:00
Scott Goodson f97a509541 [ASRangeController] Ensure that even if the collection view layout is inconsistent, it is impossible for a visible item to not be in the display range. 2016-03-12 16:26:33 -08:00
Michael Schneider b4b9f0750c Improve going into full range mode on scroll 2016-03-12 16:21:29 -08:00
Michael Schneider e4ddb7e270 Go into full range mode if a scroll happens 2016-03-12 15:44:27 -08:00
appleguy fe8cc9328c Merge pull request #1358 from ejensen/asynchronous-test
[Tests] Replace sleep() with XCTest asynchronous expectations
2016-03-11 22:38:07 -08:00
appleguy 4f742a9640 Merge pull request #1369 from garrettmoon/addSynchronousImageCacheMethod
[ASNetworkImageNode] Add support for attempting to get image synchronously from cache to guarantee intra-frame display.
2016-03-11 22:36:50 -08:00
appleguy aac50320dc Merge pull request #1364 from levi/patch-9
[ASDisplayNode] Method naming - use internal underscore notation for recursivelyTriggerDisplayAndBlock
2016-03-11 22:30:31 -08:00
Scott Goodson d4b724d462 [Xcode Project] Update Framework target with new internal file to support asynchronously-measured transition animations. 2016-03-11 22:12:28 -08:00
Garrett Moon 72ecdb5e32 Requires PINRemoteImage 2.1 2016-03-11 21:58:49 -08:00
Garrett Moon 3a7d150680 Remove extraneous brackets, check _imageLoaded before doing work 2016-03-11 21:58:49 -08:00
Garrett Moon 53f6dadbbb Should be nullable not _Nullable 2016-03-11 21:58:49 -08:00
Garrett Moon af61645faf Add support for attempting to get image synchronously 2016-03-11 21:58:49 -08:00
appleguy a4e3ba49b4 Merge pull request #1349 from levi/patch-8
[ASDimension / ASSizeRange] Add ASSizeRangeMakeExactSize method
2016-03-11 21:21:09 -08:00
appleguy e645a511be Merge pull request #1370 from guodac/subnode-layout-changed
[ASCollectionView] Ensure layoutFacilitator is notified when cell relayout results in size change.
2016-03-11 19:05:00 -08:00
appleguy 5f7569a9e9 Merge pull request #1371 from nguyenhuy/async_layout_cleaned_up
[ASDisplayNode] Support transitioning between any two layout specs, with fully asynchronous measurement of the destination.  Safe for multiple calls to, transition even before the prior measure has finished.
2016-03-11 19:00:00 -08:00
Huy Nguyen fa8f2f4429 Implement async transition 2016-03-11 18:56:58 -08:00
Scott Goodson cdd1bd1e39 [ASRangeController] Ensure that visibilityDidChange: is always called on app launch for all initial cells. 2016-03-11 17:18:32 -08:00
Gordon Chen 508ac44238 make sure ASCV's layoutFacilitator triggers layout recalculation when its subnode has size change 2016-03-11 16:49:33 -08:00
Scott Goodson e3dde87bfd [ASDisplayNode] Add REQUIRES_SUPER to a few ASDisplayNode+Subclasses.h methods that do require it. 2016-03-10 20:55:01 -08:00
appleguy 6bd4a7507b Merge pull request #1365 from facebook/ASCellNodeVisibilitySync
[ASCellNode] Upgrades to ASCellNodeVisibilityEvent to ensure it is always synchronized with visibilityDidChange:
2016-03-10 20:52:48 -08:00
Scott Goodson ff8ffffb7b [ASCellNode] Upgrades to ASCellNodeVisibilityEvent to ensure it is always synchronized with visibilityDidChange: 2016-03-10 20:21:00 -08:00
Levi McCallum f3f92423ad Use property underscore notation for recursivelyTriggerDisplayAndBlock
Now that I understand the notation, finding that we're not using it correctly.
2016-03-10 19:57:33 -08:00
appleguy c2b0670132 Merge pull request #1363 from facebook/ASWeakSetAllObjects
[ASWeakSet] Support -allObjects to return a retained array of contents.
2016-03-10 19:40:00 -08:00
Scott Goodson 0e460ca00a [ASRangeController] Don't bother asking UIKit for the visible index paths if view is zero-sized, as it triggers a reloadData. 2016-03-10 19:10:25 -08:00
Scott Goodson aab2ecc26e [ASWeakSet] Properly cast kCFNull so that build settings for unit tests don't flag it (warnings as errors). 2016-03-10 17:22:26 -08:00
Scott Goodson c3fb665ec1 [ASWeakSet] Support -allObjects to return a retained array of contents.
Use this array while enumerating ASRangeController instances in response to UIApplication notifications,
as it is possible for these events to trigger the mutation of the ASWeakSet and cause an enumeration error.
2016-03-10 16:20:21 -08:00
appleguy d40b6c61c8 Merge pull request #1352 from ejensen/deprecated-enum
[ASTextKit] Update usage of deprecated NSControlCharacterAction value
2016-03-10 00:28:02 -08:00
appleguy 7f623412dc Merge pull request #1351 from ejensen/videonode-currentItem-getter
[ASVideoNode] Correct currentItem getter
2016-03-10 00:27:13 -08:00
appleguy 17d1cbec7b Merge pull request #1359 from facebook/RangeMemory
[ASRangeController] Improvements to application state change and memory warning handling
2016-03-09 23:15:13 -08:00
Scott Goodson f2409bdc0a Merge remote-tracking branch 'origin/RangeMemory' into RangeMemory
Conflicts:
	AsyncDisplayKit/Details/ASRangeController.mm
2016-03-09 21:23:25 -08:00
Scott Goodson 21bebb9d29 [ASRangeController] Improvements to application state change and memory warning handling.
Introduces ASLayoutRangeModeVisibleOnly, allowing the preservation of decoded backing stores without any extra padding to
strictly minimize memory usage while supporting immediate re-display of content.  Set visible range controllers to this mode
upon app suspend / memory warning, while more aggressively clearing others to the ASLayoutRangeModeLowMemory mode.

By default, when the app is running and recieves a memory warning, we set the range mode for non-visible controllers to
ASLayoutRangeModeVisibleOnly.  This is because, unlike in the app suspend case where on app resume we can restore controllers
from LowMemory to VisibleOnly, the memory warning doesn't provide a good opportunity to do this.

A new +Beta API to control this behavior is called +setRangeModeForMemoryWarnings:, as some apps may prefer to use LowMemory
in the memory warning scenario.  For these apps, optimal user experience will require manually setting the range mode back
to some larger value as the user navigates the app, or they will encounter controllers that are temporarily blank and need
a moment to re-display their contents as they start to become visible.
2016-03-09 21:22:45 -08:00
Scott Goodson c385423fb3 [ASRangeController] Improvements to application state change and memory warning handling.
Introduces ASLayoutRangeModeVisibleOnly, allowing the preservation of decoded backing stores without any extra padding to
strictly minimize memory usage while supporting immediate re-display of content.  Set visible range controllers to this mode
upon app suspend / memory warning, while more aggressively clearing others to the ASLayoutRangeModeLowMemory mode.

By default, when the app is running and recieves a memory warning, we set the range mode for non-visible controllers to
ASLayoutRangeModeVisibleOnly.  This is because, unlike in the app suspend case where on app resume we can restore controllers
from LowMemory to VisibleOnly, the memory warning doesn't provide a good opportunity to do this.

A new +Beta API to control this behavior is called +setRangeModeForMemoryWarnings:, as some apps may prefer to use LowMemory
in the memory warning scenario.  For these apps, optimal user experience will require manually setting the range mode back
to some larger value as the user navigates the app, or they will encounter controllers that are temporarily blank and need
a moment to re-display their contents as they start to become visible.
2016-03-09 21:06:23 -08:00
Scott Goodson 27b8bcc3c6 [ASRangeController] Support observing UIApplicationState methods, notifying cells of invisibility & freeing memory on backgrounding. 2016-03-09 19:22:57 -08:00
appleguy 32bc6c2125 Merge pull request #1357 from maicki/AddASLayoutRangeModeLowMemory
[ASRangeController] Cleanup code
2016-03-09 18:58:17 -08:00
Eric Jensen a3331b42ae Replace sleep() in ASBasicImageDownloaderTests with XCTest asynchronous expectations 2016-03-09 18:57:31 -08:00