ASTextNode+Beta.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. //
  2. // ASTextNode+Beta.h
  3. // AsyncDisplayKit
  4. //
  5. // Created by Luke on 1/25/16.
  6. //
  7. // Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
  8. // This source code is licensed under the BSD-style license found in the
  9. // LICENSE file in the root directory of this source tree. An additional grant
  10. // of patent rights can be found in the PATENTS file in the same directory.
  11. //
  12. #import <UIKit/UIKit.h>
  13. #import <AsyncDisplayKit/ASTextNode.h>
  14. NS_ASSUME_NONNULL_BEGIN
  15. @interface ASTextNode ()
  16. /**
  17. @abstract An array of descending scale factors that will be applied to this text node to try to make it fit within its constrained size
  18. @discussion This array should be in descending order and NOT contain the scale factor 1.0. For example, it could return @[@(.9), @(.85), @(.8)];
  19. @default nil (no scaling)
  20. */
  21. @property (nullable, nonatomic, copy) NSArray<NSNumber *> *pointSizeScaleFactors;
  22. /**
  23. @abstract Text margins for text laid out in the text node.
  24. @discussion defaults to UIEdgeInsetsZero.
  25. This property can be useful for handling text which does not fit within the view by default. An example: like UILabel,
  26. ASTextNode will clip the left and right of the string "judar" if it's rendered in an italicised font.
  27. */
  28. @property (nonatomic, assign) UIEdgeInsets textContainerInset;
  29. @end
  30. NS_ASSUME_NONNULL_END