22 Commits

Author SHA1 Message Date
Michael Schneider
15a789c719 Fix content inset problems if ASViewControllers root node has usesImplicitHierarchyManagement set to YES
There are content inset problems if a ASViewController is initialized with a root node (e.g a ASCollectionNode subclass) that has usesImplicitHierarchyManagement set to YES. The reason for that is that the subviews (e.g. the UICollectionView) of the ASViewController root node get's added to the view hierarchy in measureWithSizeRange: in ASDisplayNode.  measureWithSizeRange: of the root node is called in -viewWillLayoutSubviews in ASViewController. That is too late, so UIKit does not apply the automatic content inset to the UICollectionView anymore.
2016-03-04 19:22:09 -08:00
Scott Goodson
2a5464356f [ASViewController] Call -[super loadView] in order to harvest frame value and apply it to node's view. 2016-03-03 18:07:47 -08:00
Michael Schneider
def96ea726 Fix crash accessing automaticallyAdjustRangeModeBasedOnViewEvents property in ASViewController 2016-03-01 06:10:59 -08:00
Michael Schneider
aca5b14c2b Move automatic range update to a private API 2016-02-29 11:39:50 -08:00
Michael Schneider
760f4ada91 Add API to ASViewController to automatically adjust the range mode of the containing node based on view events 2016-02-29 11:39:50 -08:00
Levi McCallum
cb7ce44bf2 Revert updates to ASViewController 2016-02-10 15:22:43 -08:00
Levi McCallum
2e74a75492 Resize ASViewController node on view controller size transitions 2016-02-10 15:16:26 -08:00
Levi McCallum
a00e9bb41c Clean up node transition API 2016-02-10 11:44:12 -08:00
Levi McCallum
3444fa18dd Remove viewWillLayoutSubviews from ASViewController 2016-02-10 11:44:12 -08:00
Levi McCallum
5cf5cb8452 Delegate layout frame calculation to sublayout method 2016-02-10 11:44:12 -08:00
Scott Goodson
4b560a703a PR #1000 on GitHub! Provide a Beta API to enable the new, high efficiency render-ahead mechanism. 2015-12-26 16:34:44 -08:00
Scott Goodson
c6fa897dc2 Add nullability annotations to newer APIs that lacked it from the original PR. 2015-12-25 15:35:52 -08:00
Scott Goodson
38d9ceb230 Fix corrupted project file from merge. 2015-12-23 12:52:38 -08:00
Scott Goodson
065625f246 Make ASCollectionView always create an ASCollectionNode. Add visibilityDidChange:, interfaceStateDidChange:fromState: 2015-12-22 21:46:46 -08:00
Scott Goodson
840884272d Introduced ASHierarchyState. Created ASDisplayNode+FrameworkPrivate.h. Fixed deadlock. 2015-12-05 22:20:16 -08:00
Levi McCallum
03bd1f4358 Expose ASViewController's constrained size for subclass customization 2015-10-27 11:40:43 -07:00
Levi McCallum
0972c56f73 Call UIViewController's designated initializer in ASViewController
ASViewController currently cannot be subclassed in Swift, as the original call to `[super init]` directs to calling the designated initializer of UIViewController `[self initWithNibName:bundle:]`. Because of Swift's initializer inheritance behavior, this designated initializer will not implicitly be available on the subclassed ASViewController without some extra boilerplate. Adding an explicit call to the designated initializer fixes this issue.
2015-10-20 16:37:39 -07:00
Scott Goodson
a58844379c Implementation of Synchronous Concurrency features for AsyncDisplayKit 2.0
This provides internal features on _ASAsyncTransaction and ASDisplayNode to facilitate
implementing public API that allows clients to choose if they would prefer to block
on the completion of unfinished rendering, rather than allow a placeholder state to
become visible.

The internal features are:
-[_ASAsyncTransaction waitUntilComplete]
-[ASDisplayNode recursivelyEnsureDisplay]

Also provided are two such implementations:
-[ASCellNode setNeverShowPlaceholders:], which integrates with both Tables and Collections
-[ASViewController setNeverShowPlaceholders:], which should work with Nav and Tab controllers.

Lastly, on ASDisplayNode, a new property .shouldBypassEnsureDisplay allows individual node types
to exempt themselves from blocking the main thread on their display.

By implementing the feature at the ASCellNode level rather than ASTableView & ASCollectionView,
developers can retain fine-grained control on display characteristics.  For example, certain
cell types may be appropriate to display to the user with placeholders, whereas others may not.

Follow-up work will include unit tests, revisiting names, and the header locations of definitions.
2015-09-27 19:14:36 -07:00
Huy Nguyen
a864341710 Remove nonnull and nuulable annotations in ASViewController. Travis don't recognize them (yet). 2015-09-17 16:07:43 +03:00
Huy Nguyen
fcd76dbd19 Use nonnull annotation, instead of sanity check, for node property in ASViewController. 2015-09-17 15:59:37 +03:00
Huy Nguyen
72d108cd98 Minor fixes in ASViewController and Multiplex sample. 2015-09-17 15:58:21 +03:00
Huy Nguyen
07c0d78c71 Add ASViewController and update Multiplex sample to use it. 2015-09-17 15:58:21 +03:00