47 Commits

Author SHA1 Message Date
Eric Jensen
387abbff5d Rename ASTextKitHelpers to ASTextKitComponents and make the header public 2016-03-26 15:31:53 -07:00
Eric Jensen
0d52176e03 Add an ASEditableTextNode initializer that allows customization of its ASTextKitComponents 2016-03-25 22:23:03 -07:00
Sam Stow
086bd8a52b [ASRelativeLayoutSpec] New core layout spec type: Relative Position, now powers Center as well.
This spec allows positioning a child at any 9-part box position (corners, edges, or center).
2016-03-19 22:37:02 -07:00
Hannah Troisi
b98920c19f [ASVideoNode] Add to ASDK umbrella header 2016-03-19 17:10:47 -07:00
Eric Horacek
f39eacf789 Fix umbrella header
`ASRunLoopQueue` was added in #1341 and declared as a public header. However, it was not added to the umbrella header. As-is, when consumers integrate `1.9.7`, the framework will not compile with the error:

```
Umbrella header for module 'AsyncDisplayKit' does not include header 'ASDisplayNode+Beta.h'
```
2016-03-14 11:27:20 -07:00
Hannah Troisi
fbe72a06e4 [ASImageNode] A ASImageNode debug feature showing pixel scaling amount
- shows a red text label overlay on bottom right hand corner of ASImageNodes with pixel scaling factor
- import AsyncDisplayKit+Debug.h and enable using [ASImageNode setEnableImageDebugOverlay]
2016-03-08 23:15:07 -08:00
Michael Schneider
aca5b14c2b Move automatic range update to a private API 2016-02-29 11:39:50 -08:00
Engin Kurutepe
d1793d50c8 fix umbrella header 2016-02-19 14:32:04 +01:00
Levi McCallum
66c8c8f47d Add rotation support to ASPagerNode 2016-02-12 13:45:22 -08:00
Levi McCallum
3b1a32c413 Clean up implicit hierarchy management to enable custom animation 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
Michael Schneider
28207c678d Remove ASRangeHandler protocol with all classes that implement it
With the move to the new ASRangeController we don't need the ASRangeHandler protocol anymore
2016-02-08 12:57:05 -08:00
Scott Goodson
a2cf2a88e6 Overhaul header files / includes to eliminate circular references that Xcode 7 is angry about. 2015-12-25 19:22:00 -08:00
Levi McCallum
1b5ac3615e Add ASPagerNode to framework header 2015-12-16 17:53:21 -08:00
Aaron Schubert
630bd23820 Merge branch 'master' into ASMapNode 2015-12-03 14:22:45 +00:00
Levi McCallum
a8e6aebe9c Remove public header exposure of text kit internals 2015-11-30 06:44:53 -08:00
Levi McCallum
a0c05ebffc Rename CK classes to AS classes 2015-11-30 06:44:53 -08:00
Rui Peres
377c84abc2 Imported missing classes in the umbrella header 2015-11-14 15:07:35 +00:00
Aaron Schubert
156b5866a5 Add ASMapNode to main header file. 2015-11-12 14:57:09 +00:00
Scott Goodson
3416450f11 Adding ASButtonNode. Simple but flexible, add features as desired! 2015-10-31 15:12:05 -07:00
Adlai Holler
bf88bd8e19 Rename image request class, add deliveryMode into the request params 2015-09-26 13:40:00 -07:00
Adlai Holler
bbf9550e08 Use ASPhotosImageRequest in ASMultiplexImageNode, in a backwards-compatible way 2015-09-25 15:41:35 -07:00
Huy Nguyen
07c0d78c71 Add ASViewController and update Multiplex sample to use it. 2015-09-17 15:58:21 +03:00
Jack Flintermann
ce33149548 make additional private headers actually private; import all public headers in AsyncDisplayKit.h 2015-09-16 23:31:48 -04:00
Paul Young
77d74e60f0 Update header imports. 2015-09-16 12:17:01 -07:00
Paul Young
77dfd222d3 Merge branch 'master' into compiler-warnings 2015-09-16 12:13:50 -07:00
Paul Young
8426ab1122 Use a shared header for the static library and dynamic framework. 2015-09-16 12:12:21 -07:00
Scott Goodson
08e31e1c37 Created ASCollectionNode with new example project.
Eases support for nesting horizontally scrolling elements within a vertical scroller.

