7 Commits

Author SHA1 Message Date
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