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
Highlight target layers with non-zero bounds.origin exhibited broken
text highlighting behavior. Highlights would appear offset by the
layer’s bounds.origin, and would not align with their target text. This
most often appeared in UIScrollView, where highlights would appear
incorrectly offset once the scroll view was scrolled. Fix by accounting
for bounds.origin in the calculations of the text overlay highlight
rects.
(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
TextKit machinery automatically applies styling to text marked with the
NSLink attribute, but because ASTextNode is unaware of it, the node's
tap handler doesn't treat NSLinks as links. Add NSLinkAttributeName to
the default linkAttributeNames property.
`-[ASDisplayNode willEnterHierarchy]` and `-didExitHierarchy` are
subclass hooks and should not be called directly -- doing so will
trigger an assertion! Move these declarations to the subclassing
header.
Fix regression from the ARC conversion. Change the raw, unretained
pointers in ASControlNode to weak references. Use NSMapTable instead of
the pointer-as-NSValue system.
`-[ASDisplayNode addSubnodeAsynchronously::]` and
`-replaceSubnodeAsynchronously:::` are unused and confusingly increase
AsyncDisplayKit's API surface. `-addSubnode:` and friends are
thread-safe and can be used on background threads, so removing these
methods does not constitute a decrease in functionality.