26 Commits

Author SHA1 Message Date
hanton
7a12bf3a20 Fix typo. 2015-01-02 17:16:58 +08:00
Ryan Nystrom
912bc9d460 Fade out placeholders
Added an API to fade out a node's placeholder when it is finished rendering.

fixes #156
2014-12-18 12:53:15 -08:00
Ryan Nystrom
d27c8859c7 Node placeholder API
ASDisplayNodes now have an overidable method -placeholderImage that lets you provide a custom UIImage to display while a node is displaying asyncronously. The default implementation of this method returns nil and thus does nothing. A provided example project also demonstrates using the placeholder API.
2014-12-15 17:23:52 -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
Nadine Salter
d8c1d71f24 Merge pull request #144 from facebook/issue-107
Support UIViewContentModeCenter with ASImageNode
2014-12-09 11:52:47 -08:00
Ryan Nystrom
647a9409d6 Support UIViewContentModeCenter with ASImageNode 2014-12-05 15:25:55 -08:00
Nadine Salter
eb600b955a Merge pull request #139 from facebook/imagedownloader-ios7
ASBasicImageDownloader iOS 7 support
2014-12-04 12:56:06 -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
93ce2b38a2 Make ASNetworkImageNode Just Work.
Use ASBasicImageDownloader by default -- you can now do...

  ASNetworkImageNode *imageNode = [[ASNetworkImageNode alloc] init];
  imageNode.URL = [NSURL URLWithString:@"..."];
  [self.view addSubview:imageNode.view];

...and it'll do the right thing.
2014-12-03 17:31:56 -08:00
Nadine Salter
8ecebcfe70 Convert Kittens sample project to ASNetworkImageNode.
Working-range-driven image loading.

(Note that ASNetworkImageNode and ASMultiplexImageNode haven't yet been
updated to work with the new `-reclaimMemory`-based working range
system, so this doesn't quite behave correctly yet.)
2014-11-21 18:40:18 -08: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
ee3aec42a2 Tidy ASCollectionView sample project. 2014-11-18 14:14:28 -08:00
appleguy
3f7dc75bb1 Merge pull request #101 from nguyenhuy/collection_view
Add ASCollectionView
2014-11-17 19:03:59 -08:00
Nadine Salter
f25bb07c6b Tweak ASMultiplexImageNode example assets. 2014-11-17 17:31:38 -08:00
Nadine Salter
18cb359ad0 ASMultiplexImageNode example project. 2014-11-17 17:25:46 -08:00
Nadine Salter
f0ad2accc6 Image assets for ASMultiplexImageNode example. 2014-11-17 16:55:30 -08:00
Huy Nguyen
1f8b446b9c Add CollectionViewSample.
Update sample for more items.
2014-11-12 21:32:01 +02:00
Oliver Clark Rickard
5197e2490b Fix untappable link in kittens example 2014-11-05 16:28:12 -05:00
Nadine Salter
72f9cb9d73 Remove ASImageNode thread affinity asserts (#57). 2014-10-22 13:50:02 -07:00
Nadine Salter
c1f7d9f78d examples/README. 2014-10-15 09:31:34 -07:00
Arnaud Coomans
812a15fc2a Added defaults for iPhone 6 and 6+ to avoid scaled mode 2014-10-14 20:55:18 -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
Arnaud Coomans
486ea1e7a3 Added source to Podfiles 2014-10-14 18:41:19 -07:00
Nadine Salter
f83f113493 Documentation.
Generated with jekyll & appledoc.  Image assets are temporary.
2014-10-07 19:31:46 -07:00
Nadine Salter
bd612fd725 Example projects. 2014-10-01 16:27:00 -07:00