* Check in ASLayout if size is valid for sizing instead of valid for layout
* Return constrainedSize from calculateSizeThatFits:
Remove invalid constrainedSize check within ASNetworkImageNode. Furthermore as ASDisplayNode does not return CGSizeZero anymore we have to give the display nodes we use in tests and are involving a stack spec an intrinsic content size.
* Remove extra constrainedSize handling in ASNetworkImageNode handling
* Change test to use FLT_MAX
* 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:
* 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
* Add failing test case
* [_ASDisplayLayer] If we skipped render due to being zero-size, enqueue a render when we get a real size
* Remove pointless import
* Add ability to force the size which an image node is rendered.
* Add unit tests for forced scaling.
* Whoops, need results!
* Round forced scaling.
* Check size of contents too.
* Remove unnecessary container node.
* [Optimization] Convert to type-generic math
* add std:: prefix in obj-c++ files
* more cleanup
* revert test changes
* convert min and max back to fmin/fmax
Using Objective-C attributes, in this case `unavailable`, we can hide
unsupported APIs at compile time instead of detecting and warn about it
at runtime with a set of asserts.
* [ASTextNode, ASVideoNode] Use ASDisplayNode base class lock for subclass property synchronization
* fix headers to match master
* address @appleguy, @maicki comments
* import header
* Swap lock in ASNetworkImageNode as well
* remove invalid comment
* more cleanup of locks
Summary:
Use NSData as key
Add chunking of files
Add support for Animated Images
This adds support for GIF playback in ASDK. It's not currently ready
for merging to public ASDK – for one the GIF decompression may make
more sense in PINRemoteImage.
Removed duration as it wasn't used
Make cover image lazily loaded
Differential Revision: https://phabricator.pinadmin.com/D82033
If previously-displayed contents is gone (e.g. clearContents), and is not finished displaying
by the time the node is onscreen, recreate the placeholder immediately.
Introduces ASLayoutRangeModeVisibleOnly, allowing the preservation of decoded backing stores without any extra padding to
strictly minimize memory usage while supporting immediate re-display of content. Set visible range controllers to this mode
upon app suspend / memory warning, while more aggressively clearing others to the ASLayoutRangeModeLowMemory mode.
By default, when the app is running and recieves a memory warning, we set the range mode for non-visible controllers to
ASLayoutRangeModeVisibleOnly. This is because, unlike in the app suspend case where on app resume we can restore controllers
from LowMemory to VisibleOnly, the memory warning doesn't provide a good opportunity to do this.
A new +Beta API to control this behavior is called +setRangeModeForMemoryWarnings:, as some apps may prefer to use LowMemory
in the memory warning scenario. For these apps, optimal user experience will require manually setting the range mode back
to some larger value as the user navigates the app, or they will encounter controllers that are temporarily blank and need
a moment to re-display their contents as they start to become visible.
- shows a red text label overlay on bottom right hand corner of ASImageNodes with pixel scaling factor
- import AsyncDisplayKit+Debug.h and enable using [ASImageNode setEnableImageDebugOverlay]