151 Commits

Author SHA1 Message Date
Michael Schneider
5d61b2b4e6 Address further comments 2016-11-19 06:43:46 -08:00
Michael Schneider
2cd49642b9 Address comments from @appleguy 2016-11-19 06:43:46 -08:00
Michael Schneider
d73712059d Remove unecessary measurement pass in ASCellNode 2016-11-19 06:43:46 -08:00
Michael Schneider
a71a1d8519 Address comments 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
0f8eac4757 Some other commit 2016-11-19 06:43:45 -08:00
Michael Schneider
c61ba65ba3 Some commit 2016-11-19 06:43:45 -08: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
Michael Schneider
e4da4131cf Improve layout spec block documentation (#2547) 2016-11-05 18:45:18 -07:00
Michael Schneider
4464b7de60 Improve deprecation situation for 2.0 (#2514)
* Improve deprecations for 2.0

- Add deprecations for node / layoutSpec style properties
- Implement missing methods on ASDisplay from deprecation header
- Cleanup all of the deprecation categories

* Remove DeprecatedProtocolMethods

* Fix "Life without Cocoapods"

* Update comments
2016-10-31 16:46:21 -07:00
george-gw
09168ceee0 [Swift] Addressed two warnings when building for swift. (#2497) 2016-10-28 15:40:22 -07:00
appleguy
2c6f8b0506 [AsyncDisplayKit 2] Final changes to ease migration of clients to 2.0 APIs. (#2460) 2016-10-21 13:12:13 -07:00
Hannah Troisi
9719357901 [ASLayoutElement] Move ASDisplayNode's .name property to ASLayoutElement (renamed to .debugName) (#2395)
* Move ASDisplay .name property to ASLayoutElement

* keep ASDisplayNode.name deprecated

* address @appleguy's comments
2016-10-20 17:27:31 -07:00
Hannah Troisi
84d1a637d7 [2.0] add helpful deprecation messages (#2437)
[2.0] add helpful deprecation messages
2016-10-19 14:48:06 -07:00
Adlai Holler
124234fef8 [Umbrella] Add warn_unused_result Attribute to Public Headers (#2353)
* Add some warn_unused_result attributes

* Add more

* Add some more
2016-10-06 16:44:49 -04:00
Adlai Holler
4dfe2a5a66 [ASAsyncTransaction] Make System Less Specific to Layer Display, More Readable (#2332)
* Make ASAsyncTransaction system less specific to layer-display, more readable

* Document weird import
2016-10-04 20:07:22 -04:00
Michael Schneider
4692e25204 Add allowsGroupOpacity property to ASDisplayNode (#2320) 2016-09-29 14:30:05 -07:00
Hannah Troisi
7551627b58 [Layout] Rename ASLayoutable to ASLayoutElement (#2290)
* [Layout API] Rename ASLayoutable to ASLayoutElement

* arg

* fix wrapperWithLayoutElement

* [Layout API] Rename ASLayoutable to ASLayoutElement

* arg

* address Michael's comments

* Remove ASLayoutValidation files that were deleted on master since this diff was created.
2016-09-29 00:02:47 -07:00
Adlai Holler
f421787cd3 Add some nullability specifiers to our public headers (#2291) 2016-09-27 18:15:04 -04:00
Michael Schneider
f574f2c54e [Layout] Further deprecation steps for preferredFrameSize (#2255)
* Deprecate preferredFrameSize

- Remove all support for preferredFrameSize in ASDK
- preferredFrameSize setter calls through and sets the width and height of the node
- preferredFrameSize getter tries to return a CGSize based on the width and height properties otherwise if this is not possible it throws

* Address comments

* Return CGSizeZero for preferredFrameSize unless width and height are ASDimensionUnitPoints

* Better comment for preferredFrameSize and remove lock in calculateSizeThatFits:
2016-09-27 16:07:36 -04:00
Adlai Holler
bc59b96ca9 [ASDisplayNode] Add onDidLoad Method to Perform Work When Loaded (#2128)
* [ASDisplayNode] Add `onDidLoad:` method

* Prevent user from rasterizing wrapper nodes – they can't be reloaded in the future
2016-09-08 14:18:35 -07:00
Michael Schneider
8897614f0e [Layout] Layout API based on content area (#2110)
* Initial commit for adding a size constraint to ASLayoutable's

* Some more commits

* Fix sample projects in extra/

* Remove preferredFrameSize test of ASEditableTextNode

* Remove preferredFrameSize from examples_extra

* Add deprecation warning to -[ASDisplayNode preferredFrameSize]

* Add deprecation warning to -[ASDisplayNode measureWithSizeRange:]

* Commit

* Commit

* Remove ASRelativeSizeRange

* Make ASRelativeSize private

* Adjust examples

* Improve setting of -[ASLayoutable size] with points or fractions

* Add ASWrapperLayoutSpec

* Improve creation of ASRelativeDimension

* Add `preferredFrameSize` back and add deprecated logging

* Add `layoutSpecBlock` setter and getter and add locking for it

* Add better documentation and fix macros to create ASRelativeDimension

* Create new ASSizeRangeMake with just a CGSize as parameter

* Update Kitten and Social App Layout example

* Add layoutThatFits: and deprecate measure:

* Rename ASRelativeDimension to ASDimension

* Fix examples for ASDimension renaming

* Remove fancy height and width setter

* Fix ASDimension helper

* Rename -[ASLayout layoutableObject] to -[ASLayout layoutable]

* Update layout related methods and more clearer documentation around how to use it

* Deprecate old ASLayout class constructors

* Don't unnecessary recalculate layout if constrained or parent size did not change

* Use shared pointer for ASDisplayNodeLayout

* Fix rebase conflicts

* Add documentation and move implementation in mm file of ASDisplayNodeLayout

* Fix test errors

* Rename ASSize to ASLayoutableSize

* Address comments

* Rename setSizeFromCGSize to setSizeWithCGSize

* Improve inline functions in ASDimension

* Fix rebase conflicts
2016-09-07 08:44:48 -07:00
Adlai Holler
33a680255c [ASDisplayNode] Add Convenience Interface State Accessors (#2168)
* Finish renaming fetchData range, add convenience accessors

* Update example

* Update new tests
2016-09-01 16:44:16 -07:00
Michael Schneider
f8e135a1be Add old transition API back but allow call from background thread (#2135) 2016-09-01 16:09:59 -07:00
Michael Schneider
68d6d6f5b4 [ASDisplayNode] Add documentation for range state changes and moved deprecated header to category file (#2170)
* Add documentation for range state changes and moved deprecated header to category file

* Fix self.usesImplicitHierarchyManagement not found
2016-08-31 15:39:23 -07:00
Michael Schneider
11215bf97f [Automatic Hierarchy Management] Rename IHM to automatic hierarchy management and move out of beta header (#2066)
* Rename automaticHierarchy to automaticallyManagesSubnodes

* Comment adjustments
2016-08-15 12:06:06 -07:00
Michael Schneider
adcc9afb5a [Layout Transition] Add default fade in / out layout transition (#2052)
* Add default fade in / out layout transition

* Add example for layout transition

* Update for recent layout transition API changes

* To be able to do a layoutTransition the node needs to be loaded

* Rename layoutTransitionDuration to defaultLayoutTransitionDuration

* Expose default layout transition duration delay and options

* Use `UIViewAnimationOptionBeginFromCurrentState` for initial defaultLayoutTransitionOptions
2016-08-13 17:35:20 -07:00
Michael Schneider
32058815f2 Move Transition Layout API out of beta header and remove shouldMeasureAsync from API
shouldMeasureAsync is enabled by default now.
2016-08-10 10:30:25 -07:00
Michael Schneider
024b8afef5 Move NS_ASSUME_NONNULL_END to the end of the ASDisplayNode header (#2046) 2016-08-09 13:06:01 -07:00
Hannah Troisi
abf8d5b9aa [Infer] change atomic properties to nonatomic (#1932) 2016-07-16 10:46:55 -07:00
Michael Schneider
359785ac92 [ASDisplayNode] Add automatic measurement before layout (#1725)
* Add automatic measurement before layout

* Remove code not needed or addressed in a different PR

* Adjust comments and rename __layoutSublayouts to __layoutSubnodes

* Check before setting up a placeholder layer if the node should have a placeholder
2016-07-14 21:51:40 -07:00
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
Levi McCallum
20523821f9 Revert "Merge pull request #1673 from maicki/AddAutomaticMeasureBeforeLayout"
This reverts commit 2e384a32e15d34ea8f963dbc4e44aaa297ca019b, reversing
changes made to b8618d3151d9714d24ccfd935b92a99b774442f1.
2016-06-06 13:12:10 -07:00
Michael Schneider
691749d098 Address comments 2016-06-03 14:18:49 -07:00
Michael Schneider
5cfc16733a Add node as parameter in ASLayoutSpecBlock 2016-04-22 11:22:20 -07:00
Michael Schneider
f3c48805e0 Add better comments for layoutSpecBlock 2016-04-22 11:08:13 -07:00
Michael Schneider
87a37a283e Add a block API to provide an ASLayoutSpec without having to subclass ASDisplayNode 2016-04-20 19:16:54 -07:00
Michael Schneider
a6f287a8fd Address pull request comment regarding ASDisplayNode properties 2016-04-09 11:23:25 -07:00
Michael Schneider
39950e74b2 Remove NS_AVAILABLE_IOS(8_0); 2016-04-09 11:23:25 -07:00
Michael Schneider
28c4fede57 Add support for newly added a11y properties in iOS 8 / 9 and tvOS
New a11y properties:
- accessibilityNavigationStyle
- accessibilityHeaderElements
- accessibilityActivationPoint
- accessibilityPath
2016-04-09 11:23:25 -07:00
Michael Schneider
f3303c1fb8 Add properties for accessibilty to ASDisplayNode to support layer backed nodes 2016-04-09 11:23:25 -07:00
Adlai Holler
a90a83b607 Copy sublayers to avoid NSFastEnumerationMutation exception 2016-03-23 21:57:23 -07:00
appleguy
d9ef0922d8 Merge pull request #1354 from ejensen/cleanup
[Refactoring] Objective-C 2.0 / Modern syntax for arrays, dictionaries, numbers; logic simplification
2016-03-17 01:06:33 -07:00
Eric Jensen
33fda7ab49 - Use modern Objective-C syntax.
-  Simplify comparisons.
-  Remove dead stores.
2016-03-15 22:34:29 -07:00
Huy Nguyen
22b105bfdc ASCollectionView doesn't animate size changes if some of the updated cell nodes don't want to 2016-03-15 16:17:43 -07:00
Levi McCallum
d8d76635ff Perform animation transition on measureWithSizeRange instead of separate method 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
appleguy
8d9d5a0cc3 Merge pull request #1132 from garrettmoon/switchToInstanceDrawAndDisplay
[ASDisplayNode+AsyncDisplay] Implement instance methods of draw and display, use for text and image performance boost.
2016-01-28 16:17:31 -08:00