402 Commits

Author SHA1 Message Date
Adlai Holler
fab98b32ef Fix Pager Node Issues (#3028)
* Fix pager node and deprecate zeroContentInsets flag

* Do it with the visible state callback

* There we are

* Put viewController in node debug description
2017-02-14 14:10:51 -08:00
Michael Schneider
aecd36a4df [ASViewController] Support optional node (#3021)
* ASViewController can be used without a node
- If a node isn't provided by developers via -initWithNode:, a default one will be created and used internally.
- This allows developers to use ASViewController like a normal UIViewController and as a base class for all view controllers among which some use a node hierarchy and some don't.

* Update ASDKgram to use a shared base ASViewController

* Minor fixes in ASViewController:
- If its node isn't provided by users, don't replace the view controller's view with the default node's view because it might be loaded from a nib.
- Init a vanilla ASDisplayNode if a node isn't provided.

* Some smaller cleanup

* Remove dummy node for ASViewController if it’s used without a node
2017-02-14 13:18:59 -08:00
Adlai Holler
bbc1aecf95 Deprecate shouldRasterizeDescendants (#3024)
* Deprecate shouldRasterizeDescendants

* Set superclass right
2017-02-13 13:34:53 -08:00
Adlai Holler
0badff651a Revert "Route setDelegate: to setAsyncDelegate: (#3007)" (#3023)
This reverts commit 5c8818d107252da8eb6a91cf88237916ec26f5ed.
2017-02-13 10:38:19 -08:00
Adlai Holler
d7ce6b9a04 CatDealsCollectionView: Use the correct method name (#3015) 2017-02-10 13:35:29 -08:00
Adlai Holler
7424b6d7f7 Update examples to use UIControlState (#3013) 2017-02-10 13:35:15 -08:00
Michael Schneider
2dca7a0c8d [Debug] Remove not used code around visualizing layout specs (#2991)
* Remove not used code around visualizing layout specs

* This is sad to see but let’s remove the LayoutSpecPlayground for now
2017-02-10 13:09:09 -08:00
appleguy
f91265757e [Yoga] Initial commit for supporting Yoga-powered layout calculation. (#2982)
* [Yoga + AsyncDisplayKit] Initial commit for supporting Yoga-powered layout calculation.

Because this results in ASLayout objects, it preserve support for automaticallyManagesSubnodes
as well as the animated transition system. More work remains to vet performance of the new mode,
and it will remain in +Beta for the forseeable future.

I'm not sure that this should ever be used as the primary ASDK layout system, but it should remain an
option for some apps to experiment with if they require an implementation that more strictly mirrors
W3C standard Flexbox.

* [Yoga] Improve usage of ASHierarchyState to ensure simultaneous yoga layouts can't happen.

* [Yoga] Strictly minimize the impact of the Yoga integration on existing code.

Created new file ASDisplayNode+Yoga.mm, reduced size and number of integration points in core code.

* [Yoga] Figured out how to further reduce ASDisplayNode.mm impact by allocating _yogaNode in property accessor, and changing all accesses to use the property.
2017-02-09 16:10:29 -08:00
Adlai Holler
5c8818d107 Route setDelegate: to setAsyncDelegate: (#3007)
* Make ASTableView/ASCollectionView delegate/dataSource unavailable, route setDelegate: to setAsyncDelegate:

* Remove deprecated method from example

* Drop down from unavailable to deprecated
2017-02-09 15:20:26 -08:00
Scott Goodson
f71eba77af [ASCollectionView] Finish support for interoperability with base-class UICollectionViewCells.
This also supports supplementary nodes. It builds off of Adlai's .interop flag but makes necessary
improvements for all of the delegate methods to work in practice with heterogenous cell types.
2017-02-04 20:40:44 -08:00
Alex Hüllmandel
e2e797be6e Add screenshots to documentation (#2968)
* Added missing screenshots/gifs from /examples

* Updated readme for examples

* Changed screenshot size to have equal width for all screenshots
2017-02-04 18:04:23 -08:00
Michael Schneider
12e4e5b048 [Layout] Improve Layout System Abstraction (#2941)
* Improve Layout Abstraction

* Address naming comments

- Rename ASPrimitiveTraitEnvironment to ASTraitEnvironment
- Rename ASPrimitiveTraitCollectionPropagateDown to ASTraitCollectionPropagateDown
- Rename progagateNewPrimitiveTraitCollection: to propagateNewTraitCollection:
2017-02-03 13:04:20 -08:00
Adlai Holler
bf2363cb8f [ASDKgram] Perform batch-fetching updates on main (#2972) 2017-02-02 14:03:40 -08:00
Adlai Holler
404795dc02 Remove Support for iOS 7 (#2930)
* Drop support for iOS 7

* Copy reference images

* Update deployment for sample projects

* Update version

* Update "Life Without Cocoapods"
2017-02-01 14:40:37 -08:00
Adlai Holler
38aac9d019 IGListKit Support II: Electric Boogaloo (#2942)
* Reimplement IGListKit support in a cleaner way

* Rename and fix some stuff

* Fix supplementaries more

* Update docs

* Update test

* Cleanup minor things

* Tweak it

* Indentation

* Remove irrelevant changes

* Break out cell into its own file

* Fix indentation

* Address feedback
2017-01-30 11:16:59 -08:00
Hannah Troisi
34338cadeb [Examples] Rename node variables for clarity (#2946) 2017-01-29 10:36:34 -08:00
Adlai Holler
295ed22c23 Improve Our Handling of Flow Layout Headers/Footers (#2939)
* Rejigger our flow layout supplementary support to make more sense.

* Support old protocol

* Update

* Update deprecation message

* Undeprecate insetForSection method, because it actually _does_ still work

* Update the tests

* Remove irrelevant junk

* Remove cast, add pragma
2017-01-27 15:58:43 -08:00
Hannah Troisi
f01bf9d178 fix pagerNode to automatically scale to bounds size when rotated (#2933) 2017-01-25 16:29:25 -08:00
aaronschubert0
b3be451486 [ASTableNode/ASCollectionNode] Inversion (#2891)
* Add inverted property to ASTableNode

* Add inverted property to ASCollectionNode

* Add example

* De-inform data controller and use different CATransform3D

* Add logic to pending state

* Add accessor for inverted property
2017-01-19 18:16:01 -08:00
David Robles
2bc701d23f Copy ASTextNode’s implementation of placeholderImage into ASImageNode in order to fix the usage of placeholderColor. (#2866) 2017-01-05 14:59:11 -08:00
Scott Goodson
6db83732a8 [Examples] ASDKgram: Improve style and formatting of primary LayoutSpec implementation.
This edits only the flat layout style.  The visually structured version is still the default.
2016-12-13 13:50:06 -08:00
jaichaudhry
03045ee549 [PhotoCellNode]Update formatting of layoutSpec to a flat structure. (#2732)
* [PhotoCellNode]Update formatting of layoutSpec to a flat structure.

* [PhotoCellNode] Adding a flag to switch between flat and tree like structure of layout specs.
2016-12-12 19:45:33 -08:00
Michael Schneider
ad37ecfa74 Some smaller SocialAppLayout example improvements (#2743) 2016-12-12 16:12:26 -08:00
Hannah Trosi
a64253cf38 [Examples] move failing Shop example to extra folder until config is fixed 2016-12-09 13:52:25 -08:00
StrauneanuDimitri
3d1ff675c5 [Examples] Added Bear Shop project (#2614)
* [Examples] Added Bear Shop project

* - added screenshots
2016-12-08 09:57:07 -08:00
Adlai Holler
5b80a641af Improve Handling of Rasterized Node Interface & Hierarchy States (#2731)
* Improve handling of rasterize node interface states and testing

* Fix harder

* Finish fixes and move rasterization flag into beta header

* Re-enable rasterization in ASDKgram

* Re-enable working test

* Only do it in debug
2016-12-08 09:52:21 -08:00
Michael Schneider
aec8dbfb33 Fix ASDKGram deprecation warning (#2719) 2016-12-06 11:52:31 -08:00
Hannah Troisi
5f9e84ce28 [Examples] fix CustomCollectionView-Swift project configs (#2671)
* fix podfile

* add Sample scheme

* remove example project workspace files

* remove use_frameworks!

* add Sample scheme

* add use_frameworks! back in

* add scrollableDirections method
2016-11-28 15:33:29 -08:00
Rajeev Gupta
91734ea979 [Examples] CustomCollectionView in Swift3 (#2591)
* new Swift example

* removed asyncDataSource and asyncDelegate. Also using collectionNode methods instead of collectionView

* Fixing the folder structure

* Updated with @george-gw feedback. Thanks George.
2016-11-27 13:01:35 -08:00
Michael Schneider
4f1d7ec064 Never access the view property of the node in init 2016-11-23 15:50:26 -08:00
appleguy
050de2af5c Merge pull request #2626 from master-nevi/video-flicker-fix
[ASVideoNode] Ensure we don't clear the placeholder image when setting the video asset
2016-11-19 16:20:00 -08:00
Michael Schneider
8c778c5410 Remove SampleSizingNode 2016-11-19 06:43:46 -08:00
Michael Schneider
cb37f10ed1 Revert sample code 2016-11-19 06:43:46 -08:00
Michael Schneider
5d61b2b4e6 Address further comments 2016-11-19 06:43:46 -08:00
Michael Schneider
2744998a10 Further progress 2016-11-19 06:43:46 -08:00
Michael Schneider
b0eb2f81c2 Cleanup 2016-11-19 06:43:46 -08:00
Michael Schneider
0eb882bae5 Some more changes 2016-11-19 06:43:46 -08:00
Michael Schneider
c819d716b4 Implement sizeToFit: 2016-11-19 06:43:46 -08:00
Michael Schneider
f81c7a05b6 Reverse ASViewController project change 2016-11-19 06:43:45 -08:00
Michael Schneider
e7fccb2363 Improve ASButtonNode layout invalidation 2016-11-19 06:43:45 -08:00
Michael Schneider
0f8eac4757 Some other commit 2016-11-19 06:43:45 -08:00
Michael Schneider
6f40e9a654 Some more stuff in flux 2016-11-19 06:43:45 -08:00
Michael Schneider
c61ba65ba3 Some commit 2016-11-19 06:43:45 -08:00
David Robles
db45b5d814 Update sample video project to allow for testing video’s placeholder image isn’t prematurely cleared. 2016-11-17 10:35:47 -08:00
Austin Louden
ae11fc755e Update deprecations in ASCollectionView example, enable warnings (#2594)
* Update example deprecations and flags

* update podfile
2016-11-10 22:42:37 -08:00
Michael Schneider
2ba8239ff5 ASViewController example improvements (#2592) 2016-11-10 16:33:01 -08:00
george-gw
f22e1c2eb0 [LayoutSpecExamples] Added swift counterpart. (#2576)
* [LayoutSpecExamples] Added swift counterpart.

* Fixed copyright text.
2016-11-10 08:54:53 +09:00
Hannah Troisi
edf2b669ae [ASCollectionViewLayoutInspecting] make -scrollableDirections required (#2543)
* [ASCollectionViewLayoutInspecting] make -scrollableDirections a required method

* doh!

* fixed?

* add assert per @appleguy's comment

* use self.layoutInspector, add check at the start of didChangeBounds...
2016-11-09 13:48:16 +09:00
appleguy
55b5dff80c [ASLayoutSpec] Initial commit to support visualizing layout specs (with Playground app). (#2554)
* Initial ASLayoutSpecPlayground commit

* Initial exploratory stab at the main challenge of the app - visualizing ASLayoutSpecs

* Halfway through moving debug features out of ASDK framework files and into debug files. Project builds.

* [ASLayoutSpecPlayground] Created new Inspector node, cleaning up internal implementation to start formalizing support for layout spec visualization.

* Workaround for ensuring creation of visualizerNode for ALL layoutspecs

* continued development

* Layout Inspector Work in Progress

* Resizing the playground works in the shrink direction, not for grow.

* added new ASLayoutableInspectorNode features

* Cleaned up examples code.

* Cleaning up  code.

* more code cleanup

* [ASLayoutableInspector] Transition to an ASTableNode-based architecture to support larger numbers of buttons / customizable types.

* [ASLayoutableInspector] Support different layoutable property types to set up buttons that can edit all of them.

* Huy debugging

* Refactored layout inspector code for extensibility.

* Properly lock layoutableContextMap

* Fix context handling in ASDisplayNode:measureWithSizeRange

* Fix ASLayoutSpecPlayground:ViewController:toggleVisualization

* added slider to InspectorCell

* [ASLayoutSpecPlayground] Improvements to propagation of visualize mode, resize handle, minor cleanup.

* Fix to ASEnvironment

* [ASLayoutSpecPlayground] Fix a few minor issues from the merge with latest master.

* Implement layout spec cache

* add pager ndoe

* add more examples

* add more layout examples

* [ASLayoutPlayground] Fix merge issues

* [ASLayoutPlayground] Fix up the example project from the 2.0 API changes.

* [ASLayoutPlayground] Some fixes (#2411)

* [ASLayoutPlayground]: Some fixes
* Fixed crash when tapping descender.
* Fixed setting the item to inspect.
* Fixed button states in inspector node.
* Added sliders for spacingBefore, spacingAfter, ascender.

* [ASLayoutSpecPlayground] Deselect the buttons when editing is over.

* [ASLayoutSpecPlayground] Changed flexGrow/Shrink's values from YES/NO to 1.0/0.0

* [Project] Create new Debug/ directory for advanced tools dedicated to debugging.

* [LayoutSpecPlayground] Rename project without AS in title, to be consistent with LayoutSpecExamples.

* [Bulid] Fix Xcode project to use new Debug subdirectory / group.

* [Bulid] Fix a small merge error.

* [Build] Fix build issue for Framework target.

* [Bulid] Fix podspec to expose InspectorNode header; Remove old-cocoapods emojis from ASDKgram :)

* Move aside ASLayoutSpecPlayground-Swift to match master

* [LayoutSpecPlayground] Cleanup implementation in several files, xcodeproj, etc.

* [ASControlNode] Add comment for new assertion, to be enabled in a separate diff.
2016-11-08 20:16:16 -08:00
Scott Goodson
d3e942acf7 [Build] Disable failing test in ASViewController until it can be investigated. 2016-11-08 15:25:05 -08:00