2839 Commits

Author SHA1 Message Date
appleguy
8d89f7074f Merge pull request #2662 from facebook/AHDrawMethodNoEscape
Add noescape Attribute to isCancelledBlock Parameters
2016-11-27 11:12:36 -08:00
Adlai Holler
aee2aaf40a Align the colons 2016-11-27 10:36:21 -08:00
Adlai Holler
b689a59b45 Mark isCancelled block as noescape to improve the Swift import 2016-11-27 10:31:35 -08:00
Michael Schneider
c178df0dbc Fix typo 2016-11-23 20:31:37 -08:00
Michael Schneider
64a316679c Trigger load view in ASViewController if node did load but not the view of the view controller 2016-11-23 20:31:37 -08:00
appleguy
aefff563bd Merge pull request #2651 from facebook/PlaceholderContents
[ASDisplayNode] Create placeholders off main when possible.
2016-11-23 16:33:44 -08:00
Adlai Holler
479dd6740e Merge pull request #2655 from rahul-malik/rmalik-nsurlsessionfix
Re-add NSURLSessionConfiguration support and fix crashes
2016-11-23 16:09:57 -08:00
Adlai Holler
14765a55d2 Revert "Merge pull request #2649 from facebook/AHCollectionNodeInitializer"
This reverts commit 0f620f458d815b6f7a6b5d954ac29a6d056caf58, reversing
changes made to 0c65d21f8de3023c6d3a25572da18e3b82a35040.
2016-11-23 15:56:24 -08:00
rmalik
15f8dc572a - Fix assignment of alternativeRepresentationProvider to be the singleton
instance of ASPINRemoteImageDownloader.
- Revert "Revert "Expose internal singleton method as a class method vs instance method.""
- Fix API bug in ASCollectionNode+Beta
2016-11-23 15:51:40 -08:00
Michael Schneider
1f7b838d5e Not animated for end updates if animation is already going on within ASTableView
Fix strange artifacts in ASTableView are visible when changing the device orientation or other animations are going on while calling endUpdates
2016-11-23 14:31:37 -08:00
Scott Goodson
1c70412868 [ASDisplayNode] Create placeholders off main when possible.
This is a fix for https://github.com/facebook/AsyncDisplayKit/issues/2620,
which is a followup to https://github.com/facebook/AsyncDisplayKit/pull/2610

