M80AttributedLabelAttachment.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. //
  2. // M80AttributedLabelAttachment.h
  3. // M80AttributedLabel
  4. //
  5. // Created by amao on 13-8-31.
  6. // Copyright (c) 2013年 www.xiangwangfeng.com. All rights reserved.
  7. //
  8. #import "M80AttributedLabelDefines.h"
  9. NS_ASSUME_NONNULL_BEGIN
  10. void deallocCallback(void* ref);
  11. CGFloat ascentCallback(void *ref);
  12. CGFloat descentCallback(void *ref);
  13. CGFloat widthCallback(void* ref);
  14. @interface M80AttributedLabelAttachment : NSObject
  15. @property (nonatomic,strong) id content;
  16. @property (nonatomic,assign) UIEdgeInsets margin;
  17. @property (nonatomic,assign) M80ImageAlignment alignment;
  18. @property (nonatomic,assign) CGFloat fontAscent;
  19. @property (nonatomic,assign) CGFloat fontDescent;
  20. @property (nonatomic,assign) CGSize maxSize;
  21. + (M80AttributedLabelAttachment *)attachmentWith:(id)content
  22. margin:(UIEdgeInsets)margin
  23. alignment:(M80ImageAlignment)alignment
  24. maxSize:(CGSize)maxSize;
  25. - (CGSize)boxSize;
  26. @end
  27. NS_ASSUME_NONNULL_END