101 Commits

Author SHA1 Message Date
Adlai Holler
a6e2f8e5ab Finish Porting indexPath-Oriented Methods to ASTableNode/ASCollectionNode (#2527)
* Finish porting over the indexPath-oriented properties from table/collection view to node

* Make indexPathForSelectedRow a property
2016-11-01 15:03:46 -07:00
george-gw
d83f058f82 Deprecate indexPath-based Methods on ASTableView/ASCollectionView (#2498)
* Deprecated indexPath methods in ASTableView and ASTableNode and added several indexPath methods to ASTableNode and ASCollectionNode.

* Fixed incorrect doc.
Removed unnecessary __kindof.
2016-10-29 09:50:11 -07:00
Adlai Holler
627d146a5a Add scrollToItem: Method to Node, Handle Section Index Paths (#2462)
* Add scrollToItem: method to node, handle section index paths

* Update ASPagerNode.mm to use the node version

* Add some docs
2016-10-26 12:48:25 -07:00
Hannah Troisi
84d1a637d7 [2.0] add helpful deprecation messages (#2437)
[2.0] add helpful deprecation messages
2016-10-19 14:48:06 -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
124234fef8 [Umbrella] Add warn_unused_result Attribute to Public Headers (#2353)
* Add some warn_unused_result attributes

* Add more

* Add some more
2016-10-06 16:44:49 -04:00
Garrett Moon
409c14890d [Documentation] Improve ASCollectionView docs. (#2317)
* Improve ASCollectionView docs.

* Move note to @note.

* Hannah comments
2016-10-05 17:16:53 -07:00
Garrett Moon
5205ef6840 [API] Remove old deprecated methods. (#2312)
* Remove old deprecated methods. Will restore ones that were removed recently based on PR.

* Update example to use non-deprecated method.

* Don't remove locking / unlocking, insets or willDisplayNode deprecated methods yet.
2016-10-03 14:57:01 -04:00
Huy Nguyen
066351bad7 Introduce ASSectionContext and ASSection (#2178)
- Objects conform to ASSectionContext protocol can be provided via ASCollectionDataSource and later retrieved from the collection view. They are guaranteed to be in sync with sections of the collection view. They can be used to store additional data associated with each section, to be used in collection view layout and the like.
- ASSection is an internal object that is the foundation for coming debugging tools.
- Unit tests included.
2016-10-01 14:04:05 -04:00
Garrett Moon
5cd8f28ad5 @return is recognized by the syntax highlighter. (#2313) 2016-09-28 14:40:05 -07:00
Adlai Holler
ec64b9b229 [ASDataController] Call All Completion Handlers after Nested Batch Updates (#2274)
* Add tests for batch update completion handler calling

* Ensure we call all completion handlers after collection view updates

* Tweak it

* Fix the doc

* Minor improvements

* Document addCompletionHandler better
2016-09-27 17:21:28 -04:00
Adlai Holler
4326fc90bf Pass the cell node through in willDisplay: table/collection callbacks (#2282) 2016-09-23 19:50:53 -04:00
Michael Schneider
93be894e0c [ASCollectionView / ASPagerNode] Move constrainedSizeForNodeAtIndexPath from the DataSource to the Delegate (#2065)
* Move constrainedSizeForNodeAtIndexPath from the DataSource to the Delegate in ASCollectionView and ASPagerNode

* Fix ASPagerNode declaration of dataSource and delegate

As ASPagerDataSource does not inherit from ASCollectionDataSource it's not possible to declare it as property.

* Update comment
2016-08-12 15:37:23 -07:00
Scott Goodson
f0ff9c108d Merge branch 'master' of git://github.com/kielgillard/AsyncDisplayKit into kielgillard-master 2016-07-09 15:44:31 -07:00
Kiel Gillard
6a15ab6130 * Tidy the header imports, forward declaring classes and protocols where appropriate to avoid import cycles and using the framework/system header notation for imports occuring in .h files.
* Perhaps controversially, decomposing ASRangeControllerUpdateRangeProtocol+Beta.h such that the categories on various classes are defined in the classes themselves since that's where the implementation of those categories is provided.
* Updating unit tests and import other headers the tests took for granted. The tests could probably import the umbrella header and not have to worry about this.
* Updating the "Life without Cocoapods" sample to build and run dependent on ASDK as a static library.
* Added a "Life With Frameworks" sample app to build and run dependent on ASDK as a framework, proving the framework targets work.
2016-07-07 15:12:19 +10:00
Colin McArdell and Robin Chou
9c13018568 Updates exposed method signature and docs for what is now -supplementaryNodeForElementKind:atIndexPath: on ASCollectionView. Assert non-nil for usage of ASCollectionDataControllers -supplementaryNodeOfKind:atIndexPath: within ASCollectionView 2016-06-27 11:05:53 -04:00
Colin McArdell and Robin Chou
1c103333f7 ASCollectionView docs for -supplementaryNodeOfKind:atIndexPath: + nullability. Also, nullability for -nodeForItemAtIndexPath: 2016-06-27 11:05:45 -04:00
Colin McArdell and Robin Chou
d69dd880a5 Exposing supplementaryNodeOfKind:atIndexPath: in the ASCollectionView interface. 2016-06-27 11:05:11 -04:00
Adlai Holler
457e08005f [ASDataController] Remove asyncDataFetching Option, Cleanup (#1794)
* [ASDataController] Add some assertions to clarify what queues things happen on

* [ASCollectionDataController] Optimize willReloadData

* [ASDataController] Minor optimizations, no functional changes

* [ASDataController] Always reload data on _editingTransactionQueue

* [ASDataController] Remove async data fetching option, deprecate callbacks

* [ASDataController] Not mutable

* [ASMultidimensionalArrayUtils] Use fast enumeration

* Optimize ASMultidimensionalArrayUtils
2016-06-23 21:08:44 -07:00
Adlai Holler
c14bbf6005 Undeprecate the methods. Just inform users about the index path issue 2016-06-21 09:16:54 -07:00
Adlai Holler
9873f4bd7d Deprecate willDisplayNode:/didEndDisplayingNode: methods 2016-06-20 16:40:10 -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
Nick Velloff
d0c30a43ca expose relayoutAllNodes at ASCollectionView level (#1683)
* expose relayoutAllNodes at ASCollectionView level

* rename relayoutAllNodes to relayoutItems to be more UIKit centric
2016-05-24 13:22:01 +07:00
Michael Schneider
298b9a2be7 Fix ASPagerNode data source and delegate inconsistencies
- Change ASPagerNodeDataSource -> ASPagerDataSource
- Add ASPagerDelegate
2016-05-04 21:03:13 -07:00
Hannah Troisi
f9a92366d3 [AsyncDisplayKit] Fix build so we can weak link AVFoundation
Unclear why the framework target required these seemingly unrelated changes to Collection
classes, but I modeled them after related files and it seems cleaner now (passes tests & framework target)
2016-03-19 17:54:02 -07:00
Eric Jensen
ddd5ff1f75 Correct spelling errors 2016-03-15 21:56:51 -07:00
Eric Jensen
86ccd33a84 Correct a few documentation comments for method parameters 2016-03-08 11:56:58 -08:00
Luke Zhao
03e84e20ac updated with deprecated message 2016-03-05 13:04:20 -08:00
Michael Schneider
aa2ae87c81 Add -waitUntilAllUpdatesAreCommitted to ASTableView and ASCollectionView
The API allows consumer of ASTableView or ASCollectionCiew to block execution of the main thread until all section and row updates are committed.
2016-03-02 19:38:14 -08:00
Scott Goodson
e1597f902a Increase default value for leadingScreensForBatching to 2.0, as 1.0 is not enough
for most network conditions / backend performance.
2016-02-16 22:19:27 -08:00
Rahul Malik
3e5daf4ccd Update data source protocols to make synchronous node creation api methods optional. 2016-02-09 22:47:43 -08:00
Rahul Malik
c4f489b074 Address comments. 2016-02-04 16:56:29 -08:00
Rahul Malik
521c3fa1c1 Move ASCellNode allocation off the main thread by the addition of a node block
API in ASDataController. Move allocations and loaded node layouts to occur
during batch layout phase.
2016-02-04 10:38:59 -08:00
Huy Nguyen
19335d8c9e Add rangeMode APIs 2016-02-02 11:58:18 -08:00
Bin Liu
b2db6cce4d remove public interface for ASCV with facilitator 2016-01-21 22:39:27 -08:00
Bin Liu
1965018c46 attempt to fix build 2016-01-21 15:20:47 -08:00
Bin Liu
8d3c32727e fix build 2016-01-21 12:05:28 -08:00
Bin Liu
da2cbf4644 initial design 2016-01-20 02:34:32 -08:00
Adlai Holler
d19e56d802 Beef up documentation around new delegate methods 2016-01-12 23:27:30 -07:00
Adlai Holler
5e72daa2e3 Pass node along in didEndDisplayingNode method 2016-01-12 15:42:37 -07:00
Scott Goodson
25b6f29584 Introduce ASCollectionInternal file and create always-available ASCView -> ASCNode backpointer. 2016-01-01 23:36:00 -08:00
Scott Goodson
051f1f6cdd Use _ASDisplayLayer for both ASTableView and ASCollectionView. zeroContentInsets to fix UIKit. 2015-12-29 22:24:44 -08:00
Scott Goodson
44feece701 Implement node-backing for ASTableView and ASCollectionView, with a strong back-pointer in these cases. 2015-12-26 23:05:34 -08:00
Scott Goodson
882d4b336e Merge branch 'master' into pr/664 2015-12-25 14:32:41 -08:00
Scott Goodson
7ece41ff64 Delegate definition tweaks for Table and Collection; ensure Table tests run with ARC enabled. 2015-12-24 21:41:12 -08:00
Scott Goodson
27c151095b [ASPagerNode] New API tweaks. Support setting delegate + dataSource on ASCollectionNode and ASTableNode without triggering view creation. 2015-12-24 17:06:57 -08:00
Scott Goodson
9944305cfd Fix tests to avoid newly deprecated ASCollectionView init variant with asyncDataFetching argument. 2015-12-22 23:36:29 -08:00
Scott Goodson
065625f246 Make ASCollectionView always create an ASCollectionNode. Add visibilityDidChange:, interfaceStateDidChange:fromState: 2015-12-22 21:46:46 -08:00
Adlai Holler
dfc098fc20 Merge branch 'master' into update-objc
Conflicts:
	AsyncDisplayKit/ASCollectionView.h
	AsyncDisplayKit/ASTableView.h
	AsyncDisplayKit/Details/ASLayoutController.h
	AsyncDisplayKit/Details/ASRangeController.h
2015-11-24 16:40:03 -08:00
appleguy
15f718ddc9 Merge pull request #868 from levi/levi/remove-deprecated
Clean up syntax and organization of ASRangeController
2015-11-23 21:24:58 -08:00