From d4bbb0d32893de5598fdede88fea883f510276dd Mon Sep 17 00:00:00 2001 From: Luke Parham Date: Sun, 17 Apr 2016 20:40:47 -0500 Subject: [PATCH] fixed multiplex image node --- _data/nav_docs.yml | 1 + _docs/multiplex-image-node.md | 58 +----- _docs/network-image-node.md | 2 +- _site/docs/ascollectionnode.html | 146 ++++++++++++++ _site/docs/aspagernode.html | 146 ++++++++++++++ _site/docs/astablenode.html | 146 ++++++++++++++ _site/docs/asviewcontroller.html | 146 ++++++++++++++ _site/docs/automatic-layout-basics.html | 146 ++++++++++++++ _site/docs/automatic-layout-containers.html | 146 ++++++++++++++ _site/docs/automatic-layout-debugging.html | 146 ++++++++++++++ _site/docs/automatic-layout-examples.html | 146 ++++++++++++++ _site/docs/background-layout-spec.html | 146 ++++++++++++++ _site/docs/button-node.html | 146 ++++++++++++++ _site/docs/cell-node.html | 146 ++++++++++++++ _site/docs/control-node.html | 146 ++++++++++++++ _site/docs/debug-tool-ASRangeController.html | 146 ++++++++++++++ _site/docs/debug-tool-hit-test-slop.html | 146 ++++++++++++++ _site/docs/debug-tool-pixel-scaling.html | 146 ++++++++++++++ _site/docs/display-node.html | 146 ++++++++++++++ _site/docs/drawing-priority.html | 146 ++++++++++++++ _site/docs/editable-text-node.html | 146 ++++++++++++++ _site/docs/getting-started.html | 146 ++++++++++++++ _site/docs/hit-test-slop.html | 146 ++++++++++++++ _site/docs/image-modification-block.html | 146 ++++++++++++++ _site/docs/image-node.html | 146 ++++++++++++++ _site/docs/inset-layout-spec.html | 146 ++++++++++++++ _site/docs/installation.html | 146 ++++++++++++++ _site/docs/intelligent-preloading.html | 146 ++++++++++++++ _site/docs/layer-backing.html | 146 ++++++++++++++ _site/docs/layout-engine.html | 146 ++++++++++++++ _site/docs/layout-options.html | 146 ++++++++++++++ _site/docs/map-node.html | 146 ++++++++++++++ _site/docs/multiplex-image-node.html | 196 ++++++++++++++----- _site/docs/network-image-node.html | 148 +++++++++++++- _site/docs/nodes.html | 146 ++++++++++++++ _site/docs/overlay-layout-spec.html | 146 ++++++++++++++ _site/docs/philosophy.html | 146 ++++++++++++++ _site/docs/placeholder-fade-duration.html | 146 ++++++++++++++ _site/docs/references.html | 146 ++++++++++++++ _site/docs/relative-layout-spec.html | 146 ++++++++++++++ _site/docs/scroll-node.html | 146 ++++++++++++++ _site/docs/static-layout-spec.html | 146 ++++++++++++++ _site/docs/subclassing.html | 146 ++++++++++++++ _site/docs/subtree-rasterization.html | 146 ++++++++++++++ _site/docs/synchronous-concurrency.html | 146 ++++++++++++++ _site/docs/text-cell-node.html | 146 ++++++++++++++ _site/docs/text-node.html | 146 ++++++++++++++ _site/docs/video-node.html | 146 ++++++++++++++ _site/resources.html | 146 ++++++++++++++ 49 files changed, 6724 insertions(+), 105 deletions(-) diff --git a/_data/nav_docs.yml b/_data/nav_docs.yml index d20ad97a..f54cf3d6 100755 --- a/_data/nav_docs.yml +++ b/_data/nav_docs.yml @@ -26,6 +26,7 @@ - editable-text-node - image-node - network-image-node + - multiplex-image-node - map-node - video-node - scroll-node diff --git a/_docs/multiplex-image-node.md b/_docs/multiplex-image-node.md index 8ebfc775..c0d7fe40 100755 --- a/_docs/multiplex-image-node.md +++ b/_docs/multiplex-image-node.md @@ -2,61 +2,7 @@ title: ASMultiplexImageNode layout: docs permalink: /docs/multiplex-image-node.html +next: map-node.html --- -Create components using the `newWithView:size:` class method: -```objc++ -+ (instancetype)newWithView:(const CKComponentViewConfiguration &)view - size:(const CKComponentSize &)size; -``` - -It's important to note that you don't pass a `UIView` directly, but a `CKComponentViewConfiguration`. What's that? - -```objc++ -struct CKComponentViewConfiguration { - CKComponentViewClass viewClass; - std::unordered_map attributes; -}; -``` - -The first field is a view class. Ignore `CKComponentViewClass` for now — in most cases you just pass a class like `[UIImageView class]` or `[UIButton class]`. - -The second field holds a map of attributes to values: font, color, background image, and so forth. Again, ignore `CKComponentViewAttribute` for now; you can usually use a `SEL` as the attribute. - -Let's put one together: - -```objc++ -[CKComponent - newWithView:{ - [UIImageView class], - { - {@selector(setImage:), image}, - {@selector(setContentMode:), @(UIViewContentModeCenter)} // Wrapping into an NSNumber - } - } - size:{image.size.width, image.size.height}]; -``` - -That's all there is to it. ComponentKit does this for us: - -- Automatically creates or reuses a `UIImageView` when the component is mounted -- Automatically calls `setImage:` and `setContentMode:` with the given values -- Skips calling `setImage:` or `setContentMode:` if the value is unchanged between two updates — the most common case when updating a tree. - -## Primitive Arguments - -The values in the map are of type `id`, so if you want to pass in primitive types like `BOOL`, you have to wrap them into an `NSValue` object using e.g. `@(value)` and ComponentKit will unwrap them. - -## Viewless Components - -Often there exist logical components that don't need a corresponding view in the view hierarchy. For example a `CKStackLayoutComponent` often doesn't need to have a view; it only needs to position various subviews inside a designated area. In such situations, just pass `{}` for the view configuration and no view is created. For example: - -```objc++ -[CKComponent newWithView:{} size:{}] -``` - -(You can also just use `+new` directly, which uses this as the default.) - -## Advanced Views - -This is sufficient for most cases, but there is considerably more power when you need it. See [Advanced Views](advanced-views.html) if you want to learn more. +
😑 This page is coming soon...
\ No newline at end of file diff --git a/_docs/network-image-node.md b/_docs/network-image-node.md index d7da0d70..89b0382f 100755 --- a/_docs/network-image-node.md +++ b/_docs/network-image-node.md @@ -2,7 +2,7 @@ title: ASNetworkImageNode layout: docs permalink: /docs/network-image-node.html -next: map-node.html +next: multiplex-image-node.html ---
😑 This page is coming soon...
\ No newline at end of file diff --git a/_site/docs/ascollectionnode.html b/_site/docs/ascollectionnode.html index 9316d547..4b0d4b0f 100644 --- a/_site/docs/ascollectionnode.html +++ b/_site/docs/ascollectionnode.html @@ -3049,6 +3049,152 @@ + + + + + + + + + + + + + + + + + + + + + + + + +
  • + + ASMultiplexImageNode + +
  • + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/_site/docs/aspagernode.html b/_site/docs/aspagernode.html index 3bf3a30b..43ca741c 100644 --- a/_site/docs/aspagernode.html +++ b/_site/docs/aspagernode.html @@ -3049,6 +3049,152 @@ + + + + + + + + + + + + + + + + + + + + + + + + +
  • + + ASMultiplexImageNode + +
  • + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/_site/docs/astablenode.html b/_site/docs/astablenode.html index c6f10de8..c392bc40 100644 --- a/_site/docs/astablenode.html +++ b/_site/docs/astablenode.html @@ -3049,6 +3049,152 @@ + + + + + + + + + + + + + + + + + + + + + + + + +
  • + + ASMultiplexImageNode + +
  • + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/_site/docs/asviewcontroller.html b/_site/docs/asviewcontroller.html index 104fec0a..e1bb9184 100644 --- a/_site/docs/asviewcontroller.html +++ b/_site/docs/asviewcontroller.html @@ -3049,6 +3049,152 @@ + + + + + + + + + + + + + + + + + + + + + + + + +
  • + + ASMultiplexImageNode + +
  • + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/_site/docs/automatic-layout-basics.html b/_site/docs/automatic-layout-basics.html index a1922377..98ac5b50 100644 --- a/_site/docs/automatic-layout-basics.html +++ b/_site/docs/automatic-layout-basics.html @@ -3049,6 +3049,152 @@ + + + + + + + + + + + + + + + + + + + + + + + + +
  • + + ASMultiplexImageNode + +
  • + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/_site/docs/automatic-layout-containers.html b/_site/docs/automatic-layout-containers.html index 5b35cc0e..da3c5d2f 100644 --- a/_site/docs/automatic-layout-containers.html +++ b/_site/docs/automatic-layout-containers.html @@ -3049,6 +3049,152 @@ + + + + + + + + + + + + + + + + + + + + + + + + +
  • + + ASMultiplexImageNode + +
  • + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/_site/docs/automatic-layout-debugging.html b/_site/docs/automatic-layout-debugging.html index 3bbf79f6..1803ecb7 100644 --- a/_site/docs/automatic-layout-debugging.html +++ b/_site/docs/automatic-layout-debugging.html @@ -3049,6 +3049,152 @@ + + + + + + + + + + + + + + + + + + + + + + + + +
  • + + ASMultiplexImageNode + +
  • + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/_site/docs/automatic-layout-examples.html b/_site/docs/automatic-layout-examples.html index 8178f821..c1308e23 100644 --- a/_site/docs/automatic-layout-examples.html +++ b/_site/docs/automatic-layout-examples.html @@ -3049,6 +3049,152 @@ + + + + + + + + + + + + + + + + + + + + + + + + +
  • + + ASMultiplexImageNode + +
  • + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/_site/docs/background-layout-spec.html b/_site/docs/background-layout-spec.html index af374e8a..772e28b8 100644 --- a/_site/docs/background-layout-spec.html +++ b/_site/docs/background-layout-spec.html @@ -3049,6 +3049,152 @@ + + + + + + + + + + + + + + + + + + + + + + + + +
  • + + ASMultiplexImageNode + +
  • + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/_site/docs/button-node.html b/_site/docs/button-node.html index 01c909b2..67424a7a 100644 --- a/_site/docs/button-node.html +++ b/_site/docs/button-node.html @@ -3049,6 +3049,152 @@ + + + + + + + + + + + + + + + + + + + + + + + + +
  • + + ASMultiplexImageNode + +
  • + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/_site/docs/cell-node.html b/_site/docs/cell-node.html index 1fe089d7..04b05c24 100644 --- a/_site/docs/cell-node.html +++ b/_site/docs/cell-node.html @@ -3049,6 +3049,152 @@ + + + + + + + + + + + + + + + + + + + + + + + + +
  • + + ASMultiplexImageNode + +
  • + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/_site/docs/control-node.html b/_site/docs/control-node.html index 7a63f88c..1508aefc 100644 --- a/_site/docs/control-node.html +++ b/_site/docs/control-node.html @@ -3049,6 +3049,152 @@ + + + + + + + + + + + + + + + + + + + + + + + + +
  • + + ASMultiplexImageNode + +
  • + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/_site/docs/debug-tool-ASRangeController.html b/_site/docs/debug-tool-ASRangeController.html index d71ed6ab..eb554694 100644 --- a/_site/docs/debug-tool-ASRangeController.html +++ b/_site/docs/debug-tool-ASRangeController.html @@ -3049,6 +3049,152 @@ + + + + + + + + + + + + + + + + + + + + + + + + +
  • + + ASMultiplexImageNode + +
  • + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/_site/docs/debug-tool-hit-test-slop.html b/_site/docs/debug-tool-hit-test-slop.html index 34eaeaec..7e694eb6 100644 --- a/_site/docs/debug-tool-hit-test-slop.html +++ b/_site/docs/debug-tool-hit-test-slop.html @@ -3049,6 +3049,152 @@ + + + + + + + + + + + + + + + + + + + + + + + + +
  • + + ASMultiplexImageNode + +
  • + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/_site/docs/debug-tool-pixel-scaling.html b/_site/docs/debug-tool-pixel-scaling.html index dc8a6256..ad637439 100644 --- a/_site/docs/debug-tool-pixel-scaling.html +++ b/_site/docs/debug-tool-pixel-scaling.html @@ -3049,6 +3049,152 @@ + + + + + + + + + + + + + + + + + + + + + + + + +
  • + + ASMultiplexImageNode + +
  • + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/_site/docs/display-node.html b/_site/docs/display-node.html index 69c4a633..0f005923 100644 --- a/_site/docs/display-node.html +++ b/_site/docs/display-node.html @@ -3049,6 +3049,152 @@ + + + + + + + + + + + + + + + + + + + + + + + + +
  • + + ASMultiplexImageNode + +
  • + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/_site/docs/drawing-priority.html b/_site/docs/drawing-priority.html index 0751bf26..a09d2911 100644 --- a/_site/docs/drawing-priority.html +++ b/_site/docs/drawing-priority.html @@ -3049,6 +3049,152 @@ + + + + + + + + + + + + + + + + + + + + + + + + +
  • + + ASMultiplexImageNode + +
  • + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/_site/docs/editable-text-node.html b/_site/docs/editable-text-node.html index 8a925406..de1f8ec1 100644 --- a/_site/docs/editable-text-node.html +++ b/_site/docs/editable-text-node.html @@ -3049,6 +3049,152 @@ + + + + + + + + + + + + + + + + + + + + + + + + +
  • + + ASMultiplexImageNode + +
  • + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/_site/docs/getting-started.html b/_site/docs/getting-started.html index fe41f3d5..de360fc2 100644 --- a/_site/docs/getting-started.html +++ b/_site/docs/getting-started.html @@ -3049,6 +3049,152 @@ + + + + + + + + + + + + + + + + + + + + + + + + +
  • + + ASMultiplexImageNode + +
  • + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/_site/docs/hit-test-slop.html b/_site/docs/hit-test-slop.html index a7169900..dabd4ca2 100644 --- a/_site/docs/hit-test-slop.html +++ b/_site/docs/hit-test-slop.html @@ -3049,6 +3049,152 @@ + + + + + + + + + + + + + + + + + + + + + + + + +
  • + + ASMultiplexImageNode + +
  • + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/_site/docs/image-modification-block.html b/_site/docs/image-modification-block.html index a4c21bf5..f726fa60 100644 --- a/_site/docs/image-modification-block.html +++ b/_site/docs/image-modification-block.html @@ -3049,6 +3049,152 @@ + + + + + + + + + + + + + + + + + + + + + + + + +
  • + + ASMultiplexImageNode + +
  • + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/_site/docs/image-node.html b/_site/docs/image-node.html index 25ad9478..5ab8c48b 100644 --- a/_site/docs/image-node.html +++ b/_site/docs/image-node.html @@ -3049,6 +3049,152 @@ + + + + + + + + + + + + + + + + + + + + + + + + +
  • + + ASMultiplexImageNode + +
  • + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/_site/docs/inset-layout-spec.html b/_site/docs/inset-layout-spec.html index cae4eeb6..17d74f99 100644 --- a/_site/docs/inset-layout-spec.html +++ b/_site/docs/inset-layout-spec.html @@ -3049,6 +3049,152 @@ + + + + + + + + + + + + + + + + + + + + + + + + +
  • + + ASMultiplexImageNode + +
  • + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/_site/docs/installation.html b/_site/docs/installation.html index 2421f2a3..fecc1e9b 100644 --- a/_site/docs/installation.html +++ b/_site/docs/installation.html @@ -3049,6 +3049,152 @@ + + + + + + + + + + + + + + + + + + + + + + + + +
  • + + ASMultiplexImageNode + +
  • + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/_site/docs/intelligent-preloading.html b/_site/docs/intelligent-preloading.html index 9a8214a8..bbdf5d3f 100644 --- a/_site/docs/intelligent-preloading.html +++ b/_site/docs/intelligent-preloading.html @@ -3049,6 +3049,152 @@ + + + + + + + + + + + + + + + + + + + + + + + + +
  • + + ASMultiplexImageNode + +
  • + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/_site/docs/layer-backing.html b/_site/docs/layer-backing.html index 8479b40b..22d43408 100644 --- a/_site/docs/layer-backing.html +++ b/_site/docs/layer-backing.html @@ -3049,6 +3049,152 @@ + + + + + + + + + + + + + + + + + + + + + + + + +
  • + + ASMultiplexImageNode + +
  • + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/_site/docs/layout-engine.html b/_site/docs/layout-engine.html index 85b220d4..20ecd50f 100644 --- a/_site/docs/layout-engine.html +++ b/_site/docs/layout-engine.html @@ -3049,6 +3049,152 @@ + + + + + + + + + + + + + + + + + + + + + + + + +
  • + + ASMultiplexImageNode + +
  • + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/_site/docs/layout-options.html b/_site/docs/layout-options.html index 3ab18528..1fb1d39a 100644 --- a/_site/docs/layout-options.html +++ b/_site/docs/layout-options.html @@ -3049,6 +3049,152 @@ + + + + + + + + + + + + + + + + + + + + + + + + +
  • + + ASMultiplexImageNode + +
  • + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/_site/docs/map-node.html b/_site/docs/map-node.html index 18e8f6aa..174bb6de 100644 --- a/_site/docs/map-node.html +++ b/_site/docs/map-node.html @@ -3049,6 +3049,152 @@ + + + + + + + + + + + + + + + + + + + + + + + + +
  • + + ASMultiplexImageNode + +
  • + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/_site/docs/multiplex-image-node.html b/_site/docs/multiplex-image-node.html index d15b8db8..e5feb463 100644 --- a/_site/docs/multiplex-image-node.html +++ b/_site/docs/multiplex-image-node.html @@ -3049,6 +3049,152 @@ + + + + + + + + + + + + + + + + + + + + + + + + +
  • + + ASMultiplexImageNode + +
  • + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -5649,58 +5795,14 @@

    -

    Create components using the newWithView:size: class method:

    -
    + (instancetype)newWithView:(const CKComponentViewConfiguration &)view
    -                       size:(const CKComponentSize &)size;
    -
    -

    It's important to note that you don't pass a UIView directly, but a CKComponentViewConfiguration. What's that?

    -
    struct CKComponentViewConfiguration {
    -  CKComponentViewClass viewClass;
    -  std::unordered_map<CKComponentViewAttribute, id> attributes;
    -};
    -
    -

    The first field is a view class. Ignore CKComponentViewClass for now — in most cases you just pass a class like [UIImageView class] or [UIButton class].

    - -

    The second field holds a map of attributes to values: font, color, background image, and so forth. Again, ignore CKComponentViewAttribute for now; you can usually use a SEL as the attribute.

    - -

    Let's put one together:

    -
    [CKComponent 
    - newWithView:{
    -   [UIImageView class],
    -   {
    -     {@selector(setImage:), image},
    -     {@selector(setContentMode:), @(UIViewContentModeCenter)} // Wrapping into an NSNumber
    -   }
    - }
    - size:{image.size.width, image.size.height}];
    -
    -

    That's all there is to it. ComponentKit does this for us:

    - - - -

    Primitive Arguments

    - -

    The values in the map are of type id, so if you want to pass in primitive types like BOOL, you have to wrap them into an NSValue object using e.g. @(value) and ComponentKit will unwrap them.

    - -

    Viewless Components

    - -

    Often there exist logical components that don't need a corresponding view in the view hierarchy. For example a CKStackLayoutComponent often doesn't need to have a view; it only needs to position various subviews inside a designated area. In such situations, just pass {} for the view configuration and no view is created. For example:

    -
    [CKComponent newWithView:{} size:{}]
    -
    -

    (You can also just use +new directly, which uses this as the default.)

    - -

    Advanced Views

    - -

    This is sufficient for most cases, but there is considerably more power when you need it. See Advanced Views if you want to learn more.

    +
    😑 This page is coming soon...
    + Next → +
    diff --git a/_site/docs/network-image-node.html b/_site/docs/network-image-node.html index 2e1411ff..893cb869 100644 --- a/_site/docs/network-image-node.html +++ b/_site/docs/network-image-node.html @@ -3049,6 +3049,152 @@ + + + + + + + + + + + + + + + + + + + + + + + + +
  • + + ASMultiplexImageNode + +
  • + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -5655,7 +5801,7 @@ diff --git a/_site/docs/nodes.html b/_site/docs/nodes.html index f2eaa0db..5f48dd50 100644 --- a/_site/docs/nodes.html +++ b/_site/docs/nodes.html @@ -3049,6 +3049,152 @@ + + + + + + + + + + + + + + + + + + + + + + + + +
  • + + ASMultiplexImageNode + +
  • + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/_site/docs/overlay-layout-spec.html b/_site/docs/overlay-layout-spec.html index 8569a15b..5a3ace73 100644 --- a/_site/docs/overlay-layout-spec.html +++ b/_site/docs/overlay-layout-spec.html @@ -3049,6 +3049,152 @@ + + + + + + + + + + + + + + + + + + + + + + + + +
  • + + ASMultiplexImageNode + +
  • + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/_site/docs/philosophy.html b/_site/docs/philosophy.html index 928499ef..31860aac 100644 --- a/_site/docs/philosophy.html +++ b/_site/docs/philosophy.html @@ -3049,6 +3049,152 @@ + + + + + + + + + + + + + + + + + + + + + + + + +
  • + + ASMultiplexImageNode + +
  • + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/_site/docs/placeholder-fade-duration.html b/_site/docs/placeholder-fade-duration.html index e1d60278..546e63f7 100644 --- a/_site/docs/placeholder-fade-duration.html +++ b/_site/docs/placeholder-fade-duration.html @@ -3049,6 +3049,152 @@ + + + + + + + + + + + + + + + + + + + + + + + + +
  • + + ASMultiplexImageNode + +
  • + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/_site/docs/references.html b/_site/docs/references.html index cf1cc6fe..0735dccb 100644 --- a/_site/docs/references.html +++ b/_site/docs/references.html @@ -3049,6 +3049,152 @@ + + + + + + + + + + + + + + + + + + + + + + + + +
  • + + ASMultiplexImageNode + +
  • + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/_site/docs/relative-layout-spec.html b/_site/docs/relative-layout-spec.html index 05a1aa9a..3aa849da 100644 --- a/_site/docs/relative-layout-spec.html +++ b/_site/docs/relative-layout-spec.html @@ -3049,6 +3049,152 @@ + + + + + + + + + + + + + + + + + + + + + + + + +
  • + + ASMultiplexImageNode + +
  • + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/_site/docs/scroll-node.html b/_site/docs/scroll-node.html index 62a60bb3..f3b76b06 100644 --- a/_site/docs/scroll-node.html +++ b/_site/docs/scroll-node.html @@ -3049,6 +3049,152 @@ + + + + + + + + + + + + + + + + + + + + + + + + +
  • + + ASMultiplexImageNode + +
  • + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/_site/docs/static-layout-spec.html b/_site/docs/static-layout-spec.html index f822c00e..a4eadaa8 100644 --- a/_site/docs/static-layout-spec.html +++ b/_site/docs/static-layout-spec.html @@ -3049,6 +3049,152 @@ + + + + + + + + + + + + + + + + + + + + + + + + +
  • + + ASMultiplexImageNode + +
  • + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/_site/docs/subclassing.html b/_site/docs/subclassing.html index b06cbb42..71bfb6d2 100644 --- a/_site/docs/subclassing.html +++ b/_site/docs/subclassing.html @@ -3049,6 +3049,152 @@ + + + + + + + + + + + + + + + + + + + + + + + + +
  • + + ASMultiplexImageNode + +
  • + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/_site/docs/subtree-rasterization.html b/_site/docs/subtree-rasterization.html index 31900ab9..23e90809 100644 --- a/_site/docs/subtree-rasterization.html +++ b/_site/docs/subtree-rasterization.html @@ -3049,6 +3049,152 @@ + + + + + + + + + + + + + + + + + + + + + + + + +
  • + + ASMultiplexImageNode + +
  • + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/_site/docs/synchronous-concurrency.html b/_site/docs/synchronous-concurrency.html index e2b9a1f5..b9608c94 100644 --- a/_site/docs/synchronous-concurrency.html +++ b/_site/docs/synchronous-concurrency.html @@ -3049,6 +3049,152 @@ + + + + + + + + + + + + + + + + + + + + + + + + +
  • + + ASMultiplexImageNode + +
  • + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/_site/docs/text-cell-node.html b/_site/docs/text-cell-node.html index fe10495f..a6b4efe6 100644 --- a/_site/docs/text-cell-node.html +++ b/_site/docs/text-cell-node.html @@ -3049,6 +3049,152 @@ + + + + + + + + + + + + + + + + + + + + + + + + +
  • + + ASMultiplexImageNode + +
  • + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/_site/docs/text-node.html b/_site/docs/text-node.html index 383cda02..3023ae8b 100644 --- a/_site/docs/text-node.html +++ b/_site/docs/text-node.html @@ -3049,6 +3049,152 @@ + + + + + + + + + + + + + + + + + + + + + + + + +
  • + + ASMultiplexImageNode + +
  • + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/_site/docs/video-node.html b/_site/docs/video-node.html index eaabbb0f..4f2a4f5e 100644 --- a/_site/docs/video-node.html +++ b/_site/docs/video-node.html @@ -3049,6 +3049,152 @@ + + + + + + + + + + + + + + + + + + + + + + + + +
  • + + ASMultiplexImageNode + +
  • + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/_site/resources.html b/_site/resources.html index e7f8e0d2..f32ea568 100644 --- a/_site/resources.html +++ b/_site/resources.html @@ -3049,6 +3049,152 @@ + + + + + + + + + + + + + + + + + + + + + + + + +
  • + + ASMultiplexImageNode + +
  • + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +