1964 Commits

Author SHA1 Message Date
Scott Goodson
f97a509541 [ASRangeController] Ensure that even if the collection view layout is inconsistent, it is impossible for a visible item to not be in the display range. 2016-03-12 16:26:33 -08:00
Michael Schneider
b4b9f0750c Improve going into full range mode on scroll 2016-03-12 16:21:29 -08:00
Michael Schneider
e4ddb7e270 Go into full range mode if a scroll happens 2016-03-12 15:44:27 -08:00
appleguy
4f742a9640 Merge pull request #1369 from garrettmoon/addSynchronousImageCacheMethod
[ASNetworkImageNode] Add support for attempting to get image synchronously from cache to guarantee intra-frame display.
2016-03-11 22:36:50 -08:00
appleguy
aac50320dc Merge pull request #1364 from levi/patch-9
[ASDisplayNode] Method naming - use internal underscore notation for recursivelyTriggerDisplayAndBlock
2016-03-11 22:30:31 -08:00
Garrett Moon
3a7d150680 Remove extraneous brackets, check _imageLoaded before doing work 2016-03-11 21:58:49 -08:00
Garrett Moon
53f6dadbbb Should be nullable not _Nullable 2016-03-11 21:58:49 -08:00
Garrett Moon
af61645faf Add support for attempting to get image synchronously 2016-03-11 21:58:49 -08:00
appleguy
a4e3ba49b4 Merge pull request #1349 from levi/patch-8
[ASDimension / ASSizeRange] Add ASSizeRangeMakeExactSize method
2016-03-11 21:21:09 -08:00
appleguy
e645a511be Merge pull request #1370 from guodac/subnode-layout-changed
[ASCollectionView] Ensure layoutFacilitator is notified when cell relayout results in size change.
2016-03-11 19:05:00 -08: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
Gordon Chen
508ac44238 make sure ASCV's layoutFacilitator triggers layout recalculation when its subnode has size change 2016-03-11 16:49:33 -08:00
Scott Goodson
e3dde87bfd [ASDisplayNode] Add REQUIRES_SUPER to a few ASDisplayNode+Subclasses.h methods that do require it. 2016-03-10 20:55:01 -08:00
Scott Goodson
ff8ffffb7b [ASCellNode] Upgrades to ASCellNodeVisibilityEvent to ensure it is always synchronized with visibilityDidChange: 2016-03-10 20:21:00 -08:00
Levi McCallum
f3f92423ad Use property underscore notation for recursivelyTriggerDisplayAndBlock
Now that I understand the notation, finding that we're not using it correctly.
2016-03-10 19:57:33 -08:00
Scott Goodson
0e460ca00a [ASRangeController] Don't bother asking UIKit for the visible index paths if view is zero-sized, as it triggers a reloadData. 2016-03-10 19:10:25 -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
appleguy
d40b6c61c8 Merge pull request #1352 from ejensen/deprecated-enum
[ASTextKit] Update usage of deprecated NSControlCharacterAction value
2016-03-10 00:28:02 -08:00
appleguy
7f623412dc Merge pull request #1351 from ejensen/videonode-currentItem-getter
[ASVideoNode] Correct currentItem getter
2016-03-10 00:27:13 -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
Scott Goodson
27b8bcc3c6 [ASRangeController] Support observing UIApplicationState methods, notifying cells of invisibility & freeing memory on backgrounding. 2016-03-09 19:22:57 -08:00
appleguy
32bc6c2125 Merge pull request #1357 from maicki/AddASLayoutRangeModeLowMemory
[ASRangeController] Cleanup code
2016-03-09 18:58:17 -08:00
Michael Schneider
f45d4ac4fb Cleanup code 2016-03-09 18:56:39 -08:00
Eric Jensen
7119dc3d59 Correct ASVideoNode's currentItem getter method 2016-03-09 18:54:31 -08:00
appleguy
fbbfd14130 Merge pull request #1355 from maicki/AddASLayoutRangeModeLowMemory
[ASRangeController] Add ASLayoutRangeModeLowMemory
2016-03-09 17:19:19 -08:00
Michael Schneider
a788f5e2d9 Enable ASRangeControllerAutomaticLowMemoryHandling 2016-03-09 16:59:01 -08:00
appleguy
620fdfc059 Merge pull request #1346 from tomizimobile/buttonNodeSelectedHighlightedState
[ASButtonNode] Support the combined [.Selected, .Highlighted] state
2016-03-09 16:54:12 -08:00
appleguy
58544e2217 Merge pull request #1347 from aaronschubert0/astextnode-truncation-fix
[ASTextNode] Fix default ellipsis not showing for line breaks
2016-03-09 16:50:25 -08:00
appleguy
5fde235d87 Merge pull request #1356 from rcancro/textShrinkningOptimizations
[ASTextNode] More refinements to the new font size adjuster behavior.
2016-03-09 16:48:29 -08:00
appleguy
0bc60605e5 Merge pull request #1348 from eanagel/fix-collection-hang
[ASCollectionView] Ensure that we use the correct default size for collection nodes when constrainedSize delegate method not implemented.
2016-03-09 16:41:51 -08:00
rcancro
bcb1832fcd Fixed some text shrinking issues
Previously I was multiplying the calculated height of the text by the scale factor. This fails in the case where we have a long string that doesn't fit, but it is shrunk so much that it now has more than enough room in the renderer's constrained size. In this case we fail to update the calculated size's width.

