109 Commits

Author SHA1 Message Date
Michael Schneider
f3303c1fb8 Add properties for accessibilty to ASDisplayNode to support layer backed nodes 2016-04-09 11:23:25 -07:00
Adlai Holler
a90a83b607 Copy sublayers to avoid NSFastEnumerationMutation exception 2016-03-23 21:57:23 -07:00
appleguy
d9ef0922d8 Merge pull request #1354 from ejensen/cleanup
[Refactoring] Objective-C 2.0 / Modern syntax for arrays, dictionaries, numbers; logic simplification
2016-03-17 01:06:33 -07:00
Eric Jensen
33fda7ab49 - Use modern Objective-C syntax.
-  Simplify comparisons.
-  Remove dead stores.
2016-03-15 22:34:29 -07:00
Huy Nguyen
22b105bfdc ASCollectionView doesn't animate size changes if some of the updated cell nodes don't want to 2016-03-15 16:17:43 -07:00
Levi McCallum
d8d76635ff Perform animation transition on measureWithSizeRange instead of separate method 2016-02-10 11:44:11 -08:00
Levi McCallum
9dc358196a Basic implementation of transitioning API for layout specs 2016-02-10 11:44:10 -08:00
appleguy
8d9d5a0cc3 Merge pull request #1132 from garrettmoon/switchToInstanceDrawAndDisplay
[ASDisplayNode+AsyncDisplay] Implement instance methods of draw and display, use for text and image performance boost.
2016-01-28 16:17:31 -08:00
Garrett Moon
48150668c6 Fix up build 2016-01-28 08:33:18 -08:00
Garrett Moon
01c1680904 Switch to instance methods of draw and display
This patch switches to instance methods of draw and display for
ASTextNode and ASImageNode to attempt to increase their performance.

It also fixes some thread safety issues in ASImageNode which appear
to have been regressions (though probably not hit very often).

And it sets up work for allowing modification of CGContexts before
and after a node's contents are drawn.
2016-01-27 20:08:02 -08:00
Levi McCallum
203952aca7 Update documentation 2016-01-27 20:06:46 -08:00
Levi McCallum
05af98b578 Update documentation 2016-01-27 19:58:36 -08:00
Levi McCallum
ec7a3599bd Add setNeedsDataFetch method to queue off screen fetchData calls 2016-01-27 14:52:37 -08:00
Matej Knopp
da5f7eccd9 [_ASAsyncTransaction] make priority a NSInteger with default to 0
Signed-off-by: Matej Knopp <matej.knopp@gmail.com>
2016-01-27 00:37:27 +01:00
Matej Knopp
0a45bd9596 [_ASAsyncTransaction] implement operation priority
Signed-off-by: Matej Knopp <matej.knopp@gmail.com>
2016-01-26 15:31:40 +01:00
Aaron Schubert
28b03e3a28 [tvOS] Expose UIFocusEnvironment Protocol methods to ASDisplayNode 2016-01-13 10:09:44 +00:00
Aaron Schubert
cc4f604ea3 [tvOS] Initial commit to make build run. 2016-01-12 14:43:30 +00:00
Scott Goodson
984fe43997 [ASRangeController] Inspect delegate's ASInterfaceState to delay preloading beyond viewport until visible. 2016-01-03 19:14:07 -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
7dff6ffa14 Re-enable program flow instrumentation for Coveralls. More null-specifiers.
This does cause tests to crash at the end, which unfortunately seems like a known Xcode 7 bug.
2015-12-25 22:13:35 -08:00
Scott Goodson
c6fa897dc2 Add nullability annotations to newer APIs that lacked it from the original PR. 2015-12-25 15:35:52 -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
appleguy
af9f8dfea7 Merge pull request #931 from lappp9/cells-with-view-controllers
[ASCellNode] Support for wrapping UIViewControllers
2015-12-21 20:55:28 -08:00
Scott Goodson
ee152eadf1 Remove CALayer and UIView implementations of "name" property.
This avoids CoreAnimation from capturing the name from a background thread deep within the internals
of AVPlayerLayer, which commits transactions off the main thread.  If the main thread is also accessing
properties that require the lock, in very specific app architectures relying on AVPlayerLayer, this
can cause a deadlock.

