58 Commits

Author SHA1 Message Date
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
Hannah Troisi
f5b3a282af Fix Pinterest Xcode 7.3.1 Analyzer Warnings (#1988) 2016-07-27 08:23:16 -07:00
Hannah Troisi
abf8d5b9aa [Infer] change atomic properties to nonatomic (#1932) 2016-07-16 10:46:55 -07:00
Michael Schneider
e30c76c5ad Remove deprecated selected and highlighted methods (#1909) 2016-07-13 10:13:31 -07:00
Hannah Trosi
f6d30b668d add comments to deprecated getter methods, remove extraneous if statements 2016-07-05 21:30:09 -07:00
Hannah Trosi
7ddef95946 fix compile errors 2016-06-25 01:05:23 -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
Scott Goodson
5289b1e11e [ASCellNode] Restore new enum values that should have been part of the last commit, but were lost by rebasing. 2016-06-04 22:21:00 -07:00
Adlai Holler
ea777456b6 [ASCellNode] Apply layout delegate behavior in -__setNeedsLayout, not -setNeedsLayout 2016-04-22 12:07:37 -05:00
Eric Jensen
057ec55941 Correct documentation comments 2016-03-24 20:08:03 -07:00
Eric Jensen
b733936133 Improve Swift compatibility of ASCellNodeVisibilityEvent by using NS_ENUM macro 2016-03-21 11:10:28 -07:00
Eric Jensen
ddd5ff1f75 Correct spelling errors 2016-03-15 21:56:51 -07:00
Huy Nguyen
1dffc20e4d Address documentation of ASCellNodeVisibilityEvent 2016-03-01 15:56:08 -08:00
Huy Nguyen
c64f23725f Update ASCellNode visibility API 2016-02-29 20:26:16 -08:00
Michael Schneider
45c616d916 Improve ASTextCellNode customization 2016-02-26 06:31:09 -08:00
Adlai Holler
afc70b90ab [ASCellNode] Improve documentation, remove unused ivar 2016-02-22 15:10:02 -08:00
Scott Goodson
d899f12f70 [ASCellNode] Layout delegate should not be public as it must not be reset externally.
Do not call layout delegate method before the cell node is loaded.  This can happen if
application code calls -setNeedsLayout on the cell manually, and can confuse UIKit state
because we submit an empty batch update call on the next runloop.
2016-02-20 15:24:44 -08:00
Max Gu
115fc2b3da Adding visibility monitoring for ASTableVieww 2016-02-19 22:15:44 -08:00
Max Gu
382509fac8 Letting ASCellNode and its subclasses handle didScroll 2016-02-19 21:30:36 -08:00
Max Gu
53cbd643de Removing ASCellNode+Internal 2016-02-19 14:56:02 -08:00
Max Gu
274029a5e0 Removing an unnecessary property 2016-02-19 13:02:02 -08:00
Max Gu
650b500f92 Merge branch 'master' of https://github.com/Xinchi/AsyncDisplayKit 2016-02-19 12:52:03 -08:00
Max Gu
03446d97e1 Adding scroll visibility 2016-02-19 12:46:12 -08:00
Max Gu
75eab1db07 Adding scroll visibility 2016-02-18 18:00:37 -08:00
Adlai Holler
69767d558e Merge branch 'master' into update-objc
Conflicts:
	AsyncDisplayKit/Private/ASDisplayNode+FrameworkPrivate.h
2015-12-22 00:28:21 -05:00
Luke Parham
322caaeb6a wip after review 2015-12-21 01:24:46 -06:00
Luke Parham
6cbc51dc61 cleaned up comments 2015-12-16 23:44:17 -06:00
Luke Parham
eeb49859f0 view controller node is resized to match layoutspec for cells 2015-12-09 13:13:39 -06:00
Adlai Holler
b16a9e294e Merge branch 'master' into update-objc
Conflicts:
	AsyncDisplayKit/ASDisplayNode+Subclasses.h
2015-12-06 12:25:13 -08:00
Adlai Holler
0ee1fd82dc Refactor nodeDidRelayoutWithSizeChange: -> nodeDidRelayout:sizeChanged: 2015-11-30 19:29:27 -08:00
Adlai Holler
04d93532bc Only require node sizes once per run loop, and only if a node's size has changed 2015-11-30 17:20:32 -08:00
Adlai Holler
ab326fc683 touchesCancelled:withEvent: has a nullable touches argument in UIKit for some reason 2015-11-13 12:17:17 -08:00
Adlai Holler
7922895b60 (Re?)add type annotations on touchesBegan:withEvent: et al 2015-11-13 12:11:24 -08:00
Adlai Holler
762be97a51 Merge branch 'master' into update-objc 2015-11-13 12:03:30 -08:00
Adlai Holler
bfe3040f57 Update nullability in ASCellNode.h 2015-11-09 10:10:37 -08:00
Huy Nguyen
a6807ef477 Address comments in #793 2015-11-04 16:53:36 +02:00
Huy Nguyen
5701cbba40 After relayout of a cell node, table and collection views trigger an empty update transaction, instead of a reload 2015-11-04 16:53:33 +02:00
Adlai Holler
b4b88da8cd Merge branch 'master' into update-objc
Conflicts:
	AsyncDisplayKit/ASCellNode.h
2015-11-02 09:36:46 -08:00
Scott Goodson
e517f88e65 Rename ASCellNode delegate to layoutDelegate to avoid common naming overlap 2015-11-01 12:51:46 -08:00
Huy Nguyen
fb18e7635b Notify ASCellNodeDelegate even if a relayout doesn't result in a resize
If the delegate is an ASTableView, relayoutAnimation will still be considered for animation.
2015-10-29 21:27:29 +02:00
Huy Nguyen
5b8f7e978d Improve documentation of ASCellNode setNeedsLayout 2015-10-29 16:59:50 +02:00
Huy Nguyen
00400e166f Introduce ASCellNodeDelegate
- Cell node automatically notifies the delegate after a relayout (via -setNeedsLayout) that results in a new size. Confirming to ASCellNodeDelegate; ASTableView and ASCollectionView reload the calling cell upon notifications. These views automatically set themselves as delegate of every node.
- The result is that ASCellNode subclasses don't need to manually notify the containing view. Thus, `-relayoutItemAtIndexPath` and `-relayoutRowAtIndexPath` are removed.
- Kittens example is updated to reflect the change.
2015-10-29 16:59:46 +02:00
Adlai Holler
8e104f4887 Merge branch 'master' into update-objc
Conflicts:
	AsyncDisplayKit/ASCollectionView.h
	AsyncDisplayKit/ASDisplayNode.h
	AsyncDisplayKit/Details/ASDataController.h
	AsyncDisplayKit/Details/UIView+ASConvenience.h
	AsyncDisplayKit/Layout/ASLayoutSpec.h
2015-10-28 21:10:27 -07:00
Vitaly Baev
8557d65104 ASCellNode selected/highlighted properties 2015-10-15 13:25:12 +03:00
Adlai Holler
8bb9d173dc Merge branch 'master' into update-objc
Conflicts:
	AsyncDisplayKit/ASDisplayNode+Subclasses.h
	AsyncDisplayKit/ASMultiplexImageNode.h
	AsyncDisplayKit/ASViewController.h
	AsyncDisplayKit/Details/ASDataController.h
2015-10-05 13:24:16 -07:00
Scott Goodson
a58844379c Implementation of Synchronous Concurrency features for AsyncDisplayKit 2.0
This provides internal features on _ASAsyncTransaction and ASDisplayNode to facilitate
implementing public API that allows clients to choose if they would prefer to block
on the completion of unfinished rendering, rather than allow a placeholder state to
become visible.

The internal features are:
-[_ASAsyncTransaction waitUntilComplete]
-[ASDisplayNode recursivelyEnsureDisplay]

Also provided are two such implementations:
-[ASCellNode setNeverShowPlaceholders:], which integrates with both Tables and Collections
-[ASViewController setNeverShowPlaceholders:], which should work with Nav and Tab controllers.

Lastly, on ASDisplayNode, a new property .shouldBypassEnsureDisplay allows individual node types
to exempt themselves from blocking the main thread on their display.

By implementing the feature at the ASCellNode level rather than ASTableView & ASCollectionView,
developers can retain fine-grained control on display characteristics.  For example, certain
cell types may be appropriate to display to the user with placeholders, whereas others may not.

Follow-up work will include unit tests, revisiting names, and the header locations of definitions.
2015-09-27 19:14:36 -07:00
Adlai Holler
37e2a530ad Merge branch 'master' into update-objc 2015-09-19 12:53:06 -07:00