Commit Graph
73 Commits
Author SHA1 Message Date
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 b99910a149 [Examples, Build] Fix project configuration of two example apps that were incompatible with modern Cocoapods. 2016-04-22 23:04:12 -07:00
Scott Goodson 15a4e18844 [Examples] Officially add tvOS to podspec, ensure Podfiles correctly show minimum supported version 7.0 instead of 7.1 2016-04-22 20:29:52 -07:00
Michael Schneider 563e52bb6a Fix Podfile is missing target for samples 2016-04-21 11:07:08 -07:00
Michael Schneider 9291372c7f Show status bar in examples 2016-03-02 06:53:55 -08:00
Adlai Holler 8f10d8ea99 More progress with the Swift example 2016-02-01 12:10:38 -08:00
rcancro 7f6f2fed11 Added ASTextNodeWordKerner support to ASTextNode
* Added a member to `ASTextKitAttributes` that is an optional delegate to the struct's NSLayoutManager.
* Changed ASTextNode to set this delegate to an instance of ASTextNodeWordKerner.
* Updated init method of `ASTextKitContext` to take an optional NSLayoutManager delegate
* Added the files in TextKit folder to the public headers (so we can include ASTextNodeTypes.h)
2016-01-28 08:38:22 -08:00
Luke Parham 579313f086 Merge branch 'master' into ASVideoNode 2016-01-13 12:22:55 -06:00
Scott Goodson 25b6f29584 Introduce ASCollectionInternal file and create always-available ASCView -> ASCNode backpointer. 2016-01-01 23:36:00 -08:00
Luke Parham 5fbf39644b merged upstream 2015-12-26 01:33:34 -06:00
Luke Parham a75871055f added video sample app with tableview and simple one with 3 video examples 2015-12-18 02:22:33 -06:00
Adlai Holler 7079a9cc79 Merge branch 'master' into update-objc
Conflicts:
	AsyncDisplayKit/ASDisplayNode+Subclasses.h
2015-12-13 10:05:03 -08:00
Scott Goodson a47a1b8c2a Bump podspec to 1.9.3. Remove Cocoapods-generated workspace files. 2015-12-06 20:32:21 -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
Adlai Holler 762be97a51 Merge branch 'master' into update-objc 2015-11-13 12:03:30 -08:00
Levi McCallum 2d93192b9f Fix selection behavior of ASTableView cells 2015-11-11 01:06:28 -08:00
Adlai Holler 802011ef97 Merge branch 'master' into update-objc
Conflicts:
	AsyncDisplayKit/ASDisplayNode.h
2015-11-08 18:19:06 -08:00
Huy Nguyen 9e4c274a5b Animate relayout in Kittens example 2015-11-04 16:53:36 +02:00
appleguy 0598935957 Merge pull request #793 from nguyenhuy/ImproveCellNodeRelayout
ASCellNode delegate to automatically resize in table & collection when -setNeedsLayout called.
2015-11-01 11:11:32 -08:00
Scott Goodson 3175ce2fe7 Fix retain cycle in basic, cache-less ASNetworkImageNodes
This should not directly affect more complex apps that don't use the ASBasicImageDownloader.

Also disables the default-on text placeholders, as they churn memory during the measurement pass.
These were intended to be written with pure layers (without using backing stores), so I don't
think it is a reasonable default-on behavior until that is fixed.
2015-10-30 22:42:05 -07: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 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
Huy Nguyen 210a89e83c Animate subnodes swap in Kitten example. 2015-10-12 22:24:19 +03:00
Huy Nguyen f13f61c2f0 Add relayout item/row APIs to ASTableView and ASCollectionView. 2015-10-07 21:25:07 +03:00
Scott Goodson 47be24037d Reduce _ASAsyncTransaction allocations by ensuring nodes without display methods don't create them. 2015-09-24 19:26:00 -07:00
Adlai Holler b1dfaa1eff Update project indentation settings 2015-09-16 14:17:52 -07:00
rcancro cbaf178950 Hide ASLayoutOptions from the user 2015-09-08 09:50:47 -07:00
rcancro 15b3fd6eab Moved ASLayoutable* properties into ASLayoutOptions class 2015-09-08 09:50:27 -07:00
rcancro 61b72d2c46 fix kittens example 2015-09-08 09:49:40 -07:00
appleguy ecfacd0bd7 Merge pull request #621 from nguyenhuy/table_cell_node_min_width
New min constrained width for cell nodes in table view
2015-08-28 23:47:22 -07:00
rcancro 9bf62d14ab Merge remote-tracking branch 'upstream/master' into baseline
# Conflicts:
#	AsyncDisplayKit/Layout/ASLayoutSpec.h
#	AsyncDisplayKit/Layout/ASStackLayoutSpec.mm
2015-08-24 09:54:36 -07:00
rcancro 680305704a addressed comments and fixed tests 2015-08-21 21:03:40 -07:00
rcancro c06a6be188 ASLayoutSpec are temporarily mutable and have a more obj-c interface 2015-08-21 16:02:36 -07:00
Huy Nguyen 641929c4e5 By default, cell nodes in table view should fill its width. So the min constrained width is updated to enforce this behaviour. 2015-08-21 17:43:40 +03:00
Huy Nguyen 7249661990 Improve relayout when constrained size of all nodes is changed:
- In -layoutSubviews of table and collection views, detect changes that cause a different constrained size for nodes, and trigger relayout immediately.
- Orientation change can be handled by this solution. So, no need to observe to its events.
- Update Kittens example to support iPad (easier to catch bugs on these devices) and add a title to navigation bar (looks a bit nicer).
2015-08-13 06:28:47 +03:00
appleguy 57291fa544 Merge pull request #590 from rcancro/master
Add expectedSize to ASNetworkImageNode
2015-08-12 15:51:57 -07:00
ricky cancro b58e8344c0 Add expectedSize to ASNetworkImageNode
ASNetworkImageNode defers to ASImageNode to return its calculatedSize. ASImageNode returns the size of its image. There is a good chance that ASNetworkImageNode hasn't downloaded its image yet when calculatedSize is called, so it returns a size of CGSizeZero.

On top of that, it is possible that the size of the image is not actually the size that we wish to display in our node.

I've added an "expectedImageSize" property that can be used to determine the calculatedSize of an ASNetworkImageNode.
2015-08-09 16:34:44 -07:00
Huy Nguyen 219b659b38 - Automatically relayout cells when editing mode is used.
- Add editing mode to Kitten sample.
2015-08-09 00:45:54 +03:00
Huy Nguyen 77b586a7e6 Improvements on internal relayout. 2015-08-03 06:25:23 +03:00
Huy Nguyen 56768a837a - Support internal relayout, that is a relayout caused by internal layout changes, like subnodes re-arrangement and/or subnodes' size change. The constrained size applied to root node is unchanged.
- Update Kittens example to show how internal relayout is done.
2015-08-02 17:18:45 +03:00
Huy Nguyen bbadc9a1e9 Update nodes in Kittens example to use new signature of layoutSpecThatFits:.. 2015-07-10 19:46:32 +07:00
Huy Nguyen daf3daeb51 Preserve the manual layout code in Kittens example. 2015-07-05 14:36:39 +07:00
Huy Nguyen 33a3412acf Horizontally center the text in Kittens' BlurbNode. 2015-07-05 13:54:47 +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 dd29a890df Still support -calculateLayoutThatFits: (and manual layout), for backward compatibility. 2015-06-28 20:31:32 +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 697b9f4c3c Update Kittens example to work with the improved layout system. 2015-06-25 11:36:02 +07:00
Huy Nguyen 375f99eb66 Update Kittens sample to use new layout system. 2015-06-25 11:34:36 +07:00
Hannah Troisi 710c51593e Cleaned up Kittens sample app and added comments for clarity.
In particular, the NSValue-boxed CGSize array used as a data model for the kittens
is generated with random sizes, for unclear reasons.  It turns out this is a workaround
to convince PlaceKitten to send us unique images.
2015-06-21 11:36:19 -07:00