From 299b972197acbc7ca030d94dc369a0875dadeeaf Mon Sep 17 00:00:00 2001 From: Hannah Troisi Date: Thu, 7 Apr 2016 15:54:03 -0700 Subject: [PATCH] Update layout-options.md --- _docs/layout-options.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/_docs/layout-options.md b/_docs/layout-options.md index 974a9ae9..51aeb844 100644 --- a/_docs/layout-options.md +++ b/_docs/layout-options.md @@ -4,13 +4,13 @@ layout: docs permalink: /docs/layout-options.html --- -When using ASDK, you have three options for layout. Note that Autolayout is **not** supported by ASDK. - +When using ASDK, you have three options for layout. Note that UIKit Autolayout is **not** supported by ASDK. #Manual Sizing & Layout This original layout method shipped with ASDK 1.0 and is analogous to UIKit's layout methods. Use this method for for ASViewControllers (unless you subclass the node). `[ASDisplayNode calculateSizeThatFits:]` **vs.** `[UIView sizeThatFits:]` + `[ASDisplayNode layout]` **vs.** `[UIView layoutSubviews]` ###Advantages (over UIKit) @@ -30,12 +30,14 @@ This layout method does not have a UIKit analog. It is implemented by calling ###Advantages - zero duplication - still async, still cached + ###Shortcomings - logic is not reusable, and is still manual # Automatic, Extensible Layout This is the reccomended layout method. It does not have a UIKit analog and is implemented by calling + `- (ASLayoutSpec *)layoutSpecThatFits:(ASSizeRange)constraint` ###Advantages - can reuse even complex, custom layouts