11 Commits

Author SHA1 Message Date
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
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
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
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
Nadine Salter
bd612fd725 Example projects. 2014-10-01 16:27:00 -07:00