Also updated `lineCountForString` in `ASTextKitFontSizeAdjuster` to reuse a sizer layout manager and text container.
2016-03-09 15:27:33 -08:00
Michael Schneider
13207dc2da Change memory notification method name 2016-03-09 14:53:37 -08:00
Michael Schneider
bf822dee37 Add ASLayoutRangeModeLowMemory 2016-03-09 14:40:40 -08:00
Eric Jensen
9d4c53b0fa Replace usage of deprecated NSControlCharacterAction value 2016-03-09 11:44:13 -08:00
Levi McCallum
52391dcc27 Change method name in implementation 2016-03-09 10:42:56 -08:00
Levi McCallum
a07f7b73f0 Change method name in header 2016-03-09 10:42:35 -08:00
Levi McCallum
d4a0c34d86 Add ASSizeRangeMakeWithExactCGSize method 2016-03-09 10:39:46 -08:00
Levi McCallum
167b7d404e Add header for extern ASSizeRangeMakeWithExactCGSize 2016-03-09 10:38:25 -08:00
Ethan Nagel
352247184a Ensure that we use the correct default size for collection nodes even if layoutSubviews has not been called yet. This is a more conservative approach than the previous one. 2016-03-09 09:56:32 -08:00
Tom King
a22278340f fixed indentation 2016-03-09 10:27:38 -05:00
Aaron Schubert
71eb9582fb [ASTextNode] Fix default ellipsis not showing for line breaks 2016-03-09 15:10:26 +00:00
Tom King
cd85389397 support the combined [.Selected, .Highlighted] state in ASButtonNode 2016-03-09 09:23:15 -05:00
appleguy
de4e4db671 Merge pull request #1340 from ejensen/documentation-corrections
[Documentation] Various header documentation corrections and refinements.
2016-03-09 02:52:48 -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
appleguy
112489927e Merge pull request #1338 from tomizimobile/truncationTokenFix
[ASTextNode] Fix tapping on truncation token for 3D Touch phones
2016-03-09 02:16:45 -08:00
Hannah Troisi
51eccb3d96 [ASImageNode] More refined naming and documentation for [ASImageNode shouldShowImageScalingOverlay] 2016-03-08 23:30:17 -08:00
Hannah Troisi
fbe72a06e4 [ASImageNode] A ASImageNode debug feature showing pixel scaling amount
- 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]
2016-03-08 23:15:07 -08:00
Hannah Troisi
d64c05a68e [ASImageNode] A ASImageNode debug feature showing pixel scaling amount
- 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]
2016-03-08 23:13:32 -08:00