SSLabel.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. //
  2. // SSLabel.h
  3. // SSToolkit
  4. //
  5. // Created by Sam Soffes on 7/12/10.
  6. // Copyright 2010-2011 Sam Soffes. All rights reserved.
  7. //
  8. /**
  9. The vertical alignment of text within a label.
  10. */
  11. typedef enum {
  12. /** Aligns the text vertically at the top in the label (the default). */
  13. SSLabelVerticalTextAlignmentTop = UIControlContentVerticalAlignmentTop,
  14. /** Aligns the text vertically in the center of the label. */
  15. SSLabelVerticalTextAlignmentMiddle = UIControlContentVerticalAlignmentCenter,
  16. /** Aligns the text vertically at the bottom in the label. */
  17. SSLabelVerticalTextAlignmentBottom = UIControlContentVerticalAlignmentBottom
  18. } SSLabelVerticalTextAlignment;
  19. /**
  20. Simple label subclass that adds the ability to align your text to the top or bottom.
  21. */
  22. @interface SSLabel : UILabel
  23. /**
  24. The vertical text alignment of the receiver.
  25. The default is `SSLabelVerticalTextAlignmentMiddle` to match `UILabel`.
  26. */
  27. @property (nonatomic, assign) SSLabelVerticalTextAlignment verticalTextAlignment;
  28. /**
  29. The edge insets of the text.
  30. The default is `UIEdgeInsetsZero` so it behaves like `UILabel` by default.
  31. */
  32. @property (nonatomic, assign) UIEdgeInsets textEdgeInsets;
  33. @end