359 Commits

Author SHA1 Message Date
Huy Nguyen
3dc2ceb0ad Remove ASDisplayNodeExtraIvars 2016-04-15 21:48:11 +03:00
Garrett Moon
24c26014a7 Fix example builds 2016-04-13 14:23:02 -07:00
Eric Jensen
527397ba7e Replace id with instancetype in initializers 2016-04-13 11:20:05 -07:00
Scott Goodson
8ccef1e99f [ASEnvironment] Fix incomplete gating of upward propagation of layout properties (disabled for now). 2016-04-11 20:34:24 -07:00
appleguy
74407d50c4 Merge pull request #1513 from maicki/NodesLayerInLayerAccessiblity
[ASDisplayNode] Add handling layer backed accessibility elements within layer backed nodes
2016-04-11 17:46:19 -07:00
Michael Schneider
45d50624d1 Fix disabled state propagation for final layoutable 2016-04-11 17:41:48 -07:00
Michael Schneider
2fade63f1b Add handling layer backed accessibility elements within layer backed nodes 2016-04-11 12:59:04 -07:00
Michael Schneider
ed0ed74b72 Add switch to enable / disable layout option properties 2016-04-10 15:04:49 -07:00
Scott Goodson
974d8c8817 [ASEnvironmentState] Don't upward-propagate sizeRange or layoutPosition (this behavior, if ultimately desirable, requires additional limiting conditions). 2016-04-10 01:31:32 -07:00
appleguy
7c4db3fbc1 Merge pull request #1477 from maicki/SmallContentBatchFetch
[ASBatchContext] Fix fetch call won't occur for content smaller than bounds unless user scrolls
2016-04-09 19:15:06 -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
Michael Schneider
9c29d0efa8 Initial commit for improved accessibility support 2016-04-09 11:23:25 -07:00
Michael Schneider
be26f0c2e5 Revert back to use UIKit version to prevent animations 2016-04-09 10:55:52 -07:00
Michael Schneider
bb110ca6e8 Readd ASDisplayShouldFetchBatchForContext 2016-04-09 10:55:52 -07:00
Michael Schneider
24ca09ee6c Move most of the batch fetching logic to a central place for ASTableView and ASCollectionView usage 2016-04-09 10:55:52 -07:00
Michael Schneider
c25a252e1c Fix fetch call won't occur for content smaller than bounds unless user scrolls 2016-04-09 10:55:52 -07:00
Levi McCallum
6f41d28dd0 Fix issue where zero was returned on idential object array lookup
Reviewers: scottg, schneider, garrett

Reviewed By: garrett

Subscribers: jenkins

Differential Revision: https://phabricator.pinadmin.com/D84131
2016-04-08 16:35:40 -07:00
Levi McCallum
2cb6969c79 Use unsigned integers for findNodes vectors
Summary: Also refector logic and naming to be simpler and more descriptive

Reviewers: schneider, chris, scottg

Reviewed By: schneider, chris, scottg

Subscribers: chris, jenkins