This will ensure thread affinity is respected for .contents but still run
placeholderImage off-main when possible (node isn't loaded).
2016-11-22 22:29:24 -08:00
Scott Goodson
0c65d21f8d Revert "Expose internal singleton method as a class method vs instance method."
Causing crash: +[ASPINRemoteImageDownloader alternateRepresentationWithData:options:]: unrecognized selector sent to class 0x198e3d8

This reverts commit 91c06272b1c83413e681573f109e852ba3532802.
2016-11-22 21:59:58 -08:00
rmalik
91c06272b1 Expose internal singleton method as a class method vs instance method.
Currently setting an NSURLSessionConfiguration through ASPINRemoteImageManager
will crash.
2016-11-22 18:04:19 -08:00
Adlai Holler
04b93182cd Rejigger ASCollectionNode initializers 2016-11-22 16:49:52 -08:00
Austin Louden
60756a1da5 Fix self capture in ASCollectionNode (#2646)
* fix capture in ASCollectionNode

* fix capture self in ASTableNode
2016-11-21 15:28:32 -08:00
Adlai Holler
9a762f9832 Make a public function ASPerformMainThreadDeallocation 2016-11-21 11:17:24 +09:00
Adlai Holler
71872a298e Merge pull request #2223 from facebook/AHNaturalDealloc
[ASDisplayNode] Let Nodes Deallocate Naturally, Deallocate UIKit Components in Run Loop
2016-11-21 01:20:47 +09:00
Adlai Holler
e923943e8c Use CACurrentMediaTime instead of CFAbsoluteTime 2016-11-21 00:54:07 +09:00
Adlai Holler
887f48cbda Add support for run loop queues with no handler, optimize 2016-11-21 00:49:54 +09:00
Adlai Holler
6d01bbeb19 Let nodes deallocate naturally, manually trampoline UIKit ivars
Be more aggressive with main thread punting

Trampoline setting the dataSource/delegate onto the main thread

Short-circuit the supplementary nodes method if no data source

Don't rely on assertions

Mark variable unused to fix release builds

Handle ASCollectionNode/ASTableNode deallocation better

Add some comments about new macro
2016-11-21 00:46:57 +09:00
Scott Goodson
72585e4262 Revert "Prevent premature placeholder image clearing when setting the video asset at a later point in time."
See test failure in https://github.com/facebook/AsyncDisplayKit/pull/2626

This reverts commit 4ad8361eeaef1f0bce8fab3c89b6cd28fd043999.
2016-11-19 21:59:14 -08:00
Michael Schneider
ddd4ef62ae Fix overlapping of nodes in layout transitions 2016-11-19 20:53:32 -08:00
Michael Schneider
9530b609f1 Readd layout transition check for invalid constrained size 2016-11-19 18:31:56 -08:00
appleguy
050de2af5c Merge pull request #2626 from master-nevi/video-flicker-fix
[ASVideoNode] Ensure we don't clear the placeholder image when setting the video asset
2016-11-19 16:20:00 -08:00
appleguy
3d524dfe3a Merge pull request #2635 from garrettmoon/moveASCollectionViewLayoutInspector
[ASCollectionView] Move ASCollectionViewLayoutInspector to its own file
2016-11-19 16:16:19 -08:00
Garrett Moon
0253ae1291 Do not assert when scrollableDirections is called in base class. 2016-11-19 15:43:47 -08:00
Garrett Moon
88d0dff09c [ASCollectionView] Move ASCollectionViewLayoutInspector to its own file 2016-11-19 15:14:03 -08:00
Michael Schneider
8d5fc9efe3 We need to invalidate the layout before the transition does start 2016-11-19 06:58:07 -08:00
Michael Schneider
66ad9bd5e3 Apply patch from Scott 2016-11-19 06:46:21 -08:00
Michael Schneider
ed4f7eff73 Force layout pass in ASViewController viewWillAppear: to trigger automatic subnode management
A measure as well as layout pass is forced this early to get nodes like ASCollectionNode, ASTableNode etc. into the hierarchy before UIKit applies the scroll view inset adjustments, if automatic subnode management is enabled. Otherwise the insets would not be applied.
2016-11-19 06:43:46 -08:00
Michael Schneider
eef4a61ea0 Add checks to bail out early in layout transition 2016-11-19 06:43:46 -08:00
Michael Schneider
f9c70470d8 Address another round of comments 2016-11-19 06:43:46 -08:00
Michael Schneider
fc747ca58a Small code improvements 2016-11-19 06:43:46 -08:00
Michael Schneider
cb37f10ed1 Revert sample code 2016-11-19 06:43:46 -08:00
Michael Schneider
b762998336 Add detection for a loop if invalidation of a size is happening multiple times 2016-11-19 06:43:46 -08:00
Michael Schneider
5d61b2b4e6 Address further comments 2016-11-19 06:43:46 -08:00
Michael Schneider
2cd49642b9 Address comments from @appleguy 2016-11-19 06:43:46 -08:00
Michael Schneider
bd851cae9c Change some invalidateCalculatedLayout to setNeedsLayout calls 2016-11-19 06:43:46 -08:00
Michael Schneider
a88b2ae916 Call setNeedsLayout in ASTextNode instead of just invalidate the calculated layout to trigger a relayout if necessary 2016-11-19 06:43:46 -08:00
Michael Schneider
d73712059d Remove unecessary measurement pass in ASCellNode 2016-11-19 06:43:46 -08:00
Michael Schneider
c29b7a184c Introduce ASFloorSizeValues and ASCeilSizeValues 2016-11-19 06:43:46 -08:00
Michael Schneider
8964ce86b6 Revert ASTextNode workaround for side effect in calculateSizeThatFits: 2016-11-19 06:43:46 -08:00
Michael Schneider
cc297a2dae Fix some tests and add a workaround to ceil the values from self.bounds.size before checking for equality 2016-11-19 06:43:46 -08:00
Michael Schneider
3d37e55c7b Some more improvements around constrained size 2016-11-19 06:43:46 -08:00
Michael Schneider
30b7644415 Factor out constrainedSize usage for layout pass 2016-11-19 06:43:46 -08:00
Michael Schneider
257d4c3a1f Further improvements and fixing tests 2016-11-19 06:43:46 -08:00
Michael Schneider
c14a86c4d6 More improvements to figure out the constrained size that should be used in the layout pass 2016-11-19 06:43:46 -08:00
Michael Schneider
a71a1d8519 Address comments 2016-11-19 06:43:46 -08:00
Michael Schneider
2744998a10 Further progress 2016-11-19 06:43:46 -08:00
Michael Schneider
c7765f6183 Add pending layout to ASDisplayNode 2016-11-19 06:43:46 -08:00