10 Commits

Author SHA1 Message Date
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
Eric Jensen
ddd5ff1f75 Correct spelling errors 2016-03-15 21:56:51 -07: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
Adlai Holler
55e3f1ee00 Fix a stupid type mismatch in ASWeakSet 2016-02-20 15:40:47 -08:00
Adlai Holler
70bc80a304 Fix map table type in ASWeakSet 2016-02-20 15:40:47 -08:00
Adlai Holler
0c6ad25f46 Add some documentation 2016-02-20 15:40:47 -08:00
Adlai Holler
99b674c346 Lay some foundation for our new pending state controller 2016-02-20 15:40:47 -08:00