19 Commits

Author SHA1 Message Date
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