The "name" property is primarily used by ASDK's unit test infrastructure, so I'm leaving it in place for
that purpose - and it may still be used for debugging, if someone wants to set it.  It will remain
possible to get the node from a layer or view with asyncdisplaykit_node, and access name from there.
2015-12-18 16:01:19 -08: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
Luke Parham
5e34f10b81 added sample app that initializes ASCollectionView cells using view controllers, wip though 2015-12-08 21:57:14 -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
0bfb5a0401 Make new interface state a first-class value 2015-12-04 12:49:38 -08:00
Adlai Holler
9579420cd7 Add static constant ASInterfaceStateInHierarchy which we'll return if the node is not in a cell but its view is in a window 2015-12-04 12:47:36 -08:00
Adlai Holler
fdfe18873a Merge branch 'master' into update-objc
Conflicts:
	AsyncDisplayKit/ASDisplayNodeExtras.h
	AsyncDisplayKit/Details/ASTextNodeRenderer.h
	AsyncDisplayKit/Details/ASTextNodeShadower.h
2015-12-01 16:45:25 -08:00
Scott Goodson
936730d46b ASInterfaceStateVisible is now being driven by a new ASRangeHandlerVisible. 2015-11-29 13:24:42 -08:00
Scott Goodson
1ed22866b1 Working implementation of ASInterfaceState for Display and FetchData behaviors. 2015-11-28 22:48:30 -08:00
Scott Goodson
943cae7eb9 Placeholder implementation of -setInterfaceState:. 2015-11-28 18:22:03 -08:00
Scott Goodson
ff0e94b4e1 Introduce ASInterfaceState on ASDisplayNode.
Later, this will be added to ASViewController.  Right now it is not hooked up to drive anything.
It will become the codepath that drives calls like -fetchData and -clearContents.
2015-11-28 18:22:03 -08:00
Adlai Holler
762be97a51 Merge branch 'master' into update-objc 2015-11-13 12:03:30 -08:00
appleguy
7c9698a833 Merge pull request #812 from nguyenhuy/ImproveCellNodeLayoutDelegate
Improve cell node layout delegate
2015-11-08 18:29:35 -08:00
Adlai Holler
802011ef97 Merge branch 'master' into update-objc
Conflicts:
	AsyncDisplayKit/ASDisplayNode.h
2015-11-08 18:19:06 -08:00
Scott Goodson
efa47d65dd Re-add name method to fix tests (grr). Clean up positioning of responder methods in header. 2015-11-07 23:29:36 -08:00
Scott Goodson
e0f40d5644 Fix unusual cell content blanking issue when making existing cells much taller. 2015-11-07 23:08:53 -08:00
Huy Nguyen
a6807ef477 Address comments in #793 2015-11-04 16:53:36 +02:00
Adlai Holler
b4b88da8cd Merge branch 'master' into update-objc
Conflicts:
	AsyncDisplayKit/ASCellNode.h
2015-11-02 09:36:46 -08:00
Adlai Holler
82c1549d8f Fix nullability of ASDisplayNode.name 2015-10-29 09:57:27 -07: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
appleguy
6c0818790c Merge pull request #774 from nguyenhuy/FixFailingTestsRelatedToDisplayNodeName
Fix failing tests related to ASDisplayNode name
2015-10-25 23:26:53 -07:00
Huy Nguyen
53a3b76d6d Add read-only names to UIView and CALayer
- Backed by name of the underlying ASDisplayNode.
- Remove goofy usages of `setValue:forKey:` in ASDisplayNodeTests and ASDisplayNodeAppearanceTests.
2015-10-26 07:44:05 +02:00
Huy Nguyen
fd0b3aaf52 Revert "Revert "Make ASDisplayNode.name Thread Safe""
This reverts commit 906d7c759b471eda67b95574199b6f91d46b6782.
2015-10-26 06:29:01 +02:00
appleguy
7e616756a7 Merge pull request #722 from nguyenhuy/RelayoutCellAPI
Add relayout item/row APIs to ASTableView and ASCollectionView
2015-10-25 21:28:20 -07:00
rcancro
5a3b021510 fixed build 2015-10-19 08:57:17 -07:00