Further changes will improve the API, and optimize handling of the nested working ranges.
2015-09-07 12:54:42 -07:00
Paul Young
64892bc173 Try using a separate umbrella header for the dynamic framework. 2015-08-30 13:40:37 -07:00
Paul Young
107fe18a2a Add missing imports to address compiler warnings. 2015-08-27 15:06:07 -07:00
Huy Nguyen
e1fd58268c Clean up #468:
- -layoutSpecThatFits: must return an ASLayoutSpec.
- Move ASDisplayNode's -measureWithSizeRange: redeclaration to ASDisplayNode.h.
- Rename ASStackLayoutChild.h to ASStackLayoutDefines.h.
- Rename ASStaticLayoutSpecDimension.h to ASRelativeSize.h.
- Don't import ASLayout.h in other headers to prevent circular inclusions.
- Explain use cases of ASLayout's initializers.
- Clean up ASInternalHelpers.h.
2015-07-10 19:41:17 +07:00
Huy Nguyen
2149d44990 Fix naming convetion:
- "Layout node" is changed to "layout spec".
- Update tests.
- Update Kittens sample.
2015-07-01 18:13:44 +07:00
Huy Nguyen
95e787b226 Remove stack children type:
- ASLayoutable requires mutable properties that are used when attached to a stack layout.
- Thus, ASLayoutable objects (including ASDisplayNode) can be injected into stack layout directly.
- ASStackLayoutNodeChild no longer needed.
- Tests and Kitten sample updated.
2015-06-26 11:47:42 +07:00
Huy Nguyen
f588bceb4d Introduce ASLayoutable and eliminate ASCompositeNode:
- Both ASDisplayNode and ASLayoutNode conforms to this protocol.
- ASDisplayNode can be embeded directly into layout graph.
- Eliminate ASCompositeNode.
- Fix ASStaticSizeDisplayNode not recpect min constrained size.
- Updated tests.
2015-06-26 09:29:16 +07:00
Huy Nguyen
64e2323a4e Remove ASLayoutNodeSize:
- ASLayoutNode no longer has 'size' constraint during its initialization..
- ASLayoutNode no longer needs parentSize to calculate its layout.
2015-06-25 11:34:36 +07:00
Huy Nguyen
abe98d5b09 Integrate new layout nodes to the framework.
- Introduce ASLayoutNode and its subclasses.
- ASDisplayNode measures its ASLayoutNode and cache the result (ASLayout). Calculated size and position of each subnode can be retrieved from the calculated layout.
- Custom nodes need to override -layoutNodeThatFits:(CGSize) instead of -calculateSizeThatFits:(CGSize).
- Custom nodes do not need to layout its subnodes (in -layout:) anymore. ASDisplayNode can handle the job most of the time, by walking through its layout tree.
- ASCompositeNode is used to embed (display) subnodes to a node's layout. That way, each subnode will also be measured while the parent node is measuring. And the parent node knows where its subnodes are within its layout.
2015-06-25 11:34:35 +07:00
Nadine Salter
d9e7e5d931 Merge pull request #250 from facebook/ASScrollNode
Simple UIScrollView wrapper node.
2015-02-02 11:03:21 -08:00
Nadine Salter
ad57e126e7 Simple UIScrollView wrapper node.
Closes #99.  This is a quick sketch -- room for improvement includes
considering a less-questionable class name, potentially exposing
additional UIScrollView functionality directly on the node, and using it
in a sample project.
2015-01-24 12:11:59 -08:00
Nadine Salter
9cf71828ad Include ASEditableTextNode in framework header. 2015-01-24 12:04:06 -08:00
Nadine Salter
3c690bf9e5 ASBasicImageDownloader.
This is a simplistic, NSURLSession-based downloader object that
implements ASImageDownloaderProtocol and can be used with
ASMultiplexImageNode and ASNetworkImageNode.

(Closes #115.  NSURLSession should suffice for most usecases, and this
code should provide a good jumping-off point for a more-complex
implementation.)
2014-11-21 18:40:18 -08:00
Nadine Salter
460b3582c9 Update umbrella header. 2014-11-18 18:21:41 -08:00
appleguy
3f7dc75bb1 Merge pull request #101 from nguyenhuy/collection_view
Add ASCollectionView
2014-11-17 19:03:59 -08:00
Nadine Salter
3c8d4e9517 ASMultiplexImageNode.
Initial open-source release of ASMultiplexImageNode.  Documentation and
example code forthcoming.

Note:  ASMultiplexImageNode requires Xcode 6 to compile.  Tests are now
compiled against the iOS 8 SDK and run on iOS 7.1 and iOS 8.
2014-11-17 15:02:17 -08:00
Huy Nguyen
1df67c42b9 Implement ASCollectionView. Horizontal scrolling is not supported yet. 2014-11-12 21:25:56 +02:00
Nadine Salter
7dd94a6102 Merge in downstream changes.
Introduce `ASTableView`, a UITableView subclass that uses `ASCellNode`
instead of UITableViewCell.  Add working range support via
`ASRangeController`, which observes the visible range, maintains a
working range, and handles most ASDK machinery.  ASRangeController is
loosely-enough coupled that it should be easily adapted to
UICollectionView if that's desired in the future.

Notable considerations in the ASRangeController architecture:

* There's no sense rewriting UITableView -- the real win comes from
  using nodes instead of UITableViewCells (easily parallelisable
  computation, large number of cells vs. few table views, etc.).  So,
  use a UITableView with empty cells, using UITableViewCell's
  contentView as a host for arbitrary node hierarchies.

* Instead of lazy-loading cells the instant they're needed by
  UITableView, load them in advance.  Preload a substantial number of
  nodes in the direction of scroll, as well as a small buffer in the
  other direction.

* Maintain compatibility with UITableView's API, with one primary change
  -- consumer code yields configured ASCellNodes, not UITableViewCells.

* Don't use -tableView:heightForRowAtIndexPath:.  Nodes already compute
  their preferred sizes and cache results for use at layout-time, so
  ASTableView uses their calculatedSizes directly.

* Corollary:  ASTableView is only aware of nodes that have been sized.
  This means that, if a cell appears onscreen, it has layout data and
  can display a "realistic placeholder", e.g. by making its subnodes'
  background colour grey.

Other improvements:

* Remove dead references and update headers (fixes #7, #20).

* Rename `-[ASDisplayNode sizeToFit:]` to `-measure:` and fix
  `constrainedSizeForCalulatedSize` typo (fixes #15).

* Rename `-willAppear` and `-didDisappear` to `-willEnterHierarchy` and
  `-didExitHierarchy`.  Remove `-willDisappear` -- it was redundant, and
  there was no counterpart `-didAppear`.

* Rename `viewLoaded` to `nodeLoaded`.
2014-09-22 14:33:39 -07:00
Arnaud Coomans
8b8a8fdb0d Files organization 2014-08-05 16:48:46 -07:00
Andrew Toulouse
1efe3d95d6 Add umbrella header
Summary:
Import the headers for control, image, and text nodes, as well as the normal display node and helper functions. Subclass headers omitted as they are intended to be imported in subclass implementation files, not public headers.

Test Plan:
`#import <AsyncDisplayKit/AsyncDisplayKit.h>` followed some time later by:
```
ASDisplayNode *node;
ASImageNode *node2;
ASTextNode *node3;
ASControlNode *node4;
```
2014-07-18 00:30:32 -07:00