Currently we miss calling `-[super touches*]` on `_ASDisplayView` touch events. We delegate handling to the node which then forwards all touch events to the *superview*, skipping the current view. This seems to have some side effects with `UITableView` and it's cells/content views.
fixes#188
ASRangeController previously enqueued display of individual nodes by
adding their views to the hierarchy, wrapping each `-addSubview:` call
in an explicit CATransaction to force displays to occur in order. This
hack is no longer necessary -- kill it.
Postpone manual display until a future release when it can be called on any thread. Provide the current node manual display logic as a category on ASDisplayNode only available for ASRangeController. Deprecate -displayImmediately.
On iOS 7, NSURLSessionTask is actually a __NSCFURLSessionTask (private class) and our NSURLSessionTask category to add the associated object asyncdisplaykit_metadata was crashing on iOS 7 stating that there was no method. This commit changes the category to extend NSURLRequest as well as change NSURLSessionTask to NSURLSessionDownloadTask.
Rename the ASDisplayNode property to match its _ASDisplayLayer
counterpart -- `displaySuspended` is more succinct and is a more
plausible name for a Cocoa BOOL property.
This is a remnant from before `willAppear` and `didDisappear` were
renamed to better reflect their hierarchy-change status (being added to
the hierarchy != being visible). May be useful for turians.
Added a sample project that will demonstrate how to manually display nodes. Removed the UIWindow hack that coupled display of nodes with Core Animation transactions.
This is a simplistic, NSURLSession-based downloader object that
implements ASImageDownloaderProtocol and can be used with
ASMultiplexImageNode and ASNetworkImageNode.
(Closes#115. NSURLSession should suffice for most usecases, and this
code should provide a good jumping-off point for a more-complex
implementation.)
Initial open-source release of ASMultiplexImageNode. Documentation and
example code forthcoming.
Note: ASMultiplexImageNode requires Xcode 6 to compile. Tests are now
compiled against the iOS 8 SDK and run on iOS 7.1 and iOS 8.
Most UITableViewCell properties aren't useful in conjunction with
ASCellNode -- the system's UIView properties are unsupported for
performance reasons, and properties that configure them (e.g., content
indentation) don't affect custom node hierarchies. This patch adds
support to _ASTableViewCell for the properties that *are* useful.
r=scottg
(1) We can't size nodes without a delegate, and if our owning controller
has been deallocated, our delegate will be nil. Handle this more
gracefully.
(2) Our teardown code needs to be executed on the main thread, but it's
conceivable that we might hit refcount 0 on a background queue. Force
deallocation to occur on the main thread.
Closes#27.
ASImageNode and ASHighlightOverlayLayer were both using
[[UIScreen mainScreen] scale] directly. Bad. No cookie. Use
ASDisplayNodeScreenScale() instead.
(Also, regenerate Xcode project with Xcode 6 and current CocoaPods.)
Fixes:
- Usage of UIScreen in -[ASDisplayNode init]
(the offending individual will be prosecuted)
- #38: Proper teardown of nodes owned by ASTableView / ASRangeController
- #34: Fix infinite recursion in very rare subclassing scenario
- #30: Avoid animating cell and section additions to ASTableView
- #19: Set a more reasonable default for maximum display concurrency
r=nadi
ASDisplayNode and several subclasses had previously cleared memory-heavy
objects like the backing store and text layout manager when the node's
view
or layer is removed from a visible heirarchy. This works great in any
system
that uses a "working range", where exiting the range removes the node
from
the hierarchy and reclaiming memory at that time is important.
However, for
standard UIViewController patterns (unused in Paper), this behavior
causes
highly undesirable thrashing (leading to visible flashes & wasteful
re-rendering of content).
After this change, node subclasses should implement -reclaimMemory if
they
need to perform any other cleanup besides backing store destruction
when they
leave a working range or other scenario where memory reduction is
valuable.
To trigger this behavior, calling code should use
-recursivelyReclaimMemory.
r=nadi