54 Commits

Author SHA1 Message Date
Nadine Salter
bacfcbd24d Merge pull request #202 from facebook/batch_insertion
Batch insertion for reload #200
2015-01-07 14:53:15 -08:00
Li Tan
b9c6f3de03 Fix crash in Flow Controller 2015-01-06 18:04:42 -08:00
Li Tan
3adb0b1b93 Batch insertion for reload 2015-01-06 17:43:16 -08:00
Ryan Nystrom
7b86303f20 Forward touch events to either the node or super
`_ASDisplayView` now forwards touch events to either super or it's node, depending on whether or not the node implements the methods.

fixes #199
2015-01-06 16:06:59 -08:00
Nadine Salter
146a83568f Merge pull request #194 from facebook/table-selection
Call touch methods on _ASDisplayView super
2015-01-05 17:39:16 -08:00
Ryan Nystrom
7e30b10f13 Safe calls in ASTextNodeRenderer
fixes #190
2014-12-30 11:22:49 -08:00
Ryan Nystrom
f3be4ee041 Call touch methods on _ASDisplayView super
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
2014-12-30 09:47:05 -08:00
Li Tan
13c57020c1 Fix typo in reloadRowsAtIndexPaths 2014-12-26 08:59:01 -08:00
Li Tan
9367ccc19c Remove bachUpdate and begin/endUpdate 2014-12-18 20:35:27 -08:00
Li Tan
0d97d754ef fix deletion 2014-12-18 18:35:20 -08:00
Li Tan
e799ed9ea4 fix 2014-12-18 14:00:19 -08:00
Li Tan
3e6436245d fix inserting sections bug 2014-12-18 13:07:43 -08:00
Li Tan
a22c4a2761 Another case for deletion 2014-12-16 20:11:31 -08:00
Li Tan
ac86cd9523 Fix crash while deleting multiple sections 2014-12-16 20:04:20 -08:00
Nadine Salter
89a0a25347 Remove CATransaction hack.
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.
2014-12-16 14:10:04 -08:00
Li Tan
62248ee0eb Fix crash in reloadData 2014-12-15 22:36:57 -08:00
Li Tan
8b303710b6 fix unncessary change in editing 2014-12-15 15:57:11 -08:00
Li Tan
f7f5988fcd Support editing in table view and collection view 2014-12-15 13:19:10 -08:00
越凡
263db6f46c When doing refresh, we should cancel perform requests previously registered with performSelector:withObject:afterDelay: first, or it will do the sizeNextBlock twice with the same indexPath and then it will crash. 2014-12-07 14:26:09 +08:00
Nadine Salter
68a5b32b79 Merge pull request #140 from facebook/manual-display-part-deux
Update manual display logic
2014-12-04 12:57:03 -08:00
Ryan Nystrom
36cbea4f8f Update manual display logic
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.
2014-12-04 11:55:17 -08:00
Ryan Nystrom
c645935631 ASBasicImageDownloader iOS 7 support
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.
2014-12-04 11:25:36 -08:00
Nadine Salter
1103f82a5c .preventOrCancelDisplay -> .displaySuspended.
Rename the ASDisplayNode property to match its _ASDisplayLayer
counterpart -- `displaySuspended` is more succinct and is a more
plausible name for a Cocoa BOOL property.
2014-12-02 18:06:11 -08:00
Nadine Salter
51f3073c33 ASDisplayNode.inWindow -> .inHierarchy.
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.
2014-12-02 18:06:11 -08:00
Nadine Salter
a53bc08eaf Merge pull request #127 from facebook/manual-display
Add -[ASDisplayNode display].
2014-12-02 17:49:55 -08:00
Ryan Nystrom
531be46dfd Cleaning up manual display per @secretiverhyme 2014-12-02 16:53:17 -08:00
Ryan Nystrom
8b0dbf7288 Manually display nodes
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.
2014-12-02 09:34:24 -08:00
Nadine Salter
5fc5adbb65 Merge pull request #117 from facebook/image-downloader
Simple, drop-in image downloader.
2014-12-01 14:49:44 -08:00
Huy Nguyen
230520fe7e Support custom working-range logic. 2014-11-25 12:31:20 +02:00
Nadine Salter
3c690bf9e5 ASBasicImageDownloader.
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.)
2014-11-21 18:40:18 -08:00
Nadine Salter
38f8e63b01 Support fractional tuning parameters (fixes #112). 2014-11-18 14:15:01 -08:00
appleguy
3f7dc75bb1 Merge pull request #101 from nguyenhuy/collection_view
Add ASCollectionView
2014-11-17 19:03:59 -08:00
Nadine Salter
3c8d4e9517 ASMultiplexImageNode.
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.
2014-11-17 15:02:17 -08:00
aleclarsoniv
c3cda17941 Add ASDisplayNode.cornerRadius 2014-11-13 17:56:05 -08:00
Huy Nguyen
0eb7e5fc39 Update ASRangeController to support ASCollectionView and no longer assume vertical scrolling when calculates working range. 2014-11-12 21:27:26 +02:00
Nadine Salter
6c9e499875 Minor ASRangeController improvements (fixes #81). 2014-11-07 15:51:55 -08:00
Nadine Salter
a3e78d1cee Support background colour and selection style on ASCellNodes.
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
2014-11-03 17:45:40 -08:00
David Beck
4ed2120cfa Added tintColor convenience methods
tintColor is now forwarded to the underlying view, and much more importantly, the node is notified when the tintColor changes on the view.
2014-10-23 19:51:10 -07:00
Nadine Salter
d0b7a015e8 Improve ASRangeController dealloc-safety.
(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.
2014-10-22 13:50:24 -07:00
Nadine Salter
367b6da116 Use ASDisplayNodeScreenScale().
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.)
2014-10-22 13:36:40 -07:00
Nadine Salter
9225309c9a [appledoc] Fix all appledoc warnings. (#65) 2014-10-17 15:41:25 -07:00
Nadine Salter
f493b130ef [appledoc] Enable explicit crossrefs.
Fix warnings for existing `@see ...` crossrefs.
2014-10-17 15:41:25 -07:00
Scott Goodson
c61b1c294c Several bug fixes for the 1.0 release of AsyncDisplayKit
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
2014-10-14 20:53:25 -07:00
Scott Goodson
f7d91bb877 Implement -reclaimMemory API and switch to manually controlled content clearing.
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
2014-10-14 18:45:56 -07:00
René Cacheaux
7ea0963b65 Wraps transaction async dispatches with autorelease pools. 2014-10-07 15:25:04 -05:00
Nadine Salter
0adab165ec Minor ASRangeController correctness fix. 2014-10-01 16:02:41 -07:00
Nadine Salter
57092baad7 Work around rdar://18448377. Fixes #29. 2014-09-24 17:56:19 -07:00
Nadine Salter
b8afd06b37 Fix issue #28. 2014-09-24 14:23:42 -07:00
Nadine Salter
f77f63878d Fix issue #27. 2014-09-24 14:23:31 -07:00
Nadine Salter
803585164c Convert AsyncDisplayKit to ARC. 2014-09-23 15:30:30 -07:00