38 Commits

Author SHA1 Message Date
Michael Schneider
d73712059d Remove unecessary measurement pass in ASCellNode 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
b0eb2f81c2 Cleanup 2016-11-19 06:43:46 -08:00
Michael Schneider
dcc54c0d36 Proper relayout if size changes 2016-11-19 06:43:46 -08:00
Michael Schneider
0eb882bae5 Some more changes 2016-11-19 06:43:46 -08:00
Michael Schneider
0f8eac4757 Some other commit 2016-11-19 06:43:45 -08:00
Marvin Nazari
b578eb7490 [ASCellNode] Force the view to load if we haven't already 2016-11-18 12:38:59 +01:00
Marvin Nazari
31ffea40c2 [ASCellNode] implement a .viewController property 2016-11-17 11:26:55 +01:00
george-gw
54cda5fdbb [ASCellNode] Added indexPath property. (#2468)
* [ASCellNode] Added indexPath property.

* [ASCellNode] Cached the type of scrollView we're using in the node, and placed that logic in setScrollView.

* [ASCellNode] Removed table and collection view from indexPath, since they return the index paths from the view-space.

* Changed the logic for getting indexPath so that it works even when the cell is not displayed.

* [VerticalWithinHorizontalScrolling] Explicitally synthesized indexPath property.
2016-10-27 16:56:00 -07:00
appleguy
42d1c9a55b [ASCellNode] Add subclass method cache; skip visibility rect calculations in the common case. (#2388)
Profiling showed this area as the most expensive part of ASRangeController propogation of .interfaceState,
when scrolling an ASTableView.  This is very much on the critical path for sustained 60FPS in these views.
2016-10-15 09:58:57 -07:00
Adlai Holler
c2ea7cfeac [Umbrella] ASCollectionView -> ASCollectionNode Migration, Separate Index Spaces (#2372)
* Separate dataSource & UIKit index spaces

Beef up our supplementary node support

Make the API way better

Go nuts

Add a unit test for UICollectionView's handling of reloadData inside batch updates

Wrap indexPathForNode: in a cache

Convert index paths in delegate methods

Go back on table view

Put collection view back

Switch up the API

Move most ASCollectionView API to ASCollectionNode

Move most table logic over to ASTableNode

Do the things

More conversion work

Keep on keepin' on

Get table view delegate API done

More porting

Simplify

Clear the delegate

More cleanup

Move more stuff around

Remove pointless file

Re-add some API

Put back more API

Use the right flag

* Some cleanup

* Remove incorrect comment

* Tweak the API

* Put back a couple methods

* update example projects (note: ASCollectionView deprecation warnings expected)

* change reloadDataWithCompletion:nil --> reloadData

* Clean up rebase

* Make deprecated numberOfItemsInSection methods optional

* Use the right flag

* Address nits

* update ASDKTube, ASDKgram & ASViewController examples
2016-10-14 17:21:16 -07:00
Adlai Holler
bb366d14f0 [ASCellNode] Restore Layout Attributes Fix + iOS 10 Modification (#2335)
* [ASCellNode] Fix applyLayoutAttributes not called, add readonly layoutAttributes property (#2321)

* Clear cell node layout attributes in didEndDisplayingCell: also
2016-10-05 17:31:46 -04:00
Scott Goodson
a25f4a7b85 Revert "[ASCellNode] Fix applyLayoutAttributes not called, add readonly layoutAttributes property (#2321)"
This reverts commit f9ee1dd4b6b4d8a062c5453623bc6fde1840cd91.

This appears to have caused a test failure:
https://travis-ci.org/facebook/AsyncDisplayKit/jobs/164532435
2016-10-02 19:36:06 -07:00
Adlai Holler
f9ee1dd4b6 [ASCellNode] Fix applyLayoutAttributes not called, add readonly layoutAttributes property (#2321) 2016-09-29 16:41:28 -04:00
Michael Schneider
53a6743908 Don't use automaticallyManageSubnodes in ASTextCellNode (#2212) 2016-09-08 11:17:50 -07:00
Adlai Holler
5593bfa4d1 [ASDisplayNode] Majorly Improve Descriptions (#2208)
* Up our description game big time

* Couple tweaks

* Explain logic

* Fix indentation
2016-09-07 20:11:27 -07:00
Adlai Holler
5e3627a9cd [ASTextNode] Actually deprecate attributedString property (#2151) 2016-09-01 16:43:03 -07:00
Michael Schneider
f8e135a1be Add old transition API back but allow call from background thread (#2135) 2016-09-01 16:09:59 -07:00
Garrett Moon
645aa6f24b [ASDisplayNode] Renamed range update callbacks (#2130)
* Renamed range update callbacks

We finally settled on

didEnter/ExitDisplayState
didEnter/ExitPreloadState
didEnter/ExitVisibleState

This change is meant to unify the range update methods to relate to each
other and hopefully be a bit more self explanatory.

* Guarantee interface callbacks happen on main.

* move fetchData / clearFetchedData to default implementations

* Move deprecated methods to new deprecated category

* Don't bring in cocoapod change.

* Nits

* Capetalize
2016-08-26 20:18:38 -07:00
Garrett Moon
eb497b7db1 ASCellNode was overriding old deprecated methods
It needs to override the new signatures as well.
2016-08-16 15:40:55 -07:00
David Rodrigues
70574243f7 Prevent API misuse at compile time (#2035)
Using Objective-C attributes, in this case `unavailable`, we can hide
unsupported APIs at compile time instead of detecting and warn about it
at runtime with a set of asserts.
2016-08-04 19:00:46 -07:00
appleguy
74bf376b2f [ASDisplayNode] Rename _propertyLock to __instanceLock__ to avoid subclass naming collisions. (#1941) 2016-07-16 15:32:13 -07:00
Michael Schneider
e30c76c5ad Remove deprecated selected and highlighted methods (#1909) 2016-07-13 10:13:31 -07:00
Adlai Holler
edb4e45c24 [ASRangeController] Update synchronously when possible 2016-07-12 14:36:20 -07:00
Michael Schneider
93ee42db57 Remove assert in visibleStateDidChange: in ASCellNode (#1899)
This assertion is failing in some apps and will be enabled soon.
2016-07-11 17:04:20 -07:00
appleguy
a9e3eacfe5 [ASCellNode] Add gating for -convertRect: call upon invisibility notification for iOS 7 & 8 edge case. (#1881)
* [ASCellNode] Add gating for -convertRect: call upon invisibility notification for iOS 7 & 8 edge case.

This should resolve https://github.com/facebook/AsyncDisplayKit/issues/1659, which corresponds to this
Fabric log for Pinterest: https://fabric.io/pinterest6/ios/apps/com.pinterest.enterprise/issues/5776fbfeffcdc042501a5f20/sessions/c178e977614b4ebab853084847fb241
8

* [ASCellNode] Additional improvements to visibilityDidChange: gating.
2016-07-10 16:01:55 -07:00
appleguy
3b2af7eb6d [Build] Remove Unused Imports across all of AsyncDisplayKit. This uses a feature of AppCode. (#1875)
Details on the tool are here: https://www.jetbrains.com/help/idea/2016.1/optimizing-imports.html
2016-07-09 17:20:59 -07:00
Hannah Trosi
3994f2089c [ASCellNode] Final revisions to behavior of setSelected: & setHighlighted: 2016-07-05 17:47:00 -07:00
Hannah Trosi
2e4b1ea053 [ASCellNode] Fix selection / highlight implementation 2016-06-25 00:22:28 -07:00
Hannah Troisi
da27d36b4a Add comments 2016-06-18 12:54:55 -07:00
Hannah Troisi
46421f8684 [ASCollectionView] support UICollectionViewLayoutAttributes 2016-06-17 10:17:52 -07:00
Hannah Troisi
c857e809f4 Clean up header comments (for consistent Facebook licensing info) (#1741)
[Licensing] Clean up header comments (for consistent Facebook licensing info)
2016-06-11 23:31:39 -07:00
Luke Parham
fc5467b110 fixed typo and added backwards compatibility for 'visibilityDidChange' 2016-06-06 02:02:23 -05:00
Luke Parham
e510120031 changed '-visibilityDidChange:' to '-visiblieStateDidChange:' to match the others 2016-06-06 00:56:21 -05:00
Garrett Moon
dc56c060d0 Add comment for why lock is added. 2016-05-05 10:02:29 -07:00
Garrett Moon
938ecd9b6f Fix deadlock when laying out on multiple threads
Summary:
We observed a deadlock which occurred when two threads were laying out the same set of nodes.

On one thread, layout would occur on a leaf node. It would lock and as part of this layout
process, ASDK walks up the node tree and calls __setNeedsLayout on its supernode until it
reaches the supernode with no supernode. When the supernode gets its call to __setNeedsLayout
it also locks. So leaf node locks and then awaits supernode lock.

On another thread, we're doing a layout pass on the supernode in the above thread. This locks
the supernode and attempts to lock the leaf node. This deadlocks (remember the above thread
is holding onto the leaf lock and awaiting the supernode lock. This thread is holding onto
the supernode lock and awaiting the leaf lock).

This is all exacerbated by the use of recursive locks.
2016-05-03 15:56:38 -07:00
Adlai Holler
ea777456b6 [ASCellNode] Apply layout delegate behavior in -__setNeedsLayout, not -setNeedsLayout 2016-04-22 12:07:37 -05:00