Commit Graph
2314 Commits
Author SHA1 Message Date
appleguy de795d577a Merge pull request #635 from garrettmoon/fixShouldRasterizeSubnodes
Fix should rasterize subnodes
2015-09-03 01:28:43 -07:00
Huy Nguyen 93e53bbd87 Use getter and setter of other properties in ASDisplayNode's frame setter. 2015-09-02 20:29:53 +03:00
Huy Nguyen 4b82cc4051 While adjusting position of a node, use getters and setters. Those methods already check thread affinity and layer readiness. 2015-09-02 20:29:50 +03:00
Garrett Moon 32582fca58 Fixes shouldRasterizeSubnodes
Currently, subnodes of nodes marked with shouldRasterizeSubnodes do not get layout calls. This adds the call to layout and changes the __layout method to reference self.bounds instead of _layer.bounds.

Also adds support for corner radius when rasterizing subnodes.
2015-09-01 13:25:27 -07:00
Paul Young 64892bc173 Try using a separate umbrella header for the dynamic framework. 2015-08-30 13:40:37 -07:00
appleguy bdc5562080 Merge pull request #631 from nguyenhuy/relayout_preserves_frame_origin
When relayout a node, preserve its frame origin
2015-08-28 23:49:23 -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
appleguy 071dbd9dc2 Merge pull request #630 from garrettmoon/fixRangesOnNonFlowLayouts
scrollable directions was invalid for non-flow layouts as bounds and …
2015-08-28 23:43:49 -07:00
Garrett Moon 62303ebeec array must be init'd otherwise arrayByAddingObject returns nil. 2015-08-28 13:37:39 -07:00
Paul Young 107fe18a2a Add missing imports to address compiler warnings. 2015-08-27 15:06:07 -07:00
Huy Nguyen 075c39e398 When relayout a node, preserve its frame origin. 2015-08-27 21:16:39 +03:00
Garrett Moon 98b41a4b1c scrollable directions was invalid for non-flow layouts as bounds and contentSize were zero on init 2015-08-26 16:15:18 -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
appleguy 38eae3ab77 Merge pull request #623 from rcancro/layoutSpec
ASLayoutSpec are temporarily mutable and have a more obj-c interface
2015-08-23 11:31:07 -07:00
rcancro 1d31a21ccb Merge branch 'baseline' of github.com:rcancro/AsyncDisplayKit into baseline
# Conflicts:
#	AsyncDisplayKit.xcodeproj/project.pbxproj
#	AsyncDisplayKit/ASTextNode.h
#	AsyncDisplayKit/Details/ASDataController.mm
2015-08-22 19:14:59 -07:00
rcancro e991242513 removed "Stack" from baseline related layout names 2015-08-22 19:03:55 -07:00
rcancro 49ac178166 huy's comments 2015-08-22 19:03:55 -07:00
rcancro 1424127813 fixed copyright 2015-08-22 19:03:54 -07:00
ricky cancro 5d286930f6 Renamed ASStackText... to ASBaselineStack... 2015-08-22 19:03:54 -07:00
rcancro 830d39af92 fixed bug for baseline last 2015-08-22 19:03:54 -07:00
ricky cancro 2d6ddfe32e moved baseline alignment to a layout spec. 2015-08-22 19:03:54 -07:00
rcancro 9036ab8e7d new stack layout spec for text 2015-08-22 19:03:54 -07:00
ricky cancro ef89f758bc flailing 2015-08-22 19:03:54 -07:00
ricky cancro 3fd241e87e fixed vertical spacing bug and typo 2015-08-22 19:03:54 -07:00
ricky cancro cf428831a4 Added baseline spacing for vertical stack views. 2015-08-22 19:03:54 -07:00
ricky cancro f289b3345a Add baseline support to ASStackLayoutSpec 2015-08-22 19:03:54 -07:00
rcancro 0ea276e3ab huy's comments 2015-08-22 18:47:16 -07:00
Scott Goodson e005a83a2b Revert "Switch to use only layers for offscreen working range window."
There is an unsolved issue with this optimization that may cause crashes
in certain cases.  Reverting until it's properly resolved.  It doesn't
appear to be possible to cause the issue in the test apps used to develop it.

This reverts commit 3f982b5c9a.
2015-08-22 17:09:57 -07:00
Ethan Nagel f7e94f42ed Node init performance: Use share instances of UIColor and NSAttributedString for defaults. 2015-08-22 17:09:57 -07:00
Sal 15975a67e8 use attributedString.length instead of attributedString.string.length to check for empty strings 2015-08-22 17:09:57 -07:00
Sal df730d6771 Return CGSizeZero if ASTextNode's text length or attributed string is nil 2015-08-22 17:09:57 -07:00
Huy Nguyen f7f20ca8b7 preferredFrameSize should be used even if neither -layoutSpecThatFits: nor -calculateSizeThatFits: is overridden by subclassses. 2015-08-22 17:09:57 -07:00
Huy Nguyen 2ea7c541a6 When a new preferredFrameSize is set, previously calculated layout should be invalidated so that the size will be picked up in the next layout pass. 2015-08-22 17:09:57 -07:00
Huy Nguyen b93faab7f5 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-22 17:09:57 -07:00
rcancro 680305704a addressed comments and fixed tests 2015-08-21 21:03:40 -07:00
appleguy 80bbf79046 Merge pull request #620 from nguyenhuy/617_relayout_loading_nodes
Fix new constrained size is not applied to loading nodes
2015-08-21 21:03:30 -07:00
rcancro c06a6be188 ASLayoutSpec are temporarily mutable and have a more obj-c interface 2015-08-21 16:02:36 -07:00
rcancro 608f62d487 fixed copyright 2015-08-21 10:08:15 -07:00
ricky cancro 023ad89815 Renamed ASStackText... to ASBaselineStack... 2015-08-21 08:54:28 -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
rcancro 0a398301b0 fixed bug for baseline last 2015-08-20 20:43:18 -07:00
rcancro ff8a7015a5 Merge branch 'baseline' of github.com:rcancro/AsyncDisplayKit into baseline 2015-08-20 20:24:17 -07:00
Huy Nguyen 97f323a8d9 Fix relayoutAllRows to trigger measurement (with the new constrained size) on all nodes, including loading ones. 2015-08-21 01:02:19 +03:00
Ethan Nagel 36bac93a53 ensure class is not nil 2015-08-20 10:55:15 -07:00
Garrett Moon 6624b84c4c Static layout doesn't properly set a height for collection view cells
because their size.width / size.height isn't nan, but FLT_MAX.
2015-08-20 10:40:00 -07:00
ricky cancro f404231b35 moved baseline alignment to a layout spec. 2015-08-20 10:38:54 -07:00
rcancro e7ffe67e3c new stack layout spec for text 2015-08-19 22:03:02 -07:00
ricky cancro 774d91653b flailing 2015-08-19 16:59:23 -07:00
Scott Goodson 60cf43766b Revert "Switch to use only layers for offscreen working range window."
There is an unsolved issue with this optimization that may cause crashes
in certain cases.  Reverting until it's properly resolved.  It doesn't
appear to be possible to cause the issue in the test apps used to develop it.

This reverts commit 3f982b5c9a.
2015-08-17 17:19:51 -07:00
appleguy bd9c9030d9 Merge pull request #610 from SRandazzo/606_sizezero_nil_text
Return CGSizeZero when computing the size of zero-length strings in ASTextNode.
2015-08-17 17:06:54 -07:00