Rename AsyncDisplayKit to Texture (#4)

* Rename AsyncDisplayKit to Texture

* More renaming
This commit is contained in:
Garrett Moon
2017-04-11 13:46:30 -07:00
committed by Garrett Moon
parent fa18ad226b
commit 5c8b31684a
62 changed files with 214 additions and 214 deletions

View File

@@ -8,4 +8,4 @@ layout: default
Crikey! There doesn't seem to be anything here.
If you find a broken link, feel free to send a pull request. You can also let us know at [Github](https://github.com/facebook/AsyncDisplayKit/issues) so that we can fix it.
If you find a broken link, feel free to send a pull request. You can also let us know at [Github](https://github.com/texturegroup/texture/issues) so that we can fix it.

View File

@@ -1,4 +1,4 @@
# AsyncDisplayKit Documentation
# Texture Documentation
We use [Jekyll](http://jekyllrb.com/) to build the site using Markdown and host it on [Github Pages](https://pages.github.com/).

View File

@@ -1,6 +1,6 @@
---
url: http://asyncdisplaykit.org
name: AsyncDisplayKit
url: http://texturegroup.org
name: Texture
relative_permalinks: false
markdown: kramdown
timezone: America/Los_Angeles

View File

@@ -8,4 +8,4 @@ nextPage: layer-backing.html
Accessibility works seamlessly in ways that even UIKit doesnt provide. When using the powerful optimization features of <a href = "layer-backing.html">Layer Backing</a> (`.layerBacked`) and <a href = "subtree-rasterization.html">Subtree Rasterization</a> (`.shouldRasterizeDescendants`), VoiceOver can access fine-grained metadata about each element. This is pretty amazing: `CALayer` doesnt support accessibility, and rasterization reduces everything to a single flat image.
The AsyncDisplayKit team fundamentally believes in Accessibility, and invested the time to create an innovative system to make this possible with zero developer effort. As a bonus, this also allows Automated UI Testing greater access to the interface.
The Texture team fundamentally believes in Accessibility, and invested the time to create an innovative system to make this possible with zero developer effort. As a bonus, this also allows Automated UI Testing greater access to the interface.

View File

@@ -25,7 +25,7 @@ Add the following to your podfile
<div class = "highlight-group">
<div class = "code">
<pre lang="objc" class="objcCode">
pod 'AsyncDisplayKit', '>= 2.0'
pod 'Texture', '>= 2.0'
</pre>
</div>
</div>
@@ -36,7 +36,7 @@ then run
<div class = "code">
<pre lang="objc" class="objcCode">
pod repo update
pod update AsyncDisplayKit
pod update Texture
</pre>
</div>
</div>
@@ -53,7 +53,7 @@ If your app fails to build instead of just showing the warnings, you might have
1. Disable deprecation warnings in the Xcode project settings
2. Disable warnings as errors in the project's build settings.
3. Disable deprecation warnings in ASDK. To do this, change `line 74` in `ASBaseDefines.h` to `# define ASDISPLAYNODE_WARN_DEPRECATED 0`
3. Disable deprecation warnings in Texture. To do this, change `line 74` in `ASBaseDefines.h` to `# define ASDISPLAYNODE_WARN_DEPRECATED 0`
Once your app builds and runs, test it to make sure everything is working normally. If you find any problems, try adopting the new API in that area and re-test.
@@ -71,7 +71,7 @@ A full API changelog from `1.9.92` to `2.0-beta.1` is available <a href="apidiff
#### ASDisplayNode Changes
- ASDisplayNode's `.usesImplicitHierarchyManagement` has been renamed to `.automaticallyManagesSubnodes`. The <a href = "http://asyncdisplaykit.org/docs/automatic-subnode-mgmt.html">Automatic Subnode Management</a> API has been moved out of Beta, but has a few documented [limitations]().
- ASDisplayNode's `.usesImplicitHierarchyManagement` has been renamed to `.automaticallyManagesSubnodes`. The <a href = "http://texturegroup.org/docs/automatic-subnode-mgmt.html">Automatic Subnode Management</a> API has been moved out of Beta, but has a few documented [limitations]().
- ASDisplayNode's `-cancelLayoutTransitionsInProgress` has been renamed to `-cancelLayoutTransition`. The <a href = "layout-transition-api.html">Layout Transition API</a> has been moved out of Beta. Significant new functionality is planed for future dot releases.
@@ -92,11 +92,11 @@ These new methods replace the following:
#### Collection / Table API Updates
AsyncDisplayKit's collection and table APIs have been moved from the view space (`collectionView`, `tableView`) to the node space (`collectionNode`, `tableNode`).
Texture's collection and table APIs have been moved from the view space (`collectionView`, `tableView`) to the node space (`collectionNode`, `tableNode`).
- Search your project for `tableView` and `collectionView`. Most, if not all, of the data source / delegate methods have new node versions.
It is important that developers using AsyncDisplayKit understand that an ASCollectionNode is backed by an ASCollectionView (a subclass of UICollectionView). ASCollectionNode runs asynchronously, so calling number -numberOfRowsInSection on the collectionNode is different than calling it on the collectionView.
It is important that developers using Texture understand that an ASCollectionNode is backed by an ASCollectionView (a subclass of UICollectionView). ASCollectionNode runs asynchronously, so calling number -numberOfRowsInSection on the collectionNode is different than calling it on the collectionView.
For example, let's say you have an empty table. You insert `100` rows and then immediately call -tableView:numberOfRowsInSection. This will return `0` rows. If you call -waitUntilAllUpdatesAreCommitted after insertion (waits until the collectionNode synchronizes with the collectionView), you will get 100, _but_ you might block the main thread. A good developer should rarely (or never) need to use -waitUntilAllUpdatesAreCommitted. If you update the collectionNode and then need to read back immediately, you should use the collectionNode API. You shouldn't need to talk to the collectionView.
@@ -134,7 +134,7 @@ Resources:
- [Video](https://youtu.be/yuDqvE5n_1g) of the ASCollectionNode Behind-the-Scenes talk at Pinterest. The <a href="/static/talks/10_3_2016_ASCollectionNode_Sequence_Diagrams.pdf">diagrams</a> seen in the talk.
- PR [#2390](https://github.com/facebook/AsyncDisplayKit/pull/2390) and PR [#2381](https://github.com/facebook/AsyncDisplayKit/pull/2381) show how we converted AsyncDisplayKit's [example projects](https://github.com/facebook/AsyncDisplayKit/tree/master/examples) to conform to this new API.
- PR [#2390](https://github.com/facebook/AsyncDisplayKit/pull/2390) and PR [#2381](https://github.com/facebook/AsyncDisplayKit/pull/2381) show how we converted AsyncDisplayKit's [example projects](https://github.com/texturegroup/texture/tree/master/examples) to conform to this new API.
#### Layout API Updates

View File

@@ -12,8 +12,8 @@ Any object that conforms to the `<ASEnvironment>` protocol can propagate specifi
Compared to UIKit, this system is very efficient and one of the reasons why nodes are much lighter weight than UIViews. This is achieved by using simple structures to store data rather than creating objects. For example, `UITraitCollection` is an object, but `ASEnvironmentTraitCollection` is just a struct.
This means that whenever a node needs to query something about its environment, for example to check its [interface state](http://asyncdisplaykit.org/docs/intelligent-preloading.html#interface-state-ranges), instead of climbing the entire tree or checking all of its children, it can go to one spot and read the value that was propogated to it.
This means that whenever a node needs to query something about its environment, for example to check its [interface state](http://texturegroup.org/docs/intelligent-preloading.html#interface-state-ranges), instead of climbing the entire tree or checking all of its children, it can go to one spot and read the value that was propogated to it.
A key operating principle of ASEnvironment is to update values when new subnodes are added or removed.
ASEnvironment powers many of the most valuable features of AsyncDisplayKit. **There is no public API available at this time.**
ASEnvironment powers many of the most valuable features of Texture. **There is no public API available at this time.**

View File

@@ -5,10 +5,10 @@ permalink: /docs/asrunloopqueue.html
prevPage: asenvironment.html
---
Even with main thread work, AsyncDisplayKit is able to dramatically reduce its impact on the user experience by way of the rather amazing ASRunLoopQueue.
Even with main thread work, Texture is able to dramatically reduce its impact on the user experience by way of the rather amazing ASRunLoopQueue.
`ASRunloopQueue` breaks up operations that must be performed on the main thread into far smaller chunks, easily 1/10th of the size that they otherwise would be, so that operation such as allocating UIViews or even destroying objects can be spread out and allow the run loops to more frequently turn. This more periodic turning allows the device to much more frequently check if a user touch has started or if an animation timer requires a new frame to be drawn, allowing far greater responsiveness even when the device is very busy and processing a large queue of main thread work.
It's a longer discussion why this kind of technique is extremely challenging to implement with `UIKit`, but it has to do with the fact that `AsyncDisplayKit` prepares content in advance, giving it a buffer of time where it can spread out the creation of these objects in tiny chunks. If it doesn't finish by the time it needs to be on screen, then it finishes the rest of what needs to be created in a single chunk. `UIKit` has no similar mechanisms to create things in advance, and there is always just one huge chunk as a view controller or cell needs to come on screen.
It's a longer discussion why this kind of technique is extremely challenging to implement with `UIKit`, but it has to do with the fact that `Texture` prepares content in advance, giving it a buffer of time where it can spread out the creation of these objects in tiny chunks. If it doesn't finish by the time it needs to be on screen, then it finishes the rest of what needs to be created in a single chunk. `UIKit` has no similar mechanisms to create things in advance, and there is always just one huge chunk as a view controller or cell needs to come on screen.
**ASRunLoopQueue is enabled by default when running AsyncDisplayKit.** A developer does not need to be aware of it's existence except to know that it helps reduce main thread blockage.
**ASRunLoopQueue is enabled by default when running Texture.** A developer does not need to be aware of it's existence except to know that it helps reduce main thread blockage.

View File

@@ -12,11 +12,11 @@ ASLayout is an automatic, asynchronous, purely Objective-C box model layout feat
`UIView` instances store position and size in their `center` and `bounds` properties. As constraints change, Core Animation performs a layout pass to call `layoutSubviews`, asking views to update these properties on their subviews.
`<ASLayoutable>` instances (all ASDisplayNodes and subclasses) do not have any size or position information. Instead, AsyncDisplayKit calls the `layoutSpecThatFits:` method with a given size constraint and the component must return a structure describing both its size, and the position and sizes of its children.
`<ASLayoutable>` instances (all ASDisplayNodes and subclasses) do not have any size or position information. Instead, Texture calls the `layoutSpecThatFits:` method with a given size constraint and the component must return a structure describing both its size, and the position and sizes of its children.
##Terminology
The terminology is a bit confusing, so here is a brief description of all of the ASDK automatic layout players:
The terminology is a bit confusing, so here is a brief description of all of the Texture automatic layout players:
Items that conform to the **\<ASLayoutable\> protocol** declares a method for measuring the layout of an object. A layout is defined by an ASLayout return value, and must specify 1) the size (but not position) of the layoutable object, and 2) the size and position of all of its immediate child objects. The tree recursion is driven by parents requesting layouts from their children in order to determine their size, followed by the parents setting the position of the children once the size is known.
@@ -24,7 +24,7 @@ This protocol also implements a "family" of layoutable protocols - the `AS{*}Lay
All ASDisplayNodes and subclasses as well as the `ASLayoutSpecs` conform to this protocol.
An **`ASLayoutSpec`** is an immutable object that describes a layout. Creation of a layout spec should only happen by a user in layoutSpecThatFits:. During that method, a layout spec can be created and mutated. Once it is passed back to ASDK, the isMutable flag will be set to NO and any further mutations will cause an assert.
An **`ASLayoutSpec`** is an immutable object that describes a layout. Creation of a layout spec should only happen by a user in layoutSpecThatFits:. During that method, a layout spec can be created and mutated. Once it is passed back to Texture, the isMutable flag will be set to NO and any further mutations will cause an assert.
Every ASLayoutSpec must act on at least one child. The ASLayoutSpec has the responsibility of holding on to the spec children. Some layout specs, like ASInsetLayoutSpec, only require a single child. Others, have multiple.

View File

@@ -6,7 +6,7 @@ prevPage: scroll-node.html
nextPage: layout-api-debugging.html
---
AsyncDisplayKit includes a library of `layoutSpec` components that can be composed to declaratively specify a layout.
Texture includes a library of `layoutSpec` components that can be composed to declaratively specify a layout.
The **child(ren) of a layoutSpec may be a node, a layoutSpec or a combination of the two types.** In the below image, an `ASStackLayoutSpec` (vertical) containing a text node and an image node, is wrapped in another `ASStackLayoutSpec` (horizontal) with another text node.
@@ -47,7 +47,7 @@ Both nodes and layoutSpecs conform to the `<ASLayoutable>` protocol. Any `ASLay
</tr>
<tr>
<td><b><code>ASLayoutSpec</code></b></td>
<td><p>Can be used as a spacer in a stack spec with other children, when <code>.flexGrow</code> and/or <code>.flexShrink</code> is applied.</p> <p><i>This class can also be subclassed to create custom layout specs - advanced ASDK only!</i></p></td>
<td><p>Can be used as a spacer in a stack spec with other children, when <code>.flexGrow</code> and/or <code>.flexShrink</code> is applied.</p> <p><i>This class can also be subclassed to create custom layout specs - advanced Texture only!</i></p></td>
</tr>
</table>
@@ -138,7 +138,7 @@ The following properties may be set on any node or `layoutSpec`s, but will only
### Providing Intrinsic Sizes for Leaf Nodes
AsyncDisplayKit's layout is recursive, starting at the layoutSpec returned from `layoutSpecThatFits:` and proceeding down until it reaches the leaf nodes included in any nested `layoutSpec`s.
Texture's layout is recursive, starting at the layoutSpec returned from `layoutSpecThatFits:` and proceeding down until it reaches the leaf nodes included in any nested `layoutSpec`s.
Some leaf nodes provide their own intrinsic size, such as `ASTextNode` or `ASImageNode`. An attributed string or an image have their own sizes. Other leaf nodes require an intrinsic size to be set.
@@ -187,6 +187,6 @@ An inset spec requires its object to have an intrinsic size. It adds the inset p
<img src="/static/images/overlay-vs-inset-spec.png">
### Best Practices
- AsyncDisplayKit layout is called on a background thread. Do not access the device screen bounds, or any other UIKit methods in `layoutSpecThatFits:`.
- Texture layout is called on a background thread. Do not access the device screen bounds, or any other UIKit methods in `layoutSpecThatFits:`.
- don't wrap everything in a staticLayoutSpec?
- avoid using preferred frame size for everything - won't respond nicely to device rotation or device sizing differences?

View File

@@ -6,7 +6,7 @@ prevPage: layout2-quickstart.html
nextPage: layout2-layoutspec-types.html
---
Check out the layout specs <a href="https://github.com/facebook/AsyncDisplayKit/tree/master/examples/LayoutSpecExamples">example project</a> to play around with the code below.
Check out the layout specs <a href="https://github.com/texturegroup/texture/tree/master/examples/LayoutSpecExamples">example project</a> to play around with the code below.
## Simple Header with Left and Right Justified Text
@@ -161,7 +161,7 @@ override func layoutSpecThatFits(_ constrainedSize: ASSizeRange) -> ASLayoutSpec
let absoluteSpec = ASAbsoluteLayoutSpec(children: [photoNode, iconNode])
// ASAbsoluteLayoutSpec's .sizing property recreates the behavior of ASDK Layout API 1.0's "ASStaticLayoutSpec"
// ASAbsoluteLayoutSpec's .sizing property recreates the behavior of Texture Layout API 1.0's "ASStaticLayoutSpec"
absoluteSpec.sizing = .sizeToFit
return absoluteSpec;

View File

@@ -92,7 +92,7 @@ Three examples in increasing order of complexity.
###Discussion
Get the full ASDK project at examples/ASDKgram.
Get the full Texture project at examples/ASDKgram.
#Social App Layout 2
@@ -201,4 +201,4 @@ Get the full ASDK project at examples/ASDKgram.
###Discussion
Get the full ASDK project at examples/CatDealsCollectionView.
Get the full Texture project at examples/CatDealsCollectionView.

View File

@@ -12,7 +12,7 @@ When enabled, ASM means that your nodes no longer require `addSubnode:` or `remo
### Example ###
<br>
Consider the following intialization method from the PhotoCellNode class in <a href="https://github.com/facebook/AsyncDisplayKit/tree/master/examples/ASDKgram">ASDKgram sample app</a>. This <code>ASCellNode</code> subclass produces a simple social media photo feed cell.
Consider the following intialization method from the PhotoCellNode class in <a href="https://github.com/texturegroup/texture/tree/master/examples/ASDKgram">ASDKgram sample app</a>. This <code>ASCellNode</code> subclass produces a simple social media photo feed cell.
In the "Original Code" we see the familiar `addSubnode:` calls in bold. In the "Code with ASM" these have been removed and replaced with a single line that enables ASM.
@@ -287,7 +287,7 @@ The `_userAvatarImageNode`, `_photoImageNode`, and `_photoCommentsNode` are adde
An appropriately constructed ASLayoutSpec will know which subnodes need to be added, removed or animated.
Try out the <a href="https://github.com/facebook/AsyncDisplayKit/tree/master/examples/ASDKgram">ASDKgram sample app</a> after looking at the code above, and you will see how simple it is to code an `ASCellNode` whose layout is responsive to numerous, individual data fetches and returns. While the `ASLayoutSpec` is coded in a way that leaves holes for the avatar and photo to populate, you can see how the cell's height will automatically adjust to accomodate the comments node at the bottom of the photo.
Try out the <a href="https://github.com/texturegroup/texture/tree/master/examples/ASDKgram">ASDKgram sample app</a> after looking at the code above, and you will see how simple it is to code an `ASCellNode` whose layout is responsive to numerous, individual data fetches and returns. While the `ASLayoutSpec` is coded in a way that leaves holes for the avatar and photo to populate, you can see how the cell's height will automatically adjust to accomodate the comments node at the bottom of the photo.
This is just a simple example, but this feature has many more powerful uses.

View File

@@ -6,7 +6,7 @@ prevPage: hit-test-slop.html
nextPage: automatic-subnode-mgmt.html
---
AsyncDisplayKit's Batch Fetching API makes it easy to add fetching chunks of new data. Usually this would be done in a `-scrollViewDidScroll:` method, but ASDK provides a more structured mechanism.
Texture's Batch Fetching API makes it easy to add fetching chunks of new data. Usually this would be done in a `-scrollViewDidScroll:` method, but Texture provides a more structured mechanism.
By default, as a user is scrolling, when they approach the point in the table or collection where they are 2 "screens" away from the end of the current content, the table will try to fetch more data.
@@ -140,12 +140,12 @@ func tableNode(tableNode: ASTableNode, willBeginBatchFetchWithContext context: A
</div>
</div>
Once you've finished fetching your data, it is very important to let ASDK know that you have finished the process. To do that, you need to call `-completeBatchFetching:` on the `context` object that was passed in with a parameter value of `YES`. This assures that the whole batch fetching mechanism stays in sync and the next batch fetching cycle can happen. Only by passing `YES` will the context know to attempt another batch update when necessary.
Once you've finished fetching your data, it is very important to let Texture know that you have finished the process. To do that, you need to call `-completeBatchFetching:` on the `context` object that was passed in with a parameter value of `YES`. This assures that the whole batch fetching mechanism stays in sync and the next batch fetching cycle can happen. Only by passing `YES` will the context know to attempt another batch update when necessary.
Check out the following sample apps to see the batch fetching API in action:
<ul>
<li><a href="https://github.com/facebook/AsyncDisplayKit/tree/master/examples/ASDKgram">ASDKgram</a></li>
<li><a href="https://github.com/facebook/AsyncDisplayKit/tree/master/examples/Kittens">Kittens</a></li>
<li><a href="https://github.com/facebook/AsyncDisplayKit/tree/master/examples/CatDealsCollectionView">CatDealsCollectionView</a></li>
<li><a href="https://github.com/facebook/AsyncDisplayKit/tree/master/examples/ASCollectionView">ASCollectionView</a></li>
<li><a href="https://github.com/texturegroup/texture/tree/master/examples/ASDKgram">ASDKgram</a></li>
<li><a href="https://github.com/texturegroup/texture/tree/master/examples/Kittens">Kittens</a></li>
<li><a href="https://github.com/texturegroup/texture/tree/master/examples/CatDealsCollectionView">CatDealsCollectionView</a></li>
<li><a href="https://github.com/texturegroup/texture/tree/master/examples/ASCollectionView">ASCollectionView</a></li>
</ul>

View File

@@ -6,11 +6,11 @@ prevPage: display-node.html
nextPage: button-node.html
---
`ASCellNode`, as you may have guessed, is the cell class of ASDK. Unlike the various cells in UIKit, `ASCellNode` can be used with `ASTableNodes`, `ASCollectionNodes` and `ASPagerNodes`, making it incredibly flexible.
`ASCellNode`, as you may have guessed, is the cell class of Texture. Unlike the various cells in UIKit, `ASCellNode` can be used with `ASTableNodes`, `ASCollectionNodes` and `ASPagerNodes`, making it incredibly flexible.
### 3 Ways to Party
There are three ways in which you can implement the cells you'll use in your ASDK app: subclassing `ASCellNode`, initializing with an existing `ASViewController` or using an existing UIView or `CALayer`.
There are three ways in which you can implement the cells you'll use in your Texture app: subclassing `ASCellNode`, initializing with an existing `ASViewController` or using an existing UIView or `CALayer`.
#### Subclassing
@@ -127,10 +127,10 @@ node.neverShowPlaceholders = true
</div>
</div>
With this property set to `YES`, the main thread will be blocked until display has completed for the cell. This is more similar to UIKit, and in fact makes AsyncDisplayKit scrolling visually indistinguishable from UIKit's, except being faster.
With this property set to `YES`, the main thread will be blocked until display has completed for the cell. This is more similar to UIKit, and in fact makes Texture scrolling visually indistinguishable from UIKit's, except being faster.
<div class = "note">
Using this option does not eliminate all of the performance advantages of AsyncDisplayKit. Normally, a cell has been preloading and is almost done when it reaches the screen, so the blocking time is very short. Even if the <code>rangeTuningParameters</code> are set to 0 this option outperforms UIKit. While the main thread is waiting, subnode display executes concurrently.
Using this option does not eliminate all of the performance advantages of Texture. Normally, a cell has been preloading and is almost done when it reaches the screen, so the blocking time is very short. Even if the <code>rangeTuningParameters</code> are set to 0 this option outperforms UIKit. While the main thread is waiting, subnode display executes concurrently.
</div>
### `UITableViewCell` specific propertys

View File

@@ -118,7 +118,7 @@ In the example above, you can see how the index is used to access the photo mode
### Replacing a UICollectionViewController with an ASViewController
AsyncDisplayKit does not offer an equivalent to UICollectionViewController. Instead, you can use the flexibility of ASViewController to recreate any type of UI<em>...</em>ViewController.
Texture does not offer an equivalent to UICollectionViewController. Instead, you can use the flexibility of ASViewController to recreate any type of UI<em>...</em>ViewController.
Consider, the following ASViewController subclass.
@@ -160,7 +160,7 @@ init() {
This works just as well with any node including as an ASTableNode, ASPagerNode, etc.
### Accessing the ASCollectionView
If you've used previous versions of ASDK, you'll notice that `ASCollectionView` has been removed in favor of `ASCollectionNode`.
If you've used previous versions of Texture, you'll notice that `ASCollectionView` has been removed in favor of `ASCollectionNode`.
<div class = "note">
`ASCollectionView`, an actual `UICollectionView` subclass, is still used internally by `ASCollectionNode`. While it should not be created directly, it can still be used directly by accessing the `.view` property of an `ASCollectionNode`.
@@ -208,15 +208,15 @@ Soon, there will be a method such as `ASTableNode`'s `-constrainedSizeForRow:` b
### Examples
The most detailed example of laying out the cells of an `ASCollectionNode` is the <a href = "https://github.com/facebook/AsyncDisplayKit/tree/master/examples/CustomCollectionView">CustomCollectionView</a> app. It includes a Pinterest style cell layout using an `ASCollectionNode` and a custom `UICollectionViewLayout`.
The most detailed example of laying out the cells of an `ASCollectionNode` is the <a href = "https://github.com/texturegroup/texture/tree/master/examples/CustomCollectionView">CustomCollectionView</a> app. It includes a Pinterest style cell layout using an `ASCollectionNode` and a custom `UICollectionViewLayout`.
#### More Sample Apps with ASCollectionNodes
<ul>
<li><a href="https://github.com/facebook/AsyncDisplayKit/tree/master/examples/ASDKgram">ASDKgram</a></li>
<li><a href="https://github.com/facebook/AsyncDisplayKit/tree/master/examples/CatDealsCollectionView">CatDealsCollectionView</a></li>
<li><a href="https://github.com/facebook/AsyncDisplayKit/tree/master/examples/ASCollectionView">ASCollectionView</a></li>
<li><a href = "https://github.com/facebook/AsyncDisplayKit/tree/master/examples/CustomCollectionView">CustomCollectionView</a></li>
<li><a href="https://github.com/texturegroup/texture/tree/master/examples/ASDKgram">ASDKgram</a></li>
<li><a href="https://github.com/texturegroup/texture/tree/master/examples/CatDealsCollectionView">CatDealsCollectionView</a></li>
<li><a href="https://github.com/texturegroup/texture/tree/master/examples/ASCollectionView">ASCollectionView</a></li>
<li><a href = "https://github.com/texturegroup/texture/tree/master/examples/CustomCollectionView">CustomCollectionView</a></li>
</ul>
### Interoperability with UICollectionViewCells

View File

@@ -10,13 +10,13 @@ nextPage: containers-astablenode.html
To use this feature, you will need to import "ASNodeController+Beta.h"
</div>
The ASDK team has many exciting ideas for expanding `ASNodeController`. Follow along [here](https://github.com/facebook/AsyncDisplayKit/issues/2964) if you'd like to participate in shaping the future of node controllers.
The Texture team has many exciting ideas for expanding `ASNodeController`. Follow along [here](https://github.com/facebook/AsyncDisplayKit/issues/2964) if you'd like to participate in shaping the future of node controllers.
For now, `ASNodeController` remains a simple, but powerful class.
### Example
The [example project](https://github.com/facebook/AsyncDisplayKit/pull/2945) attached in the initial PR modifies the normal [ASDKgram](https://github.com/facebook/AsyncDisplayKit/tree/master/examples/ASDKgram) project to use an `ASNodeController`.
The [example project](https://github.com/texturegroup/texture/pull/2945) attached in the initial PR modifies the normal [ASDKgram](https://github.com/texturegroup/texture/tree/master/examples/ASDKgram) project to use an `ASNodeController`.
This `PhotoCellNodeController` is used to manage the fetching of the comments data for a photo in a photo feed, once the photo enters the preload range. This node controller allows us to separate the preloading logic from where it previously existed in the `PhotoCellNode` "view" class.
To convert ASDKgram to use an `ASNodeController`, we first create a `PhotoCellNodeController` class.
@@ -106,7 +106,7 @@ Next, we add a mutable array to the `PhotoFeedNodeController` to store our node
self = [super initWithNode:_tableNode];
if (self) {
self.navigationItem.title = @"ASDK";
self.navigationItem.title = @"Texture";
[self.navigationController setNavigationBarHidden:YES];
_tableNode.dataSource = self;
@@ -129,7 +129,7 @@ final class PhotoFeedNodeController: PhotoFeedBaseController {
init() {
super.init(node: tableNode)
navigationItem.title = "ASDK"
navigationItem.title = "Texture"
navigationController.isNavigationBarHidden = true
tableNode.dataSource = self

View File

@@ -155,12 +155,12 @@ To resolve the error message add `[self.pagerNode waitUntilAllUpdatesAreCommitte
Unfortunately the disadvantage of this is that the first measurement pass will block the main thread until it finishes.
#### Some more details about the error messages above
The reason for this error message is that due to the asynchronous nature of AsyncDisplayKit, measurement of nodes will happen on a background thread as UIKit will resize the view of the `ASViewController` on on the main thread. The new layout pass has to wait until the old layout pass finishes with an old layout constrained size. Unfortunately while the measurement pass with the old constrained size is still in progress the `ASPagerFlowLayout` that is backing a `ASPagerNode` will print some errors in the console as it expects sizes for nodes already measured with the new constrained size.
The reason for this error message is that due to the asynchronous nature of Texture, measurement of nodes will happen on a background thread as UIKit will resize the view of the `ASViewController` on on the main thread. The new layout pass has to wait until the old layout pass finishes with an old layout constrained size. Unfortunately while the measurement pass with the old constrained size is still in progress the `ASPagerFlowLayout` that is backing a `ASPagerNode` will print some errors in the console as it expects sizes for nodes already measured with the new constrained size.
### Sample Apps
Check out the following sample apps to see an `ASPagerNode` in action:
<ul>
<li><a href="https://github.com/facebook/AsyncDisplayKit/tree/master/examples/PagerNode">PagerNode</a></li>
<li><a href="https://github.com/facebook/AsyncDisplayKit/tree/master/examples/VerticalWithinHorizontalScrolling">VerticalWithinHorizontalScrolling</a></li>
<li><a href="https://github.com/texturegroup/texture/tree/master/examples/PagerNode">PagerNode</a></li>
<li><a href="https://github.com/texturegroup/texture/tree/master/examples/VerticalWithinHorizontalScrolling">VerticalWithinHorizontalScrolling</a></li>
</ul>

View File

@@ -76,9 +76,9 @@ Note that neither of these methods require a reuse mechanism.
### Replacing UITableViewController with ASViewController
AsyncDisplayKit does not offer an equivalent to `UITableViewController`. Instead, use an `ASViewController` initialized with an `ASTableNode`.
Texture does not offer an equivalent to `UITableViewController`. Instead, use an `ASViewController` initialized with an `ASTableNode`.
Consider, again, the `ASViewController` subclass - PhotoFeedNodeController - from the <a href="https://github.com/facebook/AsyncDisplayKit/tree/master/examples/ASDKgram">`ASDKgram sample app`</a> that uses a table node as its managed node.
Consider, again, the `ASViewController` subclass - PhotoFeedNodeController - from the <a href="https://github.com/texturegroup/texture/tree/master/examples/ASDKgram">`ASDKgram sample app`</a> that uses a table node as its managed node.
An `ASTableNode` is assigned to be managed by an `ASViewController` in its `-initWithNode:` designated initializer method.
@@ -120,7 +120,7 @@ init(models: [Model]) {
It is very important that node blocks be thread-safe. One aspect of that is ensuring that the data model is accessed _outside_ of the node block. Therefore, it is unlikely that you should need to use the index inside of the block.
Consider the following `-tableNode:nodeBlockForRowAtIndexPath:` method from the `PhotoFeedNodeController.m` file in the <a href="https://github.com/facebook/AsyncDisplayKit/tree/master/examples/ASDKgram">ASDKgram sample app</a>.
Consider the following `-tableNode:nodeBlockForRowAtIndexPath:` method from the `PhotoFeedNodeController.m` file in the <a href="https://github.com/texturegroup/texture/tree/master/examples/ASDKgram">ASDKgram sample app</a>.
<div class = "highlight-group">
<span class="language-toggle"><a data-lang="swift" class="swiftButton">Swift</a><a data-lang="objective-c" class = "active objcButton">Objective-C</a></span>
@@ -164,7 +164,7 @@ In the example above, you can see how the index is used to access the photo mode
### Accessing the ASTableView
If you've used previous versions of ASDK, you'll notice that `ASTableView` has been removed in favor of `ASTableNode`.
If you've used previous versions of Texture, you'll notice that `ASTableView` has been removed in favor of `ASTableNode`.
<div class = "note">
<code>ASTableView</code>, an actual <code>UITableView</code> subclass, is still used internally by <code>ASTableNode</code>. While it should not be created directly, it can still be used directly by accessing the <code>.view</code> property of an <code>ASTableNode</code>.
@@ -216,13 +216,13 @@ This is all to say, a `tableNode`'s cells will always fill the full width of the
If you call `-setNeedsLayout` on an `ASCellNode`, it will automatically perform another layout pass and if its overall desired size has changed, the table will be informed and will update itself.
This is different from `UIKit` where normally you would have to call reload row / item. This saves tons of code, check out the <a href="https://github.com/facebook/AsyncDisplayKit/tree/master/examples/ASDKgram">ASDKgram sample app</a> to see side by side implementations of an `UITableView` and `ASTableNode` implemented social media feed.
This is different from `UIKit` where normally you would have to call reload row / item. This saves tons of code, check out the <a href="https://github.com/texturegroup/texture/tree/master/examples/ASDKgram">ASDKgram sample app</a> to see side by side implementations of an `UITableView` and `ASTableNode` implemented social media feed.
### Sample Apps using ASTableNode
<ul>
<li><a href="https://github.com/facebook/AsyncDisplayKit/tree/master/examples/ASDKgram">ASDKgram</a></li>
<li><a href="https://github.com/facebook/AsyncDisplayKit/tree/master/examples/Kittens">Kittens</a></li>
<li><a href="https://github.com/facebook/AsyncDisplayKit/tree/master/examples/HorizontalWithinVerticalScrolling">HorizontalWithinVerticalScrolling</a></li>
<li><a href="https://github.com/facebook/AsyncDisplayKit/tree/master/examples/VerticalWithinHorizontalScrolling">VerticalWithinHorizontalScrolling</a></li>
<li><a href="https://github.com/facebook/AsyncDisplayKit/tree/master/examples/SocialAppLayout">SocialAppLayout</a></li>
<li><a href="https://github.com/texturegroup/texture/tree/master/examples/ASDKgram">ASDKgram</a></li>
<li><a href="https://github.com/texturegroup/texture/tree/master/examples/Kittens">Kittens</a></li>
<li><a href="https://github.com/texturegroup/texture/tree/master/examples/HorizontalWithinVerticalScrolling">HorizontalWithinVerticalScrolling</a></li>
<li><a href="https://github.com/texturegroup/texture/tree/master/examples/VerticalWithinHorizontalScrolling">VerticalWithinHorizontalScrolling</a></li>
<li><a href="https://github.com/texturegroup/texture/tree/master/examples/SocialAppLayout">SocialAppLayout</a></li>
</ul>

View File

@@ -22,7 +22,7 @@ More features will be added over time, so it is a good idea to base your view co
A `UIViewController` provides a view of its own. An `ASViewController` is assigned a node to manage in its designated initializer `-initWithNode:`.
Consider the following `ASViewController` subclass, `PhotoFeedNodeController`, from the <a href="https://github.com/facebook/AsyncDisplayKit/tree/master/examples/ASDKgram">ASDKgram example project</a> that would like to use a table node as its managed node.
Consider the following `ASViewController` subclass, `PhotoFeedNodeController`, from the <a href="https://github.com/texturegroup/texture/tree/master/examples/ASDKgram">ASDKgram example project</a> that would like to use a table node as its managed node.
This table node is assigned to the `ASViewController` in its `-initWithNode:` designated initializer method.

View File

@@ -7,11 +7,11 @@ nextPage: node-overview.html
---
### Use Nodes in Node Containers
It is highly recommended that you use AsyncDisplayKit's nodes within a node container. AsyncDisplayKit offers the following node containers.
It is highly recommended that you use Texture's nodes within a node container. Texture offers the following node containers.
<table style="width:100%" class = "paddingBetweenCols">
<tr>
<th>ASDK Node Container</th>
<th>Texture Node Container</th>
<th>UIKit Equivalent</th>
</tr>
<tr>
@@ -43,10 +43,10 @@ It is highly recommended that you use AsyncDisplayKit's nodes within a node cont
<br>
Example code and specific sample projects are highlighted in the documentation for each node container.
<!-- For a detailed description on porting an existing UIKit app to AsyncDisplayKit, read the <a href = "porting-guide.html">porting guide</a>. -->
<!-- For a detailed description on porting an existing UIKit app to Texture, read the <a href = "porting-guide.html">porting guide</a>. -->
### What do I Gain by Using a Node Container?
A node container automatically manages the <a href = "intelligent-preloading.html">intelligent preloading</a> of its nodes. This means that all of the node's layout measurement, data fetching, decoding and rendering will be done asynchronously. Among other conveniences, this is why it is recommended to use nodes within a container node.
Note that while it _is_ possible to use nodes directly (without an AsyncDisplayKit node container), unless you add additional calls, they will only start displaying once they come onscreen (as UIKit does). This can lead to performance degredation and flashing of content.
Note that while it _is_ possible to use nodes directly (without an Texture node container), unless you add additional calls, they will only start displaying once they come onscreen (as UIKit does). This can lead to performance degredation and flashing of content.

View File

@@ -6,7 +6,7 @@ prevPage: map-node.html
nextPage: scroll-node.html
---
`ASControlNode` is the ASDK equivalent to `UIControl`. You don't create instances of `ASControlNode` directly. Instead, you can use it as a subclassing point when creating controls of your own. In fact, <a href = "/docs/text-node.html">ASTextNode</a>, <a href = "/docs/image-node.html">ASImageNode</a>, <a href = "/docs/video-node.html">ASVideoNode</a> and <a href = "/docs/map-node.html">ASMapNode</a> are all subclasses of `ASControlNode`.
`ASControlNode` is the Texture equivalent to `UIControl`. You don't create instances of `ASControlNode` directly. Instead, you can use it as a subclassing point when creating controls of your own. In fact, <a href = "/docs/text-node.html">ASTextNode</a>, <a href = "/docs/image-node.html">ASImageNode</a>, <a href = "/docs/video-node.html">ASVideoNode</a> and <a href = "/docs/map-node.html">ASMapNode</a> are all subclasses of `ASControlNode`.
This fact is especially useful when it comes to image and text nodes. Having the ability to add target-action pairs means that you can use any text or image node as a button without having to rely on creating gesture recognizers, as you would with text in UIKit, or creating extraneous views as you might when using `UIButton`.

View File

@@ -12,7 +12,7 @@ When it comes to corner rounding, many developers stick with CALayer's `.cornerR
<li>why you shouldnt use CALayers .cornerRadius</li>
<li>more performant corner rounding options and when to use them</li>
<li><a href = "corner-rounding.html#corner-rounding-strategy-flowchart">a flow chart for choosing your ideal corner rounding strategy</a></li>
<li>AsyncDisplayKit corner rounding methods</li>
<li>Texture corner rounding methods</li>
</ul>
## CALayer's .cornerRadius is Expensive
@@ -61,10 +61,10 @@ The second method involves using bezier paths with **precomposited alpha corners
A key limitation of precomposited corners is that the corners must only touch one node and not intersect with any subnodes. If either of these conditions exist, clip corners must be used.
Note that AsyncDisplayKit nodes have a special optimization of `.cornerRadius` that automatically implements precomposited corners **only when using** `.shouldRasterizeDescendants`. It's important to think carefully before you enable rasterization, so don't use this option without first reading all about the <a href = "subtree-rasterization.html">concept</a>.
Note that Texture nodes have a special optimization of `.cornerRadius` that automatically implements precomposited corners **only when using** `.shouldRasterizeDescendants`. It's important to think carefully before you enable rasterization, so don't use this option without first reading all about the <a href = "subtree-rasterization.html">concept</a>.
<div class = "note">
If you're looking for a simple, flat-color rounded rectangle or circle, AsyncDisplayKit offers a variety of conveniences to provide this. See `UIImage+ASConveniences.h` for methods to create flat-colored, rounded-corner resizable images using precomposited corners (both alpha and opaque are supported). These are great for use as placeholders for image nodes or backgrounds for ASButtonNode. <b>More precomposited corner methods will be released with AsyncDisplayKit 2.0 release</b>.
If you're looking for a simple, flat-color rounded rectangle or circle, Texture offers a variety of conveniences to provide this. See `UIImage+ASConveniences.h` for methods to create flat-colored, rounded-corner resizable images using precomposited corners (both alpha and opaque are supported). These are great for use as placeholders for image nodes or backgrounds for ASButtonNode. <b>More precomposited corner methods will be released with Texture 2.0 release</b>.
</div>
### Clip Corner
@@ -81,7 +81,7 @@ Clip corners applies to two main types of corner rounding situations:
</ul>
<div class = "note">
<b>Check back soon! Clip corner methods may be released in AsyncDisplayKit 2.0 release</b>.
<b>Check back soon! Clip corner methods may be released in Texture 2.0 release</b>.
</div>
## Is it ever okay to use CALayer's .cornerRadius property?
@@ -94,7 +94,7 @@ It is much less bad, and okay as a shortcut, to use `.cornerRadius.` for screens
Some people have suggested that using CALayer's `.shouldRasterize` can improve the performance of the `.cornerRadius` property. This is not well understood option that is generally perilous. As long as nothing causes it to re-rasterize (no movement, no tap to change color, not on a table view that moves, etc), it is okay to use. Generally we don't encourage this because it is very easy to cause much worse performance. For people who have not great app architecture and insist on using CALayer's `.cornerRadius` (e.g. their app is not very performant), this _can_ make a meaningful difference. However, if you are building your app from the ground up, we highly reccommend that you choose one of the better corner rounding strategies above.
CALayer's `.shouldRasterize` is unrelated to AsyncDisplayKit `node.shouldRasterizeDescendents`. When enabled, `.shouldRasterizeDescendents` will prevent the actual view and layer of the subnode children from being created.
CALayer's `.shouldRasterize` is unrelated to Texture `node.shouldRasterizeDescendents`. When enabled, `.shouldRasterizeDescendents` will prevent the actual view and layer of the subnode children from being created.
## Corner Rounding Strategy Flowchart

View File

@@ -16,9 +16,9 @@ This debug feature adds a semi-transparent subview in the bottom right hand corn
- The white debug label above the RangeController bar displays the RangeController dataSources class name to differentiate between nested views.
- The overlay can be moved with a panning gesture in order to see content under it.
This debug feature is useful for highly optimized ASDK apps that require tuning of any ASRangeController. Or for anyone who is curious about how ASRangeControllers work.
This debug feature is useful for highly optimized Texture apps that require tuning of any ASRangeController. Or for anyone who is curious about how ASRangeControllers work.
The <a href="https://github.com/facebook/AsyncDisplayKit/tree/master/examples/VerticalWithinHorizontalScrolling">VerticalWithinHorizontal example app</a> contains an ASPagerNode with embedded ASTableViews. In the screenshot with this feature enabled, you can see the two range controllers - ASTableView and ASCollectionView (ASPagerNode) - in the overlay.
The <a href="https://github.com/texturegroup/texture/tree/master/examples/VerticalWithinHorizontalScrolling">VerticalWithinHorizontal example app</a> contains an ASPagerNode with embedded ASTableViews. In the screenshot with this feature enabled, you can see the two range controllers - ASTableView and ASCollectionView (ASPagerNode) - in the overlay.
- The white arrows to the right of the rangeController bars indicate that the user is currently scrolling down through the table and right through the ASCollectionView/PagerNode.
- The ASTableView rangeController bar indicates that the range parameters are tuned to both fetch and decode more data in the downward table direction rather than in the reverse direction (which makes sense as the user is scrolling down).

View File

@@ -26,8 +26,8 @@ nextPage: containers-asviewcontroller.html
### Common Questions
<ul>
<li><a href = "faq.html#calayer-s-cornerradius-property-kills-performance">If you care about performance, do not use <code>CALayer</code>'s <code>.cornerRadius</code> property (or shadowPath, border or mask).</a></li>
<li><a href = "faq.html#asyncdisplaykit-does-not-support-uikit-auto-layout-or-interfacebuilder">ASDK does not support UIKit Auto Layout.</a></li>
<li><a href = "faq.html#uicollectionviewcell-compatibility">Can I use my <code>UICollectionViewCells</code> with ASDK?.</a></li>
<li><a href = "faq.html#asyncdisplaykit-does-not-support-uikit-auto-layout-or-interfacebuilder">Texture does not support UIKit Auto Layout.</a></li>
<li><a href = "faq.html#uicollectionviewcell-compatibility">Can I use my <code>UICollectionViewCells</code> with Texture?.</a></li>
<li><a href = "faq.html#asdisplaynode-keep-alive-reference"><code>ASDisplayNode</code> keep alive reference.</a></li>
</ul>
@@ -59,7 +59,7 @@ Although the block is destroyed after the view is created, in the event that the
### ASCellNode Reusability
<br>
AsyncDisplayKit does not use cell reuse, for a number of specific reasons, one side effect of this is that it eliminates the large class of bugs associated with cell reuse.
Texture does not use cell reuse, for a number of specific reasons, one side effect of this is that it eliminates the large class of bugs associated with cell reuse.
<br>
### LayoutSpecs Are Regenerated
@@ -81,11 +81,11 @@ Using `.cornerRadius` will visually degraded performance on iPhone 4, 4S, and 5
For a longer discussion and easy alternative corner rounding solutions, please read our comprehensive <a href = "corner-rounding.html">corner rounding guide</a>.
<br>
### AsyncDisplayKit does not support UIKit Auto Layout or InterfaceBuilder
### Texture does not support UIKit Auto Layout or InterfaceBuilder
<br>
UIKit Auto Layout and InterfaceBuilder are not supported by AsyncDisplayKit. It is worth noting that both of these technologies are not permitted in established and disciplined iOS development teams, such as at Facebook, Instagram, and Pinterest.
UIKit Auto Layout and InterfaceBuilder are not supported by Texture. It is worth noting that both of these technologies are not permitted in established and disciplined iOS development teams, such as at Facebook, Instagram, and Pinterest.
However, AsyncDisplayKit's <a href = "automatic-layout-basics.html">Layout API</a> provides a variety of <a href = "automatic-layout-containers.html">ASLayoutSpec objects</a> that allow implementing automatic layout which is more efficient (multithreaded, off the main thread), easier to debug (can step into the code and see where all values come from, as it is open source), and reusable (you can build composable layouts that can be shared with different parts of the UI).
However, Texture's <a href = "automatic-layout-basics.html">Layout API</a> provides a variety of <a href = "automatic-layout-containers.html">ASLayoutSpec objects</a> that allow implementing automatic layout which is more efficient (multithreaded, off the main thread), easier to debug (can step into the code and see where all values come from, as it is open source), and reusable (you can build composable layouts that can be shared with different parts of the UI).
<br>
### ASDisplayNode keep alive reference
@@ -118,7 +118,7 @@ Good application design should not rely on this behavior, because a strong refer
### UICollectionViewCell Compatibility
ASDK supports using <code>UICollectionViewCells</code> alongside native <code>ASCellNodes</code>.
Texture supports using <code>UICollectionViewCells</code> alongside native <code>ASCellNodes</code>.
Note that these UIKit cells will **not** have the performance benefits of `ASCellNodes` (like preloading, async layout, and async drawing), even when mixed within the same `ASCollectionNode`.

View File

@@ -5,7 +5,7 @@ permalink: /docs/getting-started.html
nextPage: resources.html
---
AsyncDisplayKit's basic unit is the `node`. `ASDisplayNode` is an abstraction
Texture's basic unit is the `node`. `ASDisplayNode` is an abstraction
over `UIView`, which in turn is an abstraction over `CALayer`. Unlike views, which
can only be used on the main thread, nodes are thread-safe: you can
instantiate and configure entire hierarchies of them in parallel on background
@@ -17,9 +17,9 @@ has one-sixtieth of a second to push each frame. That's 16 milliseconds to
execute all layout and drawing code! And because of system overhead, your code
usually has less than ten milliseconds to run before it causes a frame drop.
AsyncDisplayKit lets you move image decoding, text sizing and rendering, and
Texture lets you move image decoding, text sizing and rendering, and
other expensive UI operations off the main thread, to keep the main thread available to
respond to user interaction. AsyncDisplayKit has other tricks up its
respond to user interaction. Texture has other tricks up its
sleeve too... but we'll get to that later.
<h2><a href = "node-overview.html">Nodes</a></h2>
@@ -28,26 +28,26 @@ If you're used to working with views, you already know how to use nodes. Most m
Of course, you can always access the underlying view or layer directly via `node.view` or `node.layer`, just make sure to do it on the main thread!
AsyncDisplayKit offers a <a href = "node-overview.html">variety of nodes</a> to replace the majority of the UIKit components that you are used to. Large scale apps have been able to completely write their UI using just AsyncDisplayKit nodes.
Texture offers a <a href = "node-overview.html">variety of nodes</a> to replace the majority of the UIKit components that you are used to. Large scale apps have been able to completely write their UI using just Texture nodes.
<h2><a href = "containers-overview.html">Node Containers</a></h2>
When converting an app to use AsyncDisplayKit, a common mistake is to add nodes directly to an existing view hierarchy. Doing this will virtually guarantee that your nodes will flash as they are rendered.
When converting an app to use Texture, a common mistake is to add nodes directly to an existing view hierarchy. Doing this will virtually guarantee that your nodes will flash as they are rendered.
Instead, you should add nodes as subnodes of one of the many <a href = "containers-overview.html">node container classes</a>. These containers are in charge of telling contained nodes what state they're currently in so that data can be loaded and nodes can be rendered as efficiently as possible. You should think of these classes as the integration point between UIKit and ASDK.
Instead, you should add nodes as subnodes of one of the many <a href = "containers-overview.html">node container classes</a>. These containers are in charge of telling contained nodes what state they're currently in so that data can be loaded and nodes can be rendered as efficiently as possible. You should think of these classes as the integration point between UIKit and Texture.
<h2><a href = "/docs/layout-engine.html">Layout Engine</a></h2>
AsyncDisplayKit's layout engine is both one of its most powerful and one of its most unique features. Based on the CSS FlexBox model, it provides a declarative way of specifying a custom node's size and layout of its subnodes. While all nodes are concurrently rendered by default, asynchronous measurement and layout are performed by providing an `ASLayoutSpec` for each node.
Texture's layout engine is both one of its most powerful and one of its most unique features. Based on the CSS FlexBox model, it provides a declarative way of specifying a custom node's size and layout of its subnodes. While all nodes are concurrently rendered by default, asynchronous measurement and layout are performed by providing an `ASLayoutSpec` for each node.
<h2><a href = "/docs/layout-engine.html">Advanced Developer Features</a></h2>
AsyncDisplayKit offers a variety of advanced developer features that cannot be found in UIKit or Foundation. Our developers have found that AsyncDisplyKit allows simplifications in their architecture and improves developer velocity.
Texture offers a variety of advanced developer features that cannot be found in UIKit or Foundation. Our developers have found that AsyncDisplyKit allows simplifications in their architecture and improves developer velocity.
(Full list coming soon!)
<h2><a href = "/docs/layout-engine.html">Adding AsyncDisplayKit to your App</a></h2>
<h2><a href = "/docs/layout-engine.html">Adding Texture to your App</a></h2>
If you are new to AsyncDisplayKit, we recommend that you check out our ASDKgram example app. We've created a handy guide (coming soon!) with step-by-step directions and a follow along example on how to add AsyncDisplayKit to an app.
If you are new to Texture, we recommend that you check out our ASDKgram example app. We've created a handy guide (coming soon!) with step-by-step directions and a follow along example on how to add Texture to an app.
If you run into any problems along the way, reach out to us GitHub or the AsyncDisplayKit <a href = "/docs/resources.html#slack">Slack community</a> for help.
If you run into any problems along the way, reach out to us GitHub or the Texture <a href = "/docs/resources.html#slack">Slack community</a> for help.

View File

@@ -8,7 +8,7 @@ nextPage: batch-fetching-api.html
`ASDisplayNode` has a `hitTestSlop` property of type `UIEdgeInsets` that when set to a non-zero inset, increase the bounds for hit testing to make it easier to tap or perform gestures on this node.
ASDisplayNode is the base class for all nodes, so this property is available on any of AsyncDisplayKit's nodes.
ASDisplayNode is the base class for all nodes, so this property is available on any of Texture's nodes.
<div class = "note">
<strong>Note:</strong> This affects the default implementation of <code>-hitTest</code> and <code>-pointInside</code>, so subclasses should call super if you override it and want hitTestSlop applied.

View File

@@ -6,7 +6,7 @@ prevPage: text-node.html
nextPage: network-image-node.html
---
`ASImageNode` is the ASDK equivalent to `UIImageView`. The most basic difference is that images are decoded asynchronously by default. Of course, there are more advanced improvments as well such as GIF support and `imageModificationBlock`s.
`ASImageNode` is the Texture equivalent to `UIImageView`. The most basic difference is that images are decoded asynchronously by default. Of course, there are more advanced improvments as well such as GIF support and `imageModificationBlock`s.
### Basic Usage

View File

@@ -6,7 +6,7 @@ prevPage: resources.html
nextPage: adoption-guide-2-0-beta1.html
---
AsyncDisplayKit may be added to your project via CocoaPods or Carthage. Do not forget to import the framework header:
Texture may be added to your project via CocoaPods or Carthage. Do not forget to import the framework header:
<div class = "highlight-group">
<div class = "code">
@@ -16,17 +16,17 @@ AsyncDisplayKit may be added to your project via CocoaPods or Carthage. Do not f
</div>
</div>
or create a <a href="https://developer.apple.com/library/ios/documentation/swift/conceptual/buildingcocoaapps/MixandMatch.html">Objective-C bridging header</a> (Swift). If you have any problems installing AsyncDisplayKit, please contact us on Github or <a href = "/slack.html">Slack</a>!
or create a <a href="https://developer.apple.com/library/ios/documentation/swift/conceptual/buildingcocoaapps/MixandMatch.html">Objective-C bridging header</a> (Swift). If you have any problems installing Texture, please contact us on Github or <a href = "/slack.html">Slack</a>!
## CocoaPods
AsyncDisplayKit is available on <a href="https://cocoapods.org/pods/AsyncDisplayKit">CocoaPods</a>. Add the following to your Podfile:
Texture is available on <a href="https://cocoapods.org/pods/Texture">CocoaPods</a>. Add the following to your Podfile:
<div class = "highlight-group">
<div class = "code">
<pre lang="objc" class="objcCode">
target 'MyApp' do
pod "AsyncDisplayKit"
pod "Texture"
end
</pre>
</div>
@@ -44,12 +44,12 @@ Quit Xcode completely before running
in the project directory in Terminal.
To update your version of AsyncDisplayKit, run
To update your version of Texture, run
<div class = "highlight-group">
<div class = "code">
<pre lang="objc" class="objcCode">
> pod update AsyncDisplayKit
> pod update Texture
</pre>
</div>
</div>
@@ -64,14 +64,14 @@ Don't forget to use the workspace `.xcworkspace` file, _not_ the project `.xcode
The standard way to use Carthage is to have a Cartfile list the dependencies, and then run `carthage update` to download the dependenices into the `Cathage/Checkouts` folder and build each of those into frameworks located in the `Carthage/Build` folder, and finally the developer has to manually integrate in the project.
</div>
AsyncDisplayKit is also available through <a href="https://github.com/Carthage/Carthage">Carthage</a>.
Texture is also available through <a href="https://github.com/Carthage/Carthage">Carthage</a>.
Add the following to your Cartfile to get the **latest release** branch:
<div class = "highlight-group">
<div class = "code">
<pre lang="objc" class="objcCode">
github "facebook/AsyncDisplayKit"
github "texturegroup/texture"
</pre>
</div>
</div>
@@ -82,13 +82,13 @@ Or, to get the **master** branch:
<div class = "highlight-group">
<div class = "code">
<pre lang="objc" class="objcCode">
github "facebook/AsyncDisplayKit" "master"
github "facetexturegroup/textureaster"
</pre>
</div>
</div>
<br>
AsyncDisplayKit has its own Cartfile which lists its dependencies, so this is the only line you will need to include in your Cartfile.
Texture has its own Cartfile which lists its dependencies, so this is the only line you will need to include in your Cartfile.
Run
@@ -103,12 +103,12 @@ Run
<br>
in Terminal. This will fetch dependencies into a `Carthage/Checkouts` folder, then build each one.
Look for terminal output confirming `AsyncDisplayKit`, `PINRemoteImage (3.0.0-beta.2)` and `PINCache` are all fetched and built. The ASDK framework Cartfile should handle the dependencies correctly.
Look for terminal output confirming `Texture`, `PINRemoteImage (3.0.0-beta.2)` and `PINCache` are all fetched and built. The Texture framework Cartfile should handle the dependencies correctly.
In Xcode, on your application targets **“General”** settings tab, in the **“Linked Frameworks and Libraries”** section, drag and drop each framework you want to use from the `Carthage/Build` folder on disk.
## Carthage (light)
AsyncDisplayKit does not yet support the lighter way of using Carthage, in which you manually add the project files. This is because one of its dependencies, `PINCache` (a nested dependency of `PINRemoteImage`) does not yet have a project file.
Texture does not yet support the lighter way of using Carthage, in which you manually add the project files. This is because one of its dependencies, `PINCache` (a nested dependency of `PINRemoteImage`) does not yet have a project file.
Without including `PINRemoteImage` and `PINCache`, you will not get AsyncDisplayKit's full image feature set.
Without including `PINRemoteImage` and `PINCache`, you will not get Texture's full image feature set.

View File

@@ -6,7 +6,7 @@ prevPage: upgrading.html
nextPage: containers-overview.html
---
While a node's ability to be rendered and measured asynchronously and concurrently makes it quite powerful, another crucially important layer to ASDK is the idea of intelligent preloading.
While a node's ability to be rendered and measured asynchronously and concurrently makes it quite powerful, another crucially important layer to Texture is the idea of intelligent preloading.
As was pointed out in <a href = "getting-started.html">Getting Started</a>, it is rarely advantageous to use a node outside of the context of one of the node containers. This is due to the fact that all nodes have a notion of their current interface state.

View File

@@ -6,7 +6,7 @@ prevPage: automatic-subnode-mgmt.html
nextPage: image-modification-block.html
---
`ASTableNode` and `ASCollectionNode` have a `inverted` property of type `BOOL` that when set to `YES`, will automatically invert the content so that it's layed out bottom to top, that is the 'first' (indexPath 0, 0) node is at the bottom rather than the top as usual. <b>This is extremely covenient for chat/messaging apps, and with AsyncDisplayKit it only takes one property</b>.
`ASTableNode` and `ASCollectionNode` have a `inverted` property of type `BOOL` that when set to `YES`, will automatically invert the content so that it's layed out bottom to top, that is the 'first' (indexPath 0, 0) node is at the bottom rather than the top as usual. <b>This is extremely covenient for chat/messaging apps, and with Texture it only takes one property</b>.
When this is enabled, developers only have to take one more step to have full inversion support and that is to adjust the `contentInset` of their `ASTableNode` or `ASCollectionNode` like so:
@@ -29,4 +29,4 @@ When this is enabled, developers only have to take one more step to have full in
</div>
</div>
See the <a href="https://github.com/facebook/AsyncDisplayKit/tree/master/examples/SocialAppLayout-Inverted">SocialAppLayout-Inverted</a> example project for more details.
See the <a href="https://github.com/texturegroup/texture/tree/master/examples/SocialAppLayout-Inverted">SocialAppLayout-Inverted</a> example project for more details.

View File

@@ -10,7 +10,7 @@ In some cases, you can substantially improve your app's performance by using lay
With UIKit, manually converting view-based code to layers is laborious due to the difference in APIs. Worse, if at some point you need to enable touch handling or other view-specific functionality, you have to manually convert everything back (and risk regressions!).
With all AsyncDisplayKit nodes, converting an entire subtree from views to layers is as simple as:
With all Texture nodes, converting an entire subtree from views to layers is as simple as:
<div class = "highlight-group">
<span class="language-toggle"><a data-lang="swift" class="swiftButton">Swift</a><a data-lang="objective-c" class = "active objcButton">Objective-C</a></span>

View File

@@ -12,8 +12,8 @@ Here are some helpful questions to ask yourself when you encounter any issues co
<br>
Certain `ASLayoutable` properties will _only_ apply when the layoutable is a child of a _stack_ spec (the child is called an ASStackLayoutable), while other properties _only_ apply when the layoutable is a child of a _static_ spec (the child is called an ASStaticLayoutable).
- table of [`ASStackLayoutables` properties](http://asyncdisplaykit.org/docs/automatic-layout-containers.html#asstacklayoutable-properties)
- table of [`ASStaticLayoutable` properties](http://asyncdisplaykit.org/docs/automatic-layout-containers.html#asstaticlayoutable-properties)
- table of [`ASStackLayoutables` properties](http://texturegroup.org/docs/automatic-layout-containers.html#asstacklayoutable-properties)
- table of [`ASStaticLayoutable` properties](http://texturegroup.org/docs/automatic-layout-containers.html#asstaticlayoutable-properties)
All ASLayoutable properties can be applied to _any_ layoutable (e.g. any node or layout spec), however certain properties will only take effect depending on the type of the parent layout spec they are wrapped in.
@@ -25,7 +25,7 @@ A common examples of this confusion involves flex grow and flex shrink. E.g. a n
## Have I provided sizes for any node that lacks an intrinsic size?
<br>
AsyncDisplayKit's layout pass is recursive, starting at the layout spec returned from `-layoutSpecThatFits:` and proceeding down until it reaches the leaf nodes included in any nested layout specs.
Texture's layout pass is recursive, starting at the layout spec returned from `-layoutSpecThatFits:` and proceeding down until it reaches the leaf nodes included in any nested layout specs.
Some leaf nodes have a concept of their own intrinsic size, such as ASTextNode or ASImageNode. A text node knows the length of its formatted string and an ASImageNode knows the size of its static image. Other leaf nodes require an intrinsic size to be set.
@@ -49,11 +49,11 @@ Set `.preferredFrameSize` to set a size for any node. Note that setting .preferr
Set `.sizeRange` to set a size range for any node or layout spec that is the child of a *static* spec consisting. `.sizeRange` is the *only* way to set a size on a layout spec. Again, when using `.sizeRange`, you *must wrap the layoutable in a static layout spec for it to take effect.*
A `.sizeRange` consists of a minimum and maximum constrained size (these sizes can be a specific point value or a relative value, like 70%). For details on the `.sizeRange` property's custom value type, check out our [Layout API Sizing guide](http://asyncdisplaykit.org/docs/layout-api-sizing.html).
A `.sizeRange` consists of a minimum and maximum constrained size (these sizes can be a specific point value or a relative value, like 70%). For details on the `.sizeRange` property's custom value type, check out our [Layout API Sizing guide](http://texturegroup.org/docs/layout-api-sizing.html).
## `ASRelativeDimension` vs `ASRelativeSize` vs `ASRelativeSizeRange` vs `ASSizeRange`
<br>
AsyncDisplayKit's Layout API supports configuring node and layout spec sizes with specific point values as well as relative values. Read the [Layout API Sizing guide](http://asyncdisplaykit.org/docs/layout-api-sizing.html) for a helpful chart and documentation on our custom layout value types.
Texture's Layout API supports configuring node and layout spec sizes with specific point values as well as relative values. Read the [Layout API Sizing guide](http://texturegroup.org/docs/layout-api-sizing.html) for a helpful chart and documentation on our custom layout value types.
## Debugging layout specs with ASCII art
<br>

View File

@@ -6,7 +6,7 @@ prevPage: subclassing.html
nextPage: containers-overview.html
---
AsyncDisplayKit's layout engine is based on the CSS Box Model. While it is the feature of the framework that bears the weakest resemblance to the UIKit equivalent (AutoLayout), it is also among the most useful features once you've gotten used to it. With enough practice, you may just come to prefer creating declarative layouts to the constraint based approach. ;]
Texture's layout engine is based on the CSS Box Model. While it is the feature of the framework that bears the weakest resemblance to the UIKit equivalent (AutoLayout), it is also among the most useful features once you've gotten used to it. With enough practice, you may just come to prefer creating declarative layouts to the constraint based approach. ;]
The main way you participate in this system is by implementing `-layoutSpecThatFits:` in a node subclass. Here, you declaratively build up layout specs from the inside out, returning the final spec which will contain the rest.

View File

@@ -6,10 +6,10 @@ prevPage: automatic-layout-debugging.html
nextPage: layer-backing.html
---
When using ASDK, you have three options for layout. Note that UIKit Autolayout is **not** supported by ASDK.
When using Texture, you have three options for layout. Note that UIKit Autolayout is **not** supported by Texture.
#Manual Sizing & Layout
This original layout method shipped with ASDK 1.0 and is analogous to UIKit's layout methods. Use this method for ASViewControllers (unless you subclass the node).
This original layout method shipped with Texture 1.0 and is analogous to UIKit's layout methods. Use this method for ASViewControllers (unless you subclass the node).
`[ASDisplayNode calculateSizeThatFits:]` **vs.** `[UIView sizeThatFits:]`

View File

@@ -6,9 +6,9 @@ prevPage: layout2-api-sizing.html
nextPage: hit-test-slop.html
---
The Layout Transition API was designed to make all animations with AsyncDisplayKit easy - even transforming an entire set of views into a completely different set of views!
The Layout Transition API was designed to make all animations with Texture easy - even transforming an entire set of views into a completely different set of views!
With this system, you simply specify the desired layout and AsyncDisplayKit will do the work to figure out differences from the current layout. It will automatically add new elements, remove unneeded elements after the transiton, and update the position of any existing elements.
With this system, you simply specify the desired layout and Texture will do the work to figure out differences from the current layout. It will automatically add new elements, remove unneeded elements after the transiton, and update the position of any existing elements.
There are also easy to use APIs that allow you to fully customize the starting position of newly introduced elements, as well as the ending position of removed elements.
@@ -184,11 +184,11 @@ override func animateLayoutTransition(_ context: ASContextTransitioning) {
</div>
</div>
The passed <a href="https://github.com/facebook/AsyncDisplayKit/blob/master/AsyncDisplayKit/ASContextTransitioning.h">`ASContextTransitioning`</a> context object in this method contains relevant information to help you determine the state of the nodes before and after the transition. It includes getters into old and new constrained sizes, inserted and removed nodes, and even the raw old and new `ASLayout` objects. In the `SignupNode` example, we're using it to determine the frame for each of the fields and animate them in an out of place.
The passed <a href="https://github.com/texturegroup/texture/blob/master/AsyncDisplayKit/ASContextTransitioning.h">`ASContextTransitioning`</a> context object in this method contains relevant information to help you determine the state of the nodes before and after the transition. It includes getters into old and new constrained sizes, inserted and removed nodes, and even the raw old and new `ASLayout` objects. In the `SignupNode` example, we're using it to determine the frame for each of the fields and animate them in an out of place.
It is imperative to call `completeTransition:` on the context object once your animation has finished, as it will perform the necessary internal steps for the newly calculated layout to become the current `calculatedLayout`.
Note that there hasn't been a use of `addSubnode:` or `removeFromSupernode` during the transition. AsyncDisplayKit's layout transition API analyzes the differences in the node hierarchy between the old and new layout, implicitly performing node insertions and removals via <a href="automatic-subnode-mgmt.html">Automatic Subnode Management</a>.
Note that there hasn't been a use of `addSubnode:` or `removeFromSupernode` during the transition. Texture's layout transition API analyzes the differences in the node hierarchy between the old and new layout, implicitly performing node insertions and removals via <a href="automatic-subnode-mgmt.html">Automatic Subnode Management</a>.
Nodes are inserted before your implementation of `animateLayoutTransition:` is called and this is a good place to manually manage the hierarchy before you begin the animation. Removals are performed in `didCompleteLayoutTransition:` after you call `completeTransition:` on the context object. If you need to manually perform deletions, override `didCompleteLayoutTransition:` and perform your custom operations. Note that this will override the default behavior and it is recommended to either call `super` or walk through the `removedSubnodes` getter in the context object to perform the cleanup.
@@ -256,4 +256,4 @@ override func viewWillTransition(to size: CGSize, with coordinator: UIViewContro
## Examples that use the Layout Transition API
- [ASDKLayoutTransition](https://github.com/facebook/AsyncDisplayKit/tree/master/examples/ASDKLayoutTransition)
- [ASDKLayoutTransition](https://github.com/texturegroup/texture/tree/master/examples/ASDKLayoutTransition)

View File

@@ -19,7 +19,7 @@ A list of the changes:
- Rename `ASRelativeDimension` to `ASDimension`
- Introduction of `ASDimensionUnitAuto`
In addition to the inline examples comparing **1.x** layout code vs **2.0** layout code, the [example projects](https://github.com/facebook/AsyncDisplayKit/tree/master/examples) and <a href = "layout2-quickstart.html">layout documentation</a> have been updated to use the new API.
In addition to the inline examples comparing **1.x** layout code vs **2.0** layout code, the [example projects](https://github.com/texturegroup/texture/tree/master/examples) and <a href = "layout2-quickstart.html">layout documentation</a> have been updated to use the new API.
All other **2.0** changes not related to the Layout API are documented <a href="adoption-guide-2-0-beta1.html">here</a>.
@@ -390,7 +390,7 @@ In certain advanced cases, you may want to override this method. Overriding this
Call this on children`layoutElements` to compute their layouts within your implementation of `-calculateLayoutThatFits:`.
For sample implementations of layout specs and the usage of the `calculateLayoutThatFits:` family of methods, check out the layout specs in AsyncDisplayKit itself!
For sample implementations of layout specs and the usage of the `calculateLayoutThatFits:` family of methods, check out the layout specs in Texture itself!
## Deprecation of `-[ASDisplayNode measure:]`
@@ -458,7 +458,7 @@ Due to the removal of `-[ASAbsoluteLayoutElement sizeRange]`, we also removed th
## Rename `ASRelativeDimension` to `ASDimension`
To simplify the naming and support the fact that dimensions are widely used in ASDK now, `ASRelativeDimension` was renamed to `ASDimension`. Having a shorter name and handy functions to create it was an important goal for us.
To simplify the naming and support the fact that dimensions are widely used in Texture now, `ASRelativeDimension` was renamed to `ASDimension`. Having a shorter name and handy functions to create it was an important goal for us.
`ASRelativeDimensionTypePercent` and associated functions were renamed to use `Fraction` to be consistent with Apple terminology.

View File

@@ -70,7 +70,7 @@ override func layoutSpecThatFits(_ constrainedSize: ASSizeRange) -> ASLayoutSpec
</div>
## ASStackLayoutSpec (Flexbox Container)
Of all the layoutSpecs in ASDK, `ASStackLayoutSpec` is the most useful and powerful. `ASStackLayoutSpec` uses the flexbox algorithm to determine the position and size of its children. Flexbox is designed to provide a consistent layout on different screen sizes. In a stack layout you align items in either a vertical or horizontal stack. A stack layout can be a child of another stack layout, which makes it possible to create almost any layout using a stack layout spec.
Of all the layoutSpecs in Texture, `ASStackLayoutSpec` is the most useful and powerful. `ASStackLayoutSpec` uses the flexbox algorithm to determine the position and size of its children. Flexbox is designed to provide a consistent layout on different screen sizes. In a stack layout you align items in either a vertical or horizontal stack. A stack layout can be a child of another stack layout, which makes it possible to create almost any layout using a stack layout spec.
`ASStackLayoutSpec` has 7 properties in addition to its `<ASLayoutElement>` properties:
@@ -131,7 +131,7 @@ override func layoutSpecThatFits(_ constrainedSize: ASSizeRange) -> ASLayoutSpec
</div>
</div>
Flexbox works the same way in AsyncDisplayKit as it does in CSS on the web, with a few exceptions. For example, the defaults are different and there is no `flex` parameter. See <a href = "layout2-web-flexbox-differences.html">Web Flexbox Differences</a> for more information.
Flexbox works the same way in Texture as it does in CSS on the web, with a few exceptions. For example, the defaults are different and there is no `flex` parameter. See <a href = "layout2-web-flexbox-differences.html">Web Flexbox Differences</a> for more information.
<br>

View File

@@ -5,7 +5,7 @@ permalink: /docs/layout2-manual-layout.html
---
## Manual Layout
After diving in to the automatic way for layout in ASDK there is still the _old_ way to layout manually available. For the sake of completness here is a short description how to accomplish that within ASDK.
After diving in to the automatic way for layout in Texture there is still the _old_ way to layout manually available. For the sake of completness here is a short description how to accomplish that within Texture.
### Manual Layout UIKit
@@ -68,9 +68,9 @@ Further, even with a cache, we'll still be blocking the main thread on sizing *s
This is a pretty deep rabbit hole. We could attempt to work around the fact that UILabels and UITextViews cannot safely be sized on background threads by manually creating a TextKit stack and sizing the text ourselves... but that's a laborious duplication of work. Further, if UITextView's layout behaviour changes in an iOS update, our sizing code will break. (And did we mention that TextKit isn't thread-safe either?)
### Manual Layout ASDK
### Manual Layout Texture
Manual layout within ASDK are realized within two methods:
Manual layout within Texture are realized within two methods:
#### `calculateSizeThatFits` and `layout`
@@ -161,7 +161,7 @@ Our custom node looks like this:
</div>
</div>
`ASImageNode` and `ASTextNode`, like the rest of AsyncDisplayKit, are thread-safe, so we can size them on background threads. The `-layoutThatFits:` method is like `-sizeThatFits:`, but with side effects: it caches the (`calculatedSize`) for quick access later on &mdash; like in our now-snappy `-layout` implementation.
`ASImageNode` and `ASTextNode`, like the rest of Texture, are thread-safe, so we can size them on background threads. The `-layoutThatFits:` method is like `-sizeThatFits:`, but with side effects: it caches the (`calculatedSize`) for quick access later on &mdash; like in our now-snappy `-layout` implementation.
As you can see, node hierarchies are sized and laid out in much the same way as their view counterparts. Manually layed out nodes do need to be written with a few things in mind:

View File

@@ -8,7 +8,7 @@ nextPage: automatic-layout-examples-2.html
## Motivation & Benefits
The Layout API was created as a performant alternative to UIKit's Auto Layout, which becomes exponentially expensive for complicated view hierarchies. AsyncDisplayKit's Layout API has many benefits over using UIKit's Auto Layout:
The Layout API was created as a performant alternative to UIKit's Auto Layout, which becomes exponentially expensive for complicated view hierarchies. Texture's Layout API has many benefits over using UIKit's Auto Layout:
- **Fast**: As fast as manual layout code and significantly faster than Auto Layout
- **Asynchronous & Concurrent:** Layouts can be computed on background threads so user interactions are not interrupted.
@@ -18,11 +18,11 @@ The Layout API was created as a performant alternative to UIKit's Auto Layout, w
## Inspired by CSS Flexbox
Those who are familiar with Flexbox will notice many similarities in the two systems. However, AsyncDisplayKit's Layout API <a href = "layout2-web-flexbox-differences.html">does not</a> re-implement all of CSS.
Those who are familiar with Flexbox will notice many similarities in the two systems. However, Texture's Layout API <a href = "layout2-web-flexbox-differences.html">does not</a> re-implement all of CSS.
## Basic Concepts
AsyncDisplayKit's layout system is centered around two basic concepts:
Texture's layout system is centered around two basic concepts:
1. Layout Specs
2. Layout Elements
@@ -32,7 +32,7 @@ AsyncDisplayKit's layout system is centered around two basic concepts:
A layout spec, short for "layout specification", has no physical presence. Instead, layout specs act as containers for other layout elements by understanding how these children layout elements relate to each other.
AsyncDisplayKit provides several <a hfref = "layout2-layoutspec-types.html">subclasses</a> of `ASLayoutSpec`, from a simple layout specification that insets a single child, to a more complex layout specification that arranges multiple children in varying stack configurations.
Texture provides several <a hfref = "layout2-layoutspec-types.html">subclasses</a> of `ASLayoutSpec`, from a simple layout specification that insets a single child, to a more complex layout specification that arranges multiple children in varying stack configurations.
### Layout Elements
@@ -54,7 +54,7 @@ The play button on top of the `ASVideoNode` (top image) is placed using an `ASCe
### Some nodes need Sizes Set
<!-- With manual layout, each element gets its position and size set individually. With AsyncDisplayKit's Layout API, very -->
<!-- With manual layout, each element gets its position and size set individually. With Texture's Layout API, very -->
Some elements have an "intrinsic size" based on their immediately available content. For example, ASTextNode can calculate its size based on its attributed string. Other nodes that have an intrinsic size include

View File

@@ -4,7 +4,7 @@ layout: docs
permalink: /docs/layout2-web-flexbox-differences.html
---
The goal of AsyncDisplayKit's Layout API is *not* to re-implement all of CSS. It only targets a subset of CSS and Flexbox container, and there are no plans to implement support for tables, floats, or any other CSS concepts. The AsyncDisplayKit Layout API also does not plan to support styling properties which do not affect layout such as color or background properties.
The goal of Texture's Layout API is *not* to re-implement all of CSS. It only targets a subset of CSS and Flexbox container, and there are no plans to implement support for tables, floats, or any other CSS concepts. The Texture Layout API also does not plan to support styling properties which do not affect layout such as color or background properties.
The layout system tries to stay as close as possible to CSS. There are, however, certain cases where it differs from the web, these include:

View File

@@ -6,19 +6,19 @@ prevPage: containers-overview.html
nextPage: subclassing.html
---
AsyncDisplayKit offers the following nodes.
Texture offers the following nodes.
A key advantage of using nodes over UIKit components is that **all nodes preform layout and display off of the main thread**, so that the main thread is available to immediately respond to user interaction events.
<table style="width:100%" class = "paddingBetweenCols">
<tr>
<th>ASDK Node</th>
<th>Texture Node</th>
<th>UIKit Equivalent</th>
</tr>
<tr>
<td><a href = "display-node.html"><code>ASDisplayNode</code></a></td>
<td>in place of UIKit's <code>UIView</code><br>
<i>The root AsyncDisplayKit node, from which all other nodes inherit.</i></td>
<i>The root Texture node, from which all other nodes inherit.</i></td>
</tr>
<tr>
<td><a href = "cell-node.html"><code>ASCellNode</code></a></td>
@@ -63,14 +63,14 @@ A key advantage of using nodes over UIKit components is that **all nodes preform
</table>
<br>
Despite having rough equivalencies to UIKit components, in general, AsyncDisplayKit nodes offer more advanced features and conveniences. For example, an `ASNetworkImageNode` does automatic loading and cache management, and even supports progressive jpeg and animated gifs.
Despite having rough equivalencies to UIKit components, in general, Texture nodes offer more advanced features and conveniences. For example, an `ASNetworkImageNode` does automatic loading and cache management, and even supports progressive jpeg and animated gifs.
The <a href = "https://github.com/facebook/AsyncDisplayKit/tree/master/examples/AsyncDisplayKitOverview">`AsyncDisplayKitOverview`</a> example app gives basic implementations of each of the nodes listed above.
The <a href = "https://github.com/texturegroup/texture/tree/master/examples/AsyncDisplayKitOverview">`AsyncDisplayKitOverview`</a> example app gives basic implementations of each of the nodes listed above.
# Node Inheritance Hierarchy
All AsyncDisplayKit nodes inherit from `ASDisplayNode`.
All Texture nodes inherit from `ASDisplayNode`.
<img src="/static/images/node-hierarchy.png" alt="node inheritance flowchart">

View File

@@ -8,36 +8,36 @@ nextPage: installation.html
#Asynchronous Performance Gains
AsyncDisplayKit is a UI framework that was originally born from Facebooks Paper app. It came as an answer to one of the core questions the Paper team faced. **How can you keep the main thread as clear as possible?**
Texture is a UI framework that was originally born from Facebooks Paper app. It came as an answer to one of the core questions the Paper team faced. **How can you keep the main thread as clear as possible?**
Nowadays, many apps have a user experience that relies heavily upon continuous gestures and physics based animations. At the very least, your UI is probably dependent on some form of scroll view. These types of user interfaces depend entirely on the main thread and are extremely sensitive to main thread stalls. **A clogged main thread means dropped frames and an unpleasant user experience.**
AsyncDisplayKit Nodes are a thread-safe abstraction layer over UIViews and CALayers:
Texture Nodes are a thread-safe abstraction layer over UIViews and CALayers:
<img src="/static/images/node-view-layer.png" alt="logo">
You can access most view and layer properties when using nodes, the difference is that nodes are rendered concurrently by default, and measured and laid out asynchronously when used <a href = "/docs/layout-engine.html">correctly</a>!
Too see asynchronous performance gains in action, check out the <a href = "https://github.com/facebook/AsyncDisplayKit/tree/master/examples/ASDKgram">`examples/ASDKgram`</a> app which compares a UIKit-implemented social media feed with an ASDK-implemented social media feed!
Too see asynchronous performance gains in action, check out the <a href = "https://github.com/texturegroup/texture/tree/master/examples/ASDKgram">`examples/ASDKgram`</a> app which compares a UIKit-implemented social media feed with an Texture-implemented social media feed!
On an iPhone 6+, the performance may not be radically different, but on a 4S, the difference is dramatic! Which leads us to ASDK's next priority...
On an iPhone 6+, the performance may not be radically different, but on a 4S, the difference is dramatic! Which leads us to Texture's next priority...
#A Great App Experience for All Users
ASDK's performance gains allow you to easily design a great experience for every app user - across all devices, on all network connections.
Texture's performance gains allow you to easily design a great experience for every app user - across all devices, on all network connections.
##A Great Developer Experience
ASDK also strives to make the developer experience great
Texture also strives to make the developer experience great
- platform compatability: iOS & tvOS
- language compatability: Objective-C & Swift
- requires fewer lines of code to build advanced apps (see <a href = "https://github.com/facebook/AsyncDisplayKit/tree/master/examples/ASDKgram">`examples/ASDKgram`</a> for a direct comparison of a UIKit implemention of an app vs. an equivalent ASDK implementation)
- requires fewer lines of code to build advanced apps (see <a href = "https://github.com/texturegroup/texture/tree/master/examples/ASDKgram">`examples/ASDKgram`</a> for a direct comparison of a UIKit implemention of an app vs. an equivalent Texture implementation)
- cleaner architecture patterns
- robust code (some really brilliant minds have worked on this for 3+ years).
#Advanced Developer Tools
As ASDK has grown, some of the brightest iOS engineers have contributed advanced technologies that will save you, as a developer using ASDK, development time.
As Texture has grown, some of the brightest iOS engineers have contributed advanced technologies that will save you, as a developer using Texture, development time.
###Advanced Technology
- ASRunLoopQueue

View File

@@ -17,9 +17,9 @@ The `-placeholderImage` function may be called on a background thread, so it is
</div>
An ideal resource for creating placeholder images, including rounded rect solid colored ones or simple square corner ones is the `UIImage+ASConvenience` category methods in ASDK.
An ideal resource for creating placeholder images, including rounded rect solid colored ones or simple square corner ones is the `UIImage+ASConvenience` category methods in Texture.
See our ancient <a href="https://github.com/facebook/AsyncDisplayKit/tree/master/examples_extra/Placeholders">Placeholders sample app</a> to see this concept, first invented by the Facebook Paper team, in action.
See our ancient <a href="https://github.com/texturegroup/texture/tree/master/examples_extra/Placeholders">Placeholders sample app</a> to see this concept, first invented by the Facebook Paper team, in action.
## `.neverShowPlaceholders`

View File

@@ -4,7 +4,7 @@ layout: docs
permalink: /docs/principles.html
---
The following principles guide the design and development of the AsyncDisplayKit framework.
The following principles guide the design and development of the Texture framework.
## 1. Reliable
@@ -21,7 +21,7 @@ The following principles guide the design and development of the AsyncDisplayKit
## 3. Lean
- **What:** Speed and memory conservation should be industry-leading, the API should be concise, and implementation code should be short and organized.
- **Why:** Performance is at the heart of AsyncDisplayKit. It's what we do and we do it better than anyone else. In addition, a concise codebase and API are easier to maintain and learn. Plus it's just the right thing to do.
- **Why:** Performance is at the heart of Texture. It's what we do and we do it better than anyone else. In addition, a concise codebase and API are easier to maintain and learn. Plus it's just the right thing to do.
- **How:** Look for opportunities to improve performance. Think about the performance implications of each line of code. Dedicate resources to refactoring. Build tools to gather and expose performance metrics.
## 4. Bold

View File

@@ -8,15 +8,15 @@ nextPage: installation.html
### Slack
Join 700+ AsyncDisplayKit developers and the AsyncDisplayKit <a href="team.html">core team</a> on Slack for real-time debugging, the latest updates, and asynchronous banter. Signup <a href="/slack.html">here</a>.
Join 700+ Texture developers and the Texture <a href="team.html">core team</a> on Slack for real-time debugging, the latest updates, and asynchronous banter. Signup <a href="/slack.html">here</a>.
### Examples
Browse through our many <a href="https://github.com/facebook/AsyncDisplayKit/tree/master/examples">example projects</a>.
Browse through our many <a href="https://github.com/texturegroup/texture/tree/master/examples">example projects</a>.
If you are new to AsyncDisplayKit, we recommend that you start with the <a href="https://github.com/facebook/AsyncDisplayKit/tree/master/examples/ASDKgram">ASDKgram</a> example app which compares a photo feed implemented with UIKit to an identical feed implemented with AsyncDisplayKit. The app features:
If you are new to Texture, we recommend that you start with the <a href="https://github.com/texturegroup/texture/tree/master/examples/ASDKgram">ASDKgram</a> example app which compares a photo feed implemented with UIKit to an identical feed implemented with Texture. The app features:
<ol>
<li>An infinitely scrolling home feed that demonstrates ASDK's smoother scrolling performance. </li>
<li>A significantly sized code base to demonstrate how much less code it takes to design apps using AsyncDisplayKit.</li>
<li>An infinitely scrolling home feed that demonstrates Texture's smoother scrolling performance. </li>
<li>A significantly sized code base to demonstrate how much less code it takes to design apps using Texture.</li>
</ol>
### Videos
@@ -41,7 +41,7 @@ Smooth Scrolling in Buffer for iOS: How (and Why) We Implemented AsyncDisplayKit
### Layout Resources
AsyncDisplayKit's powerful layout system is based on the CSS FlexBox model. These sites are useful for learning the basics of this system.
Texture's powerful layout system is based on the CSS FlexBox model. These sites are useful for learning the basics of this system.
<ul>
<li><a href = "http://nguyenhuy.github.io/froggy-asdk-layout/">ASStackLayout Game</a></li>
<li><a href = "https://demos.scotch.io/visual-guide-to-css3-flexbox-flexbox-playground/demos/">Visual Guide to CSS3 Flexbox</a></li>

View File

@@ -4,9 +4,9 @@ layout: docs
permalink: /docs/roadmap.html
---
This document outlines some of the upcoming plans for AsyncDisplayKit. Since AsyncDisplayKit is a fast-moving project with a small <a href="team.md">core team</a>, this roadmap will change over time.
This document outlines some of the upcoming plans for Texture. Since Texture is a fast-moving project with a small <a href="team.md">core team</a>, this roadmap will change over time.
The AsyncDisplayKit roadmap is driven by the framework's four key qualities. You can read read more about the principles <a href="principles.md">here</a>.
The Texture roadmap is driven by the framework's four key qualities. You can read read more about the principles <a href="principles.md">here</a>.
## 2.1 Release
@@ -44,6 +44,6 @@ The AsyncDisplayKit roadmap is driven by the framework's four key qualities. You
- Connect on GitHub, Slack and Twitter.
- Vet our documentation. Submit or suggest ways to improve.
- Share your experience using AsyncDisplayKit. Thanks Buffer!
- Share your experience using Texture. Thanks Buffer!
- Contribute layout examples.
- Contribute code. Try to implement one of our <a href="">"Needs Volunteer"</a> issues.

View File

@@ -8,7 +8,7 @@ nextPage: synchronous-concurrency.html
Flattening an entire view hierarchy into a single layer improves performance, but with UIKit, comes with a hit to maintainability and hierarchy-based reasoning.
With all AsyncDisplayKit nodes, enabling precompositing is as simple as:
With all Texture nodes, enabling precompositing is as simple as:
<div class = "highlight-group">
<span class="language-toggle"><a data-lang="swift" class="swiftButton">Swift</a><a data-lang="objective-c" class = "active objcButton">Objective-C</a></span>

View File

@@ -10,7 +10,7 @@ Both `ASViewController` and `ASCellNode` have a property called `neverShowPlaceh
By setting this property to YES, the main thread will be blocked until display has completed for the cell or view controller's view.
Using this option does not eliminate all of the performance advantages of AsyncDisplayKit. Normally, a given node has been preloading and is almost done when it reaches the screen, so the blocking time is very short. Even if the rangeTuningParameters are set to 0 this option outperforms UIKit. While the main thread is waiting, all subnode display executes concurrently, thus synchronous concurrency.
Using this option does not eliminate all of the performance advantages of Texture. Normally, a given node has been preloading and is almost done when it reaches the screen, so the blocking time is very short. Even if the rangeTuningParameters are set to 0 this option outperforms UIKit. While the main thread is waiting, all subnode display executes concurrently, thus synchronous concurrency.
<div class = "highlight-group">
<span class="language-toggle"><a data-lang="swift" class="swiftButton">Swift</a><a data-lang="objective-c" class = "active objcButton">Objective-C</a></span>
@@ -25,4 +25,4 @@ node.neverShowPlaceholders = true
</div>
<br>
Usually, if a cell hasn't finished its display pass before it has reached the screen it will show placeholders until it has drawing its content. Setting this option to YES makes your scrolling node or ASViewController act more like UIKit, and in fact makes AsyncDisplayKit scrolling visually indistinguishable from UIKit's, except that it's faster.
Usually, if a cell hasn't finished its display pass before it has reached the screen it will show placeholders until it has drawing its content. Setting this option to YES makes your scrolling node or ASViewController act more like UIKit, and in fact makes Texture scrolling visually indistinguishable from UIKit's, except that it's faster.

View File

@@ -7,17 +7,17 @@ permalink: /docs/team.html
<table style="width:100%" class="paddingBetweenColsNoColor">
<tr>
<td width="130"><img src="https://avatars.githubusercontent.com/appleguy" width="100" /></td>
<td><p>Scott Goodson (<a href="https://github.com/appleguy">@appleguy</a>) is an original author of AsyncDisplayKit and, most recently, a driving force behind making Pinterest's <a href="https://medium.com/@suprb/redesigning-pinterest-block-by-block-6040a00d80a3">design vision</a> a reality with the recent <a href="https://www.wired.com/2016/04/pinterest-reinvents-prove-really-worth-billions/">rewrite</a> of the iOS app.</p>
<td><p>Scott Goodson (<a href="https://github.com/appleguy">@appleguy</a>) is an original author of Texture and, most recently, a driving force behind making Pinterest's <a href="https://medium.com/@suprb/redesigning-pinterest-block-by-block-6040a00d80a3">design vision</a> a reality with the recent <a href="https://www.wired.com/2016/04/pinterest-reinvents-prove-really-worth-billions/">rewrite</a> of the iOS app.</p>
<p>Previously, Scott managed the Facebook Paper and Instagram iOS engineering teams, and helped lead the native code rewrite of the core Facebook iOS app. He also spent four years at Apple where he was one of the first ten engineers to work on iPhone OS 1.0, and developed apps like Stocks and Calculator.</p>
<p>Scott is deeply passionate about building AsyncDisplayKit into a framework that allows effortless development of polished and performant apps that serve all users, regardless of device age, internet connection, or language.</p></td>
<p>Scott is deeply passionate about building Texture into a framework that allows effortless development of polished and performant apps that serve all users, regardless of device age, internet connection, or language.</p></td>
</tr>
<tr>
<td><img src="https://d3vv6lp55qjaqc.cloudfront.net/items/2d1K0a372b1J3V2f071D/Michael-Avatar.jpg" width="100" /></td>
<td><p>Michael Schneider (<a href="https://github.com/maicki">@maicki</a>) is especially passionate about API design and recently led the re-architecture of the layout API for the <a href = "upgrading.html">2.0 release</a>. As our resident layout expert, Michael volunteers much of his own time to help developers on ASDK's public <a href="/slack.html">slack channel</a>. Previous, Michael worked on <a href="https://itunes.apple.com/us/app/pocket-save-articles-videos/id309601447">Pocket</a> for iOS, Mac and Chrome and the <a href="https://itunes.apple.com/us/app/instapaper/id288545208">Instapaper</a> Mac app.</p></td>
<td><p>Michael Schneider (<a href="https://github.com/maicki">@maicki</a>) is especially passionate about API design and recently led the re-architecture of the layout API for the <a href = "upgrading.html">2.0 release</a>. As our resident layout expert, Michael volunteers much of his own time to help developers on Texture's public <a href="/slack.html">slack channel</a>. Previous, Michael worked on <a href="https://itunes.apple.com/us/app/pocket-save-articles-videos/id309601447">Pocket</a> for iOS, Mac and Chrome and the <a href="https://itunes.apple.com/us/app/instapaper/id288545208">Instapaper</a> Mac app.</p></td>
</tr>
<tr>
<td><img src="https://avatars.githubusercontent.com/nguyenhuy" width="100" /></td>
<td><p>Huy Nguyen (<a href="https://github.com/nguyenhuy ">@nguyenhuy </a>) joined the Pinterest team after authoring AsyncDisplayKit's <a href = "layout2-quickstart.html">automatic layout</a> feature, which has become the foundation for the AsyncDisplayKit's 2.0 release. To date, the Layout API has been the largest contribution to the framework by a community member!</p></td>
<td><p>Huy Nguyen (<a href="https://github.com/nguyenhuy ">@nguyenhuy </a>) joined the Pinterest team after authoring Texture's <a href = "layout2-quickstart.html">automatic layout</a> feature, which has become the foundation for the Texture's 2.0 release. To date, the Layout API has been the largest contribution to the framework by a community member!</p></td>
</tr>
<tr>
<td><img src="https://avatars.githubusercontent.com/garrettmoon" width="100" /></td>
@@ -25,20 +25,20 @@ permalink: /docs/team.html
</tr>
<tr>
<td><img src="https://avatars.githubusercontent.com/adlai-holler" width="100" /></td>
<td><p>Adlai ("Ad-lee") Holler (<a href="https://github.com/adlai-holler">@adlai-holler</a>) joined the Pinterest team after making major contributions to the framework while writing <a href = "https://tripstr.com">Tripstr</a> in Swift with AsyncDisplayKit.</p>
<td><p>Adlai ("Ad-lee") Holler (<a href="https://github.com/adlai-holler">@adlai-holler</a>) joined the Pinterest team after making major contributions to the framework while writing <a href = "https://tripstr.com">Tripstr</a> in Swift with Texture.</p>
</td>
</tr>
</table>
# Join us!
We are looking for senior developers familiar with AsyncDisplayKit to join our team!
We are looking for senior developers familiar with Texture to join our team!
We have an exciting roadmap that we believe will continue to push the boundaries of what is possible on the iOS platform, while making the framework easier to use than ever before.
As part of the team, you would work on AsyncDisplayKit, [PINRemoteImage](https://github.com/pinterest/PINRemoteImage), and [PINCache](https://github.com/pinterest/PINCache) (the backing store for ASNetworkImageNode), while using all three in Pinterest's [app](https://itunes.apple.com/us/app/pinterest/id429047995).
As part of the team, you would work on Texture, [PINRemoteImage](https://github.com/pinterest/PINRemoteImage), and [PINCache](https://github.com/pinterest/PINCache) (the backing store for ASNetworkImageNode), while using all three in Pinterest's [app](https://itunes.apple.com/us/app/pinterest/id429047995).
One interesting thing to note is that Pinterest does not have an internal fork of AsyncDisplayKit. Everything is developed on master, with release branches cut from master only a few weeks before our public application launches. This allows us to move exceptionally quickly in developing and launching improvements to millions of users.
One interesting thing to note is that Pinterest does not have an internal fork of Texture. Everything is developed on master, with release branches cut from master only a few weeks before our public application launches. This allows us to move exceptionally quickly in developing and launching improvements to millions of users.
Sound interesting?
Send us an email at AsyncDisplayKit(at)gmail.com.
Send us an email at textureframework@gmail.com.

View File

@@ -6,7 +6,7 @@ prevPage: button-node.html
nextPage: image-node.html
---
`ASTextNode` is AsyncDisplayKit's main text node and can be used any time you would normally use a `UILabel`. It includes full rich text support and is a subclass of `ASControlNode` meaning it can be used any time you would normally create a UIButton with just its titleLabel set.
`ASTextNode` is Texture's main text node and can be used any time you would normally use a `UILabel`. It includes full rich text support and is a subclass of `ASControlNode` meaning it can be used any time you would normally create a UIButton with just its titleLabel set.
### Basic Usage
`ASTextNode`'s interface should be familiar to anyone who's used a `UILabel`. The first difference you may notice, is that text node's only use attributed strings instead of having the option of using a plain string.

View File

@@ -4,7 +4,7 @@ layout: docs
permalink: /docs/tip-1-nodeBlocks.html
---
AsyncDisplayKits `ASCollectionNode` replaces `UICollectionView`s required method
Textures `ASCollectionNode` replaces `UICollectionView`s required method
<div class = "highlight-group">
<span class="language-toggle">

View File

@@ -86,7 +86,7 @@ There is no easy, universal way to handle loading content such as:
<h4><b>Unified Cell Measurement & Allocation</b></h4>
AsyncDisplayKit takes both of the important collection methods explained above:
Texture takes both of the important collection methods explained above:
<div class = "highlight-group">
<span class="language-toggle"><a data-lang="swift" class="swiftButton">Swift</a><a data-lang="objective-c" class = "active objcButton">Objective-C</a></span>
@@ -138,13 +138,13 @@ func collectionNode(collectionNode: ASCollectionNode, nodeBlockForItemAtIndexPat
*Note that there is an optional method to provide a constrained size for the cell, but it is not needed by most apps.
<a href="/docs/cell-node.html"><code>ASCellNode</code></a>, is AsyncDisplayKit's universal cell class. They are light-weight enough to be created an an earlier time in the program (concurrently in the background) and they understand how to calculate their own size. `ASCellNode` automatically caches its measurement so that it can be quickly applied during the layout pass.
<a href="/docs/cell-node.html"><code>ASCellNode</code></a>, is Texture's universal cell class. They are light-weight enough to be created an an earlier time in the program (concurrently in the background) and they understand how to calculate their own size. `ASCellNode` automatically caches its measurement so that it can be quickly applied during the layout pass.
<div class = "note">
As a comparison to the diagram above, this detailed <a href="/static/talks/ASCollectionView.pdf">diagram</a> shows the full process of an <code>ASCollectionView</code> communicating with its data source and delegate to display itself.. Note that <code>ASCollectionView</code> is <code>ASCollectionNode</code>'s underlying <code>UICollectionView</code> subclass.
</div>
<h4><b>Benefits of AsyncDisplayKit's Architecture</b></h4>
<h4><b>Benefits of Texture's Architecture</b></h4>
<b>Elimination of all of the types of main thread work</b> described above (cell allocation, measurement, layout, display)! In addition, all of this work is preformed <b>concurrently</b> on multiple threads.
@@ -153,7 +153,7 @@ Because `ASCollectionNode` is aware of the position of all of its nodes, it can
Lastly, almost all of the concepts we've discussed here apply to `UITableView` / `ASTableNode` and `UIPageViewController` / `ASPagerNode`.
## iOS 10 Cell Pre-fetching
Inspired by ASDK, iOS 10 introduced a <a href="">cell pre-fetching</a>. This API increases the number of cells that the collection tracks at any given time, which helps, but isn't anywhere as performance centric as being aware of all cells in the data source.
Inspired by Texture, iOS 10 introduced a <a href="">cell pre-fetching</a>. This API increases the number of cells that the collection tracks at any given time, which helps, but isn't anywhere as performance centric as being aware of all cells in the data source.
Additionally, iOS9 still constitutes a substantial precentage of most app's userbase and will not reduce in number anywhere close to as quickly as the sunset trajectory of iOS 7 and iOS 8 devices. Whereas iOS 9 is the last supported version for about a half-dozen devices, there were zero devices that were deprecated on iOS 8 and only one deivce deprecated on iOS 7.

View File

@@ -6,7 +6,7 @@ prevPage: placeholder-fade-duration.html
nextPage: accessibility.html
---
AsyncDisplayKit's `ASCollectionNode` offers compatibility with synchronous, standard `UICollectionViewCell` objects alongside native `ASCellNodes`.
Texture's `ASCollectionNode` offers compatibility with synchronous, standard `UICollectionViewCell` objects alongside native `ASCellNodes`.
Note that these UIKit cells will **not** have the performance benefits of `ASCellNodes` (like preloading, async layout, and async drawing), even when mixed within the same `ASCollectionNode`.
@@ -29,11 +29,11 @@ In order to use this feature, you must:
</ol>
</ol>
By default, the interop data source will only be consulted in cases where no `ASCellNode` is provided to AsyncDisplayKit. However, if <code>.dequeuesCellsForNodeBackedItems</code> is enabled, then the interop data source will always be consulted to dequeue cells, and will be expected to return <code>_ASCollectionViewCells</code> in cases where a node was provided.
By default, the interop data source will only be consulted in cases where no `ASCellNode` is provided to Texture. However, if <code>.dequeuesCellsForNodeBackedItems</code> is enabled, then the interop data source will always be consulted to dequeue cells, and will be expected to return <code>_ASCollectionViewCells</code> in cases where a node was provided.
## CustomCollectionView Example App
The [CustomCollectionView](https://github.com/facebook/AsyncDisplayKit/tree/master/examples/CustomCollectionView) example project demonstrates how to use raw `UIKit` cells alongside native `ASCellNodes`.
The [CustomCollectionView](https://github.com/texturegroup/texture/tree/master/examples/CustomCollectionView) example project demonstrates how to use raw `UIKit` cells alongside native `ASCellNodes`.
Open the app and verify that `kShowUICollectionViewCells` is enabled in `Sample/ViewController.m`.

View File

@@ -2,7 +2,7 @@
<html prefix="og: http://ogp.me/ns#">
<head>
<meta charset='utf-8'>
<title>AsyncDisplayKit | {{ page.title }}</title>
<title>Texture | {{ page.title }}</title>
<link rel='stylesheet' href='/static/main.css' type='text/css'/>
<link rel='stylesheet' href='/static/media.css' type='text/css'/>
<link rel="stylesheet" href='/static/pygments.css' type='text/css'/>
@@ -25,10 +25,10 @@
<meta name="theme-color" content="#ffffff">
<meta name='viewport' content='width=480'>
<meta property="og:title" content="{{ page.title }}" />
<meta property="og:site_name" content="AsyncDisplayKit">
<meta property='og:description' content='AsyncDisplayKit'>
<meta property='og:image' content='http://asyncdisplaykit.org/static/asyncdisplaykit-og-image.png'>
<meta property='og:url' content="http://asyncdisplaykit.org{{ page.url }}">
<meta property="og:site_name" content="Texture">
<meta property='og:description' content='Texture'>
<meta property='og:image' content='http://texturegroup.org/static/asyncdisplaykit-og-image.png'>
<meta property='og:url' content="http://texturegroup.org{{ page.url }}">
<meta property='og:type' content='website'>
<script type="text/javascript" src="//use.typekit.net/vqa1hcx.js"></script>
<script type="text/javascript">{'try{Typekit.load();}catch(e){}'}</script>
@@ -41,14 +41,14 @@
<body>
<header>
<div class="container">
<h1 id="logo"><a href="/"><img src="../static/images/ASDKLogo.png" alt="AsyncDisplayKit" width="196" height="39"></a></h1>
<h1 id="logo"><a href="/"><img src="../static/images/ASDKLogo.png" alt="Texture" width="196" height="39"></a></h1>
<nav>
<ul>
<li><a href="/docs/getting-started.html" {% if (page.layout == 'docs') %} class="active" {% endif %}>docs</a></li>
<li><a href="/slack.html" {% if (page.layout == 'slack') %} class="active" {% endif %}>slack</a></li>
<li><a href="/showcase.html" {% if (page.layout == 'showcase') %} class="active" {% endif %}>showcase</a></li>
<li><a href="/appledocs.html" {% if (page.layout == 'appledocs') %} class="active" {% endif %}>api</a></li>
<li><a href="http://github.com/facebook/AsyncDisplayKit">github</a></li>
<li><a href="http://github.com/texturegroup/texture">github</a></li>
</ul>
</nav>
<div style="clear: both;"></div>

View File

@@ -1,7 +1,7 @@
<header class='hero'><div class='width'>
<div class='componentkit-header'></div>
<div>
<p>AsyncDisplayKit</p>
<p>Texture</p>
<div class="buttons-unit">
<a href="/docs/getting-started.html" class="button">Get Started</a>
</div>

View File

@@ -18,7 +18,7 @@
</h1>
<p id="developer-home">
<a href="../index.html">AsyncDisplayKit</a>
<a href="../index.html">Texture</a>
</p>
</div>
@@ -206,7 +206,7 @@ is always mutable, @c copy is never &ldquo;free&rdquo; like it is for e.g. NSStr
<footer>
<div class="footer-copyright">
<p class="copyright">Copyright &copy; 2016 AsyncDisplayKit. All rights reserved. Updated: 2016-11-05</p>
<p class="copyright">Copyright &copy; 2016 Texture. All rights reserved. Updated: 2016-11-05</p>
<p class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2.1 (build 1334)</a>.</p>

View File

@@ -18,7 +18,7 @@
</h1>
<p id="developer-home">
<a href="../index.html">AsyncDisplayKit</a>
<a href="../index.html">Texture</a>
</p>
</div>
@@ -336,7 +336,7 @@
<footer>
<div class="footer-copyright">
<p class="copyright">Copyright &copy; 2016 AsyncDisplayKit. All rights reserved. Updated: 2016-11-05</p>
<p class="copyright">Copyright &copy; 2016 Texture. All rights reserved. Updated: 2016-11-05</p>
<p class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2.1 (build 1334)</a>.</p>

View File

@@ -18,7 +18,7 @@
</h1>
<p id="developer-home">
<a href="../index.html">AsyncDisplayKit</a>
<a href="../index.html">Texture</a>
</p>
</div>
@@ -347,7 +347,7 @@ setChild: and setChild:forIdentifier: methods to do something appropriate or to
<footer>
<div class="footer-copyright">
<p class="copyright">Copyright &copy; 2016 AsyncDisplayKit. All rights reserved. Updated: 2016-11-05</p>
<p class="copyright">Copyright &copy; 2016 Texture. All rights reserved. Updated: 2016-11-05</p>
<p class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2.1 (build 1334)</a>.</p>

View File

@@ -18,7 +18,7 @@
</h1>
<p id="developer-home">
<a href="../index.html">AsyncDisplayKit</a>
<a href="../index.html">Texture</a>
</p>
</div>
@@ -99,7 +99,7 @@
<a title="Overview" name="overview"></a>
<h2 class="subtitle subtitle-overview">Overview</h2>
<p>ASVisibilityDepth</p><p>&ldquo;Visibility Depth&rdquo; represents the number of user actions required to make an ASDisplayNode or
ASViewController visibile. AsyncDisplayKit uses this information to intelligently manage memory and focus
ASViewController visibile. Texture uses this information to intelligently manage memory and focus
resources where they are most visible to the user.</p>
<p>The ASVisibilityDepth protocol describes how custom view controllers can integrate with this system.</p>

View File

@@ -8,15 +8,15 @@ id: home
<div class="container">
<div class="hero-title">Keeps the most complex iOS user interfaces smooth and responsive.</div>
<a href="/docs/getting-started.html" class="btn">Get Started</a>
<a href="https://github.com/facebook/AsyncDisplayKit" class="btn btn-outlined">View on GitHub</a>
<a href="https://github.com/texturegroup/texture" class="btn btn-outlined">View on GitHub</a>
</div>
</div>
<div class="container">
<article>
<p>AsyncDisplayKit is an iOS framework built on top of UIKit that keeps even the most complex user interfaces smooth and responsive. It was originally built to make Facebook&#39;s Paper possible, and goes hand-in-hand with <a href="https://github.com/facebook/pop">pop</a>&#39;s physics-based animations &mdash; but it&#39;s just as powerful with UIKit Dynamics and conventional app designs. More recently, it was used to power Pinterest's <a href="https://www.wired.com/2016/04/pinterest-reinvents-prove-really-worth-billions/">app rewrite</a>.</p>
<p>Texture is an iOS framework built on top of UIKit that keeps even the most complex user interfaces smooth and responsive. It was originally built to make Facebook&#39;s Paper possible, and goes hand-in-hand with <a href="https://github.com/facebook/pop">pop</a>&#39;s physics-based animations &mdash; but it&#39;s just as powerful with UIKit Dynamics and conventional app designs. More recently, it was used to power Pinterest's <a href="https://www.wired.com/2016/04/pinterest-reinvents-prove-really-worth-billions/">app rewrite</a>.</p>
<p>As the framework has grown, many features have been added that can save developers tons of time by eliminating common boilerplate style structures common in modern iOS apps. If you've ever dealt with cell reuse bugs, tried to performantly preload data for a page or scroll style interface or even just tried to keep your app from dropping too many frames you can benefit from integrating ASDK.</p>
<p>As the framework has grown, many features have been added that can save developers tons of time by eliminating common boilerplate style structures common in modern iOS apps. If you've ever dealt with cell reuse bugs, tried to performantly preload data for a page or scroll style interface or even just tried to keep your app from dropping too many frames you can benefit from integrating Texture.</p>
<p>To learn more, <a href = "/docs/getting-started.html">check out our docs!</a></p>
</article>

View File

@@ -7,8 +7,8 @@ permalink: /showcase.html
<div class="container container-margin">
<article>
<h1>Who's using AsyncDisplayKit?</h1>
<p>If you're curious to see what can be accomplished with AsyncDisplayKit, check out these apps.</p>
<h1>Who's using Texture?</h1>
<p>If you're curious to see what can be accomplished with Texture, check out these apps.</p>
<table cellpadding="100" border="0" width="100%" style="margin-top:30px;">
<tr>
@@ -192,8 +192,8 @@ permalink: /showcase.html
</table>
<br />
<p>If you built an app using AsyncDisplayKit, we'd love to have your app in this showcase!</p>
<p>If you would like to have your app added or do not want your app featured on this page, please email asyncdisplaykit@gmail.com.</p>
<p>If you built an app using Texture, we'd love to have your app in this showcase!</p>
<p>If you would like to have your app added or do not want your app featured on this page, please email textureframework@gmail.com.</p>
</article>

View File

@@ -7,4 +7,4 @@ permalink: /slack.html
<iframe src="http://asdk-slack-auto-invite.herokuapp.com/" style="position:fixed; top:100px; left:0px; bottom:0px; right:0px; width:100%; height:100%; border:none; margin:0; padding:0; overflow:hidden; z-index:999999;">></iframe>
If the auto-invite link above does not work for you, please email asyncdisplaykit@gmail.com for an invite.
If the auto-invite link above does not work for you, please email textureframework@gmail.com for an invite.