99 Commits

Author SHA1 Message Date
Ryan Nystrom
cd3ad1c86f Enable nodes entering the visible range to display 2015-03-17 10:52:32 -07:00
Nadine Salter
7fa5aa5e01 Merge pull request #371 from facebook/working-window
Working range window
2015-03-11 18:02:20 -07:00
Ryan Nystrom
0b19be0f85 Working range window
This brings back the concept of a window store for nodes that are in the working range (reverting #127). It turns out that due to the system architecture if there are nodes who fetch remote content (e.g. `ASNetworkImageNode`), calls to `-display` will occur before fetching has been completed. The next chance the nodes have to decode and display content is then when they are actually on the screen, thus defeating the purpose of a working range.

With the reintroduction of the working range window, nodes are "stored" in the window and when content is finished being fetched, CA triggers `-display` since they are part of a view hierarchy.

This can be tested in the Kittens project by insuring that before `ASRangeController` adds a node to [a visible view](https://github.com/facebook/AsyncDisplayKit/blob/master/AsyncDisplayKit/Details/ASRangeController.mm#L57) that the image node (with remote content) has set its layer's contents.
2015-03-11 17:59:03 -07:00
Nadine Salter
de14f220c3 Merge pull request #367 from facebook/issue-364
Thread safe creation and canceling of download tasks
2015-03-11 17:57:52 -07:00
Ryan Nystrom
db8bbcfd0e Thread safe creation and canceling of download tasks
fixes #364
2015-03-11 16:52:14 -07:00
Brian Amerige
9019233c68 Support Forwarding Responder-Chain Actions to Node from its View
Summary:
What it says on the tin. This allows Nodes to effectively participate in the responder chain.

Caveat: see note in implementation below. Would have been nice to use `-targetForAction:withSender:` the way the docs imply you can, but alas.

Test Plan: Observe a node in the responder chain get invoked to handle an action it implements.

Reviewers: bcunning, zsh, sma, jpasqualini, suv, nyn531, b3ll, aaronpang, kimon, grp, jonathan, rnystrom, nadi

Reviewed By: nadi

Subscribers: trunkagent, rnystrom

Differential Revision: https://phabricator.fb.com/D1894023

Signature: t1:1894023:1426026643:203945b6a7c318f6d2c9b94d876da61da31327bd
2015-03-11 14:37:17 -07:00
Nadine Salter
a40c8172ac Merge pull request #365 from facebook/issue-363
Range handlers use recursive actions
2015-03-09 12:37:17 -07:00
Ryan Nystrom
5e7755fac0 Range handlers use recursive actions
fixes #363
2015-03-09 12:33:02 -07:00
Stan Chang Khin Boon
7c5b31e419 Block should always be declared using the copy attribute. 2015-03-08 01:54:02 +08:00
Ryan Nystrom
69dbbae91c Fix miscellaneous build failures. 2015-03-02 16:44:25 -08:00
Ryan Nystrom
c657411a2e Batch fetch with small data sets 2015-02-26 22:29:13 -08:00
Ryan Nystrom
8d7fe334e2 Revisions based on feedback 2015-02-26 22:29:13 -08:00
Ryan Nystrom
b3ae15858a Unit tests for batch fetching 2015-02-26 22:26:25 -08:00
Ryan Nystrom
09ade3dd00 ASTableView batch API and context object 2015-02-26 22:23:32 -08:00
Ryan Nystrom
599bf42675 Revisions based on feedback 2015-02-26 15:41:32 -08:00
Ryan Nystrom
4fa03a01d1 Functioning Preload range
Refactor how we do ranges so they can be arbitrarily managed. Introduce the concept of a preload range.
2015-02-26 15:41:32 -08:00
Ryan Nystrom
9c877c51af Support for dynamic ranges
This refactors how we do ranges and implements tuning parameters for a "Render" range and a "Preload" range
2015-02-26 15:40:21 -08:00
Ryan Nystrom
43be3294bc Remove "working range" from flow layout
This is a step towards a preloading range. We first want to migrate towards arbitrary ranges instead of being coupled to the notion of a single "working range".
2015-02-26 15:40:21 -08:00
Li Tan
88f77e5d52 Fix function call on lock/unlock api 2015-02-25 21:01:59 -08:00
Nadine Salter
2397bd0db6 Merge pull request #325 from facebook/fix_data_fetching
Sort array before data fetching
2015-02-24 11:09:51 -08:00
Li Tan
0e15b061d0 Sort array before data fetching 2015-02-23 20:45:25 -08:00
Nadine Salter
b023cfbb2a Merge pull request #303 from facebook/enable_async_data_fetching
Move ASTableView & ASCollectionView data fetching to background thread
2015-02-23 15:25:36 -08:00
Ryan Nystrom
ad474fce8e Make project imports consistent 2015-02-23 14:55:15 -08:00
Li Tan
ad88da8b56 fix typo 2015-02-13 09:41:22 -08:00
Li Tan
ae5ee2926d Add assertion to avoid inserting elements that is out of range 2015-02-12 14:10:18 -08:00
Li Tan
831aa47ae0 Address comments 2015-02-11 19:15:08 -08:00
Li Tan
6a2c472910 Add asyncDataFetchingEnabled as parameter of initializer of ASTableView & ASCollectionView
Conflicts:
	AsyncDisplayKit/ASCollectionView.mm
	AsyncDisplayKit/Details/ASDataController.mm
2015-02-11 17:24:49 -08:00
Li Tan
2f88ce56a2 Move ASTableView & ASCollectionView data fetching to background thread
Conflicts:
	AsyncDisplayKit/ASCollectionView.mm
	AsyncDisplayKit/Details/ASDataController.mm

Conflicts:
	AsyncDisplayKit/ASCollectionView.mm
	AsyncDisplayKit/Details/ASDataController.mm
2015-02-11 17:22:43 -08:00
Li Tan
25bdd0d84d remove program 2015-02-06 11:44:40 -08:00
Ryan Nystrom
e6506899cb Code format cleanup 2015-01-29 10:12:12 -08:00
Nadine Salter
9f6ce8e16e Merge pull request #265 from andyscott/ASTextNode-max-line-count
Add maximumLineCount to ASTextNode
2015-01-27 14:41:25 -08:00
Ryan Nystrom
6bc94190e8 Bail display if parent nodes raster children
fixes #244
2015-01-27 09:46:12 -08:00
andyscott
72ea1c94df Add maximumLineCount to ASTextNode... which corresponds to maximumNumberOfLines on the underlying container 2015-01-26 21:05:28 -08:00
Nadine Salter
241fe8ebb5 Further ASTextKitComponents API improvements. 2015-01-25 16:27:01 -08:00
Nadine Salter
e0f926c861 Switch ASTextKitComponents interface C -> ObjC. 2015-01-25 16:27:01 -08:00
Nadine Salter
35d7f43fb6 Convert ASTextKitComponents to an object.
ARC doesn't play nicely with structs that contain references to
Objective-C objects, which causes breakage when using AsyncDisplayKit as
a dynamic framework (e.g., with CocoaPods 0.36+).  Fixes #198.
2015-01-25 15:50:54 -08:00
andyscott
3eba302b27 Make ASDataController call rowsInSection with the appropriate index 2015-01-23 12:03:52 -08:00
Li Tan
8ae063dec8 Add check for willDeleteSections: 2015-01-22 12:21:30 -08:00
James Ide
b5d999ab55 Fix ASRangeController's delegate method invocations
"did" should be "will" in a couple of places
2015-01-21 17:07:53 -08:00
Nadine Salter
7542f7ca17 Fix build-break. 2015-01-20 12:16:30 -08:00
Nadine Salter
978cf85ae1 Merge pull request #211 from facebook/batch_animation
Batch animation
2015-01-20 11:51:31 -08:00
Nadine Salter
e02cae8f2e Tidy some warnings. 2015-01-09 13:56:00 -08:00
Li Tan
1068fdc413 Fix table view 2015-01-08 16:22:53 -08:00
Li Tan
00e2f46c8d Add batch animation 2015-01-08 16:09:27 -08:00
Li Tan
123cab757a Add safety check to avoid crash in ASFlowLayoutController 2015-01-08 11:49:31 -08:00
Nadine Salter
bacfcbd24d Merge pull request #202 from facebook/batch_insertion
Batch insertion for reload #200
2015-01-07 14:53:15 -08:00
Li Tan
b9c6f3de03 Fix crash in Flow Controller 2015-01-06 18:04:42 -08:00
Li Tan
3adb0b1b93 Batch insertion for reload 2015-01-06 17:43:16 -08:00
Ryan Nystrom
7b86303f20 Forward touch events to either the node or super
`_ASDisplayView` now forwards touch events to either super or it's node, depending on whether or not the node implements the methods.

fixes #199
2015-01-06 16:06:59 -08:00
Nadine Salter
146a83568f Merge pull request #194 from facebook/table-selection
Call touch methods on _ASDisplayView super
2015-01-05 17:39:16 -08:00