Huy Nguyen
7bb3015950
Rename ASLayoutableContext methods
2016-03-27 17:38:41 -07:00
Huy Nguyen
81d26994c5
Introduce ASLayoutableContext
...
- The struct is mapped to ID of the current thread and used by subnodes to decide whether they should proceed measurement.
2016-03-27 17:09:59 -07:00
Scott Goodson
c6093cffdf
Fix assertion format specifier from previous commit.
2016-03-26 23:57:16 -07:00
Scott Goodson
6a887a8acf
[ASDisplayNode] Alternative implementation of interfaceState -> invisible that avoids a subclass call from -dealloc.
2016-03-26 23:24:30 -07:00
Scott Goodson
e59431e702
[ASDisplayNode] Restore dispatch_async for clearContents, to prevent discarding contents for nodes that are simply moving to a new container.
2016-03-22 18:39:23 -07:00
Scott Goodson
76b38cbe6e
[ASInterfaceState] Clear the "Visible" bit immediately upon deallocation, rather than waiting for ASRangeController on the next runloop.
2016-03-22 14:32:32 -07:00
Huy Nguyen
9e76d7b603
Add method to cancel layout transitions in progress
...
- Also make sure a transition isn't invalidated right after it passed the validation test and before it proceeds
2016-03-20 23:17:35 -07:00
appleguy
4297cb1eb5
Merge pull request #1398 from facebook/Placeholders
...
[ASDisplayNode] Placeholders should always be recreated if returning to cleared nodes, and remain until ASNetwork/MultiplexImageNode finish loading their image from the network.
2016-03-19 21:19:05 -07:00
Scott Goodson
8308a4ce49
[AsyncDisplayKit] Adopt #pragma once, remove last remaining dispatch_sync (UIScreen scale).
2016-03-19 19:56:41 -07:00
Scott Goodson
c5c7abb1d6
[ASDisplayNode] Placeholders should always be recreated if returning to past nodes.
...
If previously-displayed contents is gone (e.g. clearContents), and is not finished displaying
by the time the node is onscreen, recreate the placeholder immediately.
2016-03-18 21:13:26 -07:00
Eric Jensen
6739a3a4ab
Condition logic simplification
2016-03-17 11:22:53 -07:00
Eric Jensen
17aebcbaba
Add a space between the ? and : in ternarys
2016-03-17 10:38:51 -07:00
appleguy
d9ef0922d8
Merge pull request #1354 from ejensen/cleanup
...
[Refactoring] Objective-C 2.0 / Modern syntax for arrays, dictionaries, numbers; logic simplification
2016-03-17 01:06:33 -07:00
appleguy
2ad9d83520
Merge pull request #1353 from ejensen/spelling
...
[Documentation] Correct spelling errors
2016-03-16 22:53:15 -07:00
Michael Schneider
19232ac493
Address pull request comments
2016-03-16 11:44:56 -07:00
Michael Schneider
d3ba80ccfd
Improvements for automatic range mode
...
- Only update range mode if visibility changes if the node is not range controlled
- Only change explicitly set range mode if ASRangeController becomes visible
- Return interface state for range controller in ASCollectionView and ASTableView based on if the containing node is range managed
2016-03-16 11:44:56 -07:00
appleguy
9b26d94da7
Merge pull request #1386 from maicki/ReplaceRecursiveCallsWithHelperFunction
...
[ASDisplayNode] Replace recursive methods with ASDisplayNodePerformBlockOnEveryNode
2016-03-16 11:20:17 -07:00
Eric Jensen
33fda7ab49
- Use modern Objective-C syntax.
...
- Simplify comparisons.
- Remove dead stores.
2016-03-15 22:34:29 -07:00
Eric Jensen
ddd5ff1f75
Correct spelling errors
2016-03-15 21:56:51 -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
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
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
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
Huy Nguyen
fa8f2f4429
Implement async transition
2016-03-11 18:56:58 -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
Rahul Malik
f388180a1d
Refactor the run loop implementation code into a proper queue abstraction.
...
ASRunLoopQueue can process a specified number of items per run loop iteration
via a block based api.
2016-03-07 23:49:50 -08:00
Rahul Malik
5af8b78d78
Transfer node ownership from renderQueue to displayingNodes queue before removing
...
the node from the renderQueue.
2016-03-07 11:30:23 -08:00
Rahul Malik
62a39c49ea
Break up scheduling of node rendering across various run loops
2016-03-06 12:33:31 -08:00
Huy Nguyen
caddd1d287
Fix threadSafeBounds
...
- Bounds change set directly to _ASDisplayLayer should also be saved to threadSafeBounds
- Remove overkill _usesDisplayView flag
2016-03-03 16:18:07 -08:00
Huy Nguyen
3b0b7fa888
More locks
2016-03-03 15:05:17 -08:00
Levi McCallum
4601cd5d1e
Preserve usesImplicitHierarchyManagement when doing animations
...
Currently the flag was being reset to NO in all cases. It should ignore turning off the hierarchy management when the user has already enabled it.
2016-03-03 08:40:08 -08:00
Huy Nguyen
b21974e3f4
Address Scott's comment
2016-03-03 00:33:19 -08:00
Huy Nguyen
f59eb98749
Remove threading assumption in ASDisplayNode measureWithSizeRange:"
2016-03-03 00:31:05 -08:00
Huy Nguyen
5e49cc4382
Layout transition can measure in background
2016-03-02 22:47:04 -08:00
Huy Nguyen
9162d7b2df
Implement thread-safe bounds and use it in ASTextNode
2016-03-02 22:42:53 -08:00
appleguy
8f0777e7e5
Merge pull request #1305 from garrettmoon/fixRecursivelyEnsureDisplay
...
[ASDisplayNode] recursivelyEnsureDisplay should trigger display even if a stale contents exists (re-display)
2016-03-01 17:43:28 -08:00
Garrett Moon
2cee9bfca8
Just because we have contents, doesn't mean we don't want to display
2016-03-01 17:41:29 -08:00
Garrett Moon
057c431dfb
Thanks @scottg, this is a better more generalized solution.
2016-03-01 16:46:03 -08:00
Garrett Moon
eba6afc36b
Revert "Don't clear contents when moving between nodes"
...
This reverts commit 6d1732fcbdda44603577979afdddb9fc48b6d6e4.
2016-03-01 16:45:36 -08:00
Garrett Moon
6d1732fcbd
Don't clear contents when moving between nodes
2016-03-01 09:57:07 -08:00
Huy Nguyen
640b6bdf4a
Fix mismatch between the signature of didCompleteLayoutTransition and its implementation
2016-02-25 10:58:36 -08:00
Aaron Schubert
682903fba5
Make ASDisplayNode unable to be focused by default. ASControlNode will be the new default.
2016-02-23 10:36:53 +00:00
appleguy
3abde9348d
Merge pull request #1256 from Adlai-Holler/AHAffinityRevisions
...
[ASDisplayNode] Post-Review Refinements of Recent No-Affinity UIKit/CA Property Bridging
2016-02-22 20:41:59 -08:00
Adlai Holler
767bff2e1a
[ASInternalHelpers] Use ASDisplayNodeThreadIsMain, reduce block allocations
2016-02-22 15:12:13 -08:00
Adlai Holler
f4e4c501f1
[ASDisplayNode] Remove misplaced comment that has been replaced
2016-02-22 09:06:36 -08:00
Adlai Holler
deccef1d94
[ASDisplayNode] Lock during constrainedSizeForCalculatedLayout
2016-02-22 09:04:01 -08:00
Adlai Holler
648dc817ad
[ASDisplayNode] Use a C function to lazily create pending view state
2016-02-21 10:03:06 -08:00