Differential Revision: https://phabricator.pinadmin.com/D83911
2016-04-08 10:41:49 -07:00
Michael Schneider
27cc2bec82 Add merging ASEnvironmentStateExtensions on upward propegation 2016-04-05 14:22:32 -07:00
Michael Schneider
41eb1917e4 Fix setting ASEnvironmentStateExtensions values 2016-04-05 14:22:32 -07:00
Hannah Troisi
dbad1c38e5 [ASEnvironment - Layout] Fixes to upward propagation of ASLayoutable properties. 2016-04-02 15:03:43 -07:00
Michael Schneider
4e757f0969 General improvements
- Refactor naming of ASEnvironmentCollection to ASEnvironmentState
- Remove struct pointers
- Move ASEnvironmentStatePropagation to a enum class
- Move merge functions to pure functions
- Move ASLayoutOptionsForwarding and ASLayoutableExtensibility into ASLayoutSpec and ASDisplayNode
- Remove ASLayoutableSetValuesForLayoutable and move into explicit classes (ASDisplayNode, ASTextNode)
2016-03-31 20:43:20 -07:00
Michael Schneider
65b4961802 Add extensibility support for ASEnvironmentLayoutOptionsState 2016-03-31 20:43:20 -07:00
Michael Schneider
96df35e41a Initial commit for ASEnvironment 2016-03-31 20:43:20 -07:00
Eric Jensen
12da9ac6a9 Improve Swift compatibility of ASHorizontalAlignment & ASVerticalAlignment by using consistent naming 2016-03-21 11:16:28 -07:00
Scott Goodson
8308a4ce49 [AsyncDisplayKit] Adopt #pragma once, remove last remaining dispatch_sync (UIScreen scale). 2016-03-19 19:56:41 -07:00
Eric Jensen
17aebcbaba Add a space between the ? and : in ternarys 2016-03-17 10:38:51 -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
appleguy
2ad9d83520 Merge pull request #1353 from ejensen/spelling
[Documentation] Correct spelling errors
2016-03-16 22:53:15 -07:00
Michael Schneider
d3ba80ccfd Improvements for automatic range mode
- Only update range mode if visibility changes if the node is not range controlled
- Only change explicitly set range mode if ASRangeController becomes visible
- Return interface state for range controller in ASCollectionView and ASTableView based on if the containing node is range managed
2016-03-16 11:44:56 -07:00
appleguy
85cba28744 Merge pull request #1378 from hannahmbanana/arrayUtils
[ASMultidimensionalArrayUtils] Optimization for recursive version, expanded use case of more efficient 2D version
2016-03-16 11:25:49 -07:00
Eric Jensen
33fda7ab49 - Use modern Objective-C syntax.
-  Simplify comparisons.
-  Remove dead stores.
2016-03-15 22:34:29 -07:00
Eric Jensen
ddd5ff1f75 Correct spelling errors 2016-03-15 21:56:51 -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
Hannah Troisi
7f6ce4e9de [ASMultidimensionalArrayUtils]
- optimized ASRecursivelyFindIndexPathsForMultidimensionalArray() to remove enumerateUsingBlock:
- replaced single project call to ASIndexPathsForMultidimensionalArray() in ASRangeController with ASIndexPathsForTwoDimensionalArray()
2016-03-14 22:47:43 -07:00
Huy Nguyen
fa8f2f4429 Implement async transition 2016-03-11 18:56:58 -08:00
Scott Goodson
cdd1bd1e39 [ASRangeController] Ensure that visibilityDidChange: is always called on app launch for all initial cells. 2016-03-11 17:18:32 -08:00
Scott Goodson
aab2ecc26e [ASWeakSet] Properly cast kCFNull so that build settings for unit tests don't flag it (warnings as errors). 2016-03-10 17:22:26 -08:00
Scott Goodson
c3fb665ec1 [ASWeakSet] Support -allObjects to return a retained array of contents.
Use this array while enumerating ASRangeController instances in response to UIApplication notifications,
as it is possible for these events to trigger the mutation of the ASWeakSet and cause an enumeration error.
2016-03-10 16:20:21 -08:00
Scott Goodson
21bebb9d29 [ASRangeController] Improvements to application state change and memory warning handling.
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.
2016-03-09 21:22:45 -08:00
appleguy
1ce3834e0e Merge pull request #1343 from rcancro/cacheFontScale
[ASTextNode] Improvements to the implementation of the font scale adjuster.
2016-03-09 02:41:13 -08:00
rcancro
06a6bd6606 fix typo and kick off build again. 2016-03-08 16:32:24 -08:00
Scott Goodson
5c28bb8e21 [ASScrollDirection] Ensure definitions of "positive" scroll direction in batch context match the layout controller. 2016-03-08 00:53:06 -08:00
Scott Goodson
9e72679ffd [ASDataController] Swap order of section / item in optimized indexpath creation from yesterday :). 2016-03-07 12:08:31 -08:00
Scott Goodson
8cfd951f42 [ASDataController] If app code issues edit commands before first reload, ignore them, as UIKit will call -reloadData. 2016-03-05 21:21:22 -08:00
Scott Goodson
cc7ca4a08f [ASDataController] If app code issues edit commands before first reload, ignore them, as UIKit will call -reloadData. 2016-03-05 20:22:18 -08:00
Huy Nguyen
caddd1d287 Fix threadSafeBounds
- Bounds change set directly to _ASDisplayLayer should also be saved to threadSafeBounds
- Remove overkill _usesDisplayView flag
2016-03-03 16:18:07 -08:00
Huy Nguyen
5e49cc4382 Layout transition can measure in background 2016-03-02 22:47:04 -08:00
Huy Nguyen
9162d7b2df Implement thread-safe bounds and use it in ASTextNode 2016-03-02 22:42:53 -08:00