* Renamed range update callbacks
We finally settled on
didEnter/ExitDisplayState
didEnter/ExitPreloadState
didEnter/ExitVisibleState
This change is meant to unify the range update methods to relate to each
other and hopefully be a bit more self explanatory.
* Guarantee interface callbacks happen on main.
* move fetchData / clearFetchedData to default implementations
* Move deprecated methods to new deprecated category
* Don't bring in cocoapod change.
* Nits
* Capetalize
* 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
* Fixes a deadlock caused by walking up the heirarchy.
* Use scope locker / unlocker and add a comment.
* Add comment about calling __setNeedsLayout without the lock.
Wait until all subnodes have the new trait collection before laying out the root node. The way I’m using `asyncTraitCollectionDidChange`, I sometimes call methods that call `setNeedsLayout` which causes a new layout pass to begin before the new trait collection has been propagated to all nodes. This leads to weird behavoir, like nodes being laid out twice in the same call stack!
This change won’t stop possibly unnecessary layout passes because of `asyncTraitCollectionDidChange`, but it will at least do a complete layout pass once we have propagated all traits.
Ultimately the solution to this problem (as Adlai pointed out) is to wait until the CA transaction commit to perform the actual layout.
* 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.
* Adds possibility to have custom annotation pins on static map. This resolves#1889.
* Removes wrong example for map annotations and adds some annotations to correct map example. #1889
* Static map node now uses specific property block to get annotation views.
* Changes self to strongSelf inside of the snapshotters completion block.
* MapNode: Adds statement in documentation.
* MapNode: Block for annotation view/image now returns UIImage and center offset is returned in inout param.
* MapNode and map example: Fixes from review.
* MapNode example: Gets image directly from custom annotation, without creating annotation view.
Previously we were only propagating the trait collection on `viewWillTransitionToSize` since it is called shortly after `willTransitionToTraitCollection`. However, some important things can happen in that time “shortly after” (like collection view layout). As long as nothing changes from `willTransitionToTraitCollection` to `viewWillTransitionToSize` (which it shouldn’t) the traits will not be re-propagated anyhow.
Also make sure to use the `ASEnvironmentTraitCollectionMakeDefault` method when creating new envTraitCollection so the struct isn’t filled with junk.
* Add unit test to confirm that supplementary items must be contained within actual sections
* [ASLayoutInspecting] Deprecate collectionView:numberOfSectionsForSupplementaryNodeOfKind:
* Add another test to dig deeper into UICollectionView
* I didn't really understand NSProxy
But I think I do now :)
Previously I inherited from NSObject because I didn't think I needed
anything fancy, but it turns out NSProxy is *less* fancy than NSObject
and allows for overriding more methods. This change is probably purely
academic in that we don't use this class to forward NSObject specific
messages, but I believe this is the 'right thing'.
* Update comment, thanks @maicki!
* Fixes issues with accessibility elements in scroll views
There are two changes here:
1. Because we can't reliably update the screen positions of accessibility elements
contained within a scroll view, we need to calculate them on demand, so we override
the accessibilityFrame method to do that.
2. Throwing away our calculated accessibility elements on frame change seemed to
cause the accessibility system to be confused.
Combining these two fixes together results in success, yay!
* Don't set the accessibilityFrame, getter is overridden.
* First approach to improve accessiblity
* Clear accessibleElements in addSubview: and willRemoveSubview:
* Adjust comments and rename viewNode to node
* Create new accessible elements if screen coordinates of view changes
* Remove legacy clearing of accessibleElements
* Performance improvements
* Use bounds for screenFrame calculation and indexOfObjectIdentical: in indexOfAccessiblityElement:
* Add ASDK_ACCESSIBILITY_DISABLE compiler flag to disable custom accessibility code in ASDK
* No need to set a frame if a subnode view is an accessibility element and not layer backed
* [ASTextNode] Fix highlighting when textContainerInsets are set.
* Add ASTextNodeSnapshotTests to xcodeproj.
* Add snapshot test for container inset and highlighting.
* 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
* Move constrainedSizeForNodeAtIndexPath from the DataSource to the Delegate in ASCollectionView and ASPagerNode
* Fix ASPagerNode declaration of dataSource and delegate
As ASPagerDataSource does not inherit from ASCollectionDataSource it's not possible to declare it as property.
* Update comment
* [ASVideoNode] Use the videoComposition when generating images.
* [ASVideoNode] Improve playerState behaviour.
* [ASVideoNode] Use KVO on _player.rate to determine the playerState.
* Rebase ASRangeController diff with master.
* fix Table / CollectionNode debug label names
- now returns class names rather than generic ASTableNode, ASPagerNode
- ASPagerNode will be labeled as ASPagerNodeProxy (not sure how to get around this)
* refactor layout code: use ASDk's own resizeableRoundedCorner... methods
* Fixes and cleanup for manual layout version of range controller debug overlay.
I am working on a layout spec-based version, but it has some issues, so landing this to get the near-term value is probably the best next step.
* Remove .orig and .rej files.
* One last .orig file to remove.
* Final project file cleanup and tweaks to implementation for ASTableNode.
* fix build issues
* fix arrow directions