404 Commits

Author SHA1 Message Date
Huy Nguyen
1313c11519 preferredFrameSize should be used even if neither -layoutSpecThatFits: nor -calculateSizeThatFits: is overridden by subclassses. 2015-08-13 07:53:00 +03:00
Huy Nguyen
c7043a193c 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-13 07:52:42 +03:00
Scott Goodson
3f982b5c9a Switch to use only layers for offscreen working range window.
ASDK layout and display calls don't depend on UIView in any way, so this
will reduce UIView-specific overhead from heirarchy manipulation.
2015-08-12 18:03:47 -07:00
appleguy
7c78dfdd5f Merge pull request #599 from nguyenhuy/different_constrained_size_per_node
Support different constrained size range per cell, for both tables and collections.
2015-08-12 15:54:55 -07:00
appleguy
57291fa544 Merge pull request #590 from rcancro/master
Add expectedSize to ASNetworkImageNode
2015-08-12 15:51:57 -07:00
ricky cancro
3bc692c938 comments 2015-08-12 15:29:26 -07:00
ricky cancro
b4e6591ad8 call super to return preferredFrameSize. 2015-08-12 13:43:10 -07:00
Huy Nguyen
a3c2dbf8cd Table and collection views' async data source can provide different constrained size per node. And because the size is of type ASSizeRange, it has a min size that is very helpful in many cases.. 2015-08-12 22:45:08 +03:00
appleguy
356ea9dc7f Merge pull request #604 from garrettmoon/fixCrashForNonFlowLayout
Don't assume flow layout when checking for insetSections
2015-08-12 12:26:20 -07:00
Garrett Moon
592e0301dd cache result of responds to selector 2015-08-12 11:46:46 -07:00
appleguy
91bffc8ca2 Merge pull request #602 from shannonma/merge_fork
Fix race in ASDisplayNodeRespectThreadAffinityOfNode
2015-08-12 11:40:21 -07:00
Garrett Moon
4f4a26d2a3 ASDK now supports non-flow layouts. We shouldn't be assuming a flow layout. 2015-08-12 11:33:40 -07:00
Shannon Ma
c26e9c7e94 Fix race in ASDisplayNodeRespectThreadAffinityOfNode 2015-08-10 16:42:02 -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
appleguy
d401b0e5f6 Merge pull request #593 from shannonma/merge_fork
Fixes for ASTextNode test, setNeedsDisplay and font loading failures
2015-08-08 18:55:00 -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
e657bedd40 Automatically relayout cells after orientation changed. 2015-08-09 00:36:58 +03:00
Huy Nguyen
60ed2bca47 Fix _implementsInsetSection of ASCollectionView being check before the asyncDelegate is set. 2015-08-05 17:33:56 +03:00
appleguy
f97af9cb26 Merge pull request #594 from nguyenhuy/relayout_same_constrained_size
Support internal relayout
2015-08-04 12:27:30 -07:00
appleguy
936bc2534d Merge pull request #596 from levi/master
Add support for sectionInset in ASCollectionView in property and delegate form
2015-08-04 12:06:04 -07:00
Roy Marmelstein
26202865ac Adding files that were missing from the framework target 2015-08-04 00:07:30 +02:00
Roy Marmelstein
76e5f794da Fixing framework target build issues - missing info plist and headers 2015-08-03 23:47:53 +02:00
Levi McCallum
5eb75d6bc7 Add support for sectionInset in ASCollectionView in property and delegate form 2015-08-03 14:36:29 -07:00
Huy Nguyen
77b586a7e6 Improvements on internal relayout. 2015-08-03 06:25:23 +03:00
Huy Nguyen
0acfea234f Update comments of setNeedsLayout and setNeedsDisplay of ASDisplayNode. 2015-08-03 02:30:08 +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
Shannon Ma
d5de2a22fd Text node to gracefully fail upon font failure 2015-07-31 12:24:04 -07:00
Shannon Ma
15133fdbf7 setNeedsDisplay must be called on main 2015-07-31 12:11:19 -07:00
appleguy
16ed66c3a1 Merge pull request #550 from marmelroy/issue-549
Access to underlying UITextView for more configuration options.
2015-07-30 22:04:30 -07:00
Connor Montgomery
ca5e9e7dc3 Add support for configuring on ASEditableTextNode. 2015-07-30 15:19:00 -04:00
Scott Goodson
46bbe479ae Implement warning assertion for supplementary views in ASCollectionView.
Make sure ASTableViewStressTest passes.  It was sometimes testing a scenario UITableView itself doesn't support.
2015-07-25 21:25:40 -07:00
Roy Marmelstein
6b38000941 A simpler, cleaner implementation 2015-07-22 11:05:27 +02:00
Ethan Nagel
bf0766169b PR Feedback: Require main thread for all edit commands, various cleanup. 2015-07-20 22:08:19 -07:00
Ethan Nagel
f497639124 Add support automatically adjusting the content offset to UITableView as well as support for performing endUpdates with no animations. Additionally, there are critical bug fixes for ASDataController (begin/end updates delegates not called in correct order) and ASRangeController (failure to fully refresh internal state when inserts or delete are made.) 2015-07-20 14:05:56 -07:00
Roy Marmelstein
3c71289927 lazy creation of textview in accessor after assert 2015-07-18 16:31:13 +02:00
Roy Marmelstein
6b970e0e4a Display node assert 2015-07-18 16:29:25 +02:00
Roy Marmelstein
36b92205ed Brace style 2015-07-18 16:10:32 +02:00
Ethan Nagel
c14ecd7e99 short-circuit editing calls after the asyncDataSource has been set to nil (ASCollectionView) 2015-07-16 20:26:45 -07:00
Ethan Nagel
9762e7cfe6 short-circuit editing calls after the asyncDataSource has been set to nil (ASTableView) 2015-07-16 20:26:28 -07:00
Roy Marmelstein
fd3eb94fcb Add main thread warnings and setter/getter assert 2015-07-12 21:35:42 +02:00
Huy Nguyen
3992e9b09b [appledoc] Fix all remaining warnings. 2015-07-12 17:27:44 +07:00
Huy Nguyen
75983ca3e5 Merge branch 'master' into clean_up_layout_spec 2015-07-12 08:17:36 +07:00
Ryan Fitzgerald
4383e9ab2b releasing downloaded image when multiplex image node exits render range 2015-07-11 09:27:01 -04: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
cfac6c992a [appledoc] Fix appledoc warnings. (#553) 2015-07-10 19:02:04 +07:00
Roy Marmelstein
95016021b4 Access to underlying UITextView for more configuration options. 2015-07-09 16:09:20 +02:00
Ryan Fitzgerald
83ac5ad823 changing layoutableObject to be a weak reference to avoid retain cycle between ASDisplayNode and its Layout 2015-07-08 09:58:31 -04:00
Bogdan Iusco
a0fcecc469 Fix duplicate symbols on ASIndexPath 2015-07-07 18:23:04 +03:00
Huy Nguyen
9678adaa93 Merge branch 'master' into layout_node 2015-07-06 22:21:32 +07:00
Huy Nguyen
51f1ed819f - ASDisplayNode now caches calculated layout requested by layout specs.
- constrainedSizeForCalculatedLayout is of type ASSizeRange.
- calculatedLayout is better explained.
- Since ASLayout is cached and reused, its position property is mutable.
2015-07-06 22:08:01 